About this run
Run
- Id
- b5143655-673f-4a5d-b8e9-cdb899e5c234
- Prompt
- E-commerce monolith migration
- Configuration
- Made with
- Process executor
- This page
- Report generator 0.1.16 · Analysis generator
- Status
- completed
- Started
- 2026-09-19 01:43
- Duration
- 18 min 6 s
Council
- Proposers
- 5
- Refinement rounds
- 4
- Voters
- 5
- Selected plan
- grok-4.6_refine_3 · 4 of 5 votes · 22 steps
Plan cost
Analysis LLM analysis
Models of the council
| Model | Thinking |
|---|---|
| claudeHaiku4.5 · anthropic/claude-haiku-4-5 | extended thinking, 15.0k tokens · temp 1 |
| deepseek-v4-pro · deepseek/deepseek-v4-pro | thinking on (model default) |
| gpt-5.6-terra · openai/gpt-5.6-terra | reasoning effort medium |
| grok-4.6 · xai/grok-4.6 | reasoning effort medium |
| qwen3.8-max · alibaba/qwen3.8-max | thinking on, budget 16.0k tokens |
Analyses of this run
| # | Date | Analyst | Schema | Analysis generator | Calls | Cost | Verdict on the vote | Report |
|---|---|---|---|---|---|---|---|---|
| 1 | 2026-09-19 02:13 | alibaba/qwen3.8-max |
v4 | not recorded slow-thinker not recorded |
7 | 0.83 USD | agrees | this page |
Task
A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk).
Process
Round 0 — initial proposals
All five agents converge on the strangler-fig pattern with feature flags, canary routing, and event-driven data transition, but diverge sharply on extraction sequence, pricing-risk handling, and ambition for monolith retirement. Proposal 5 is the most aggressive, targeting zero monolith lines in 12 months and seven extraction waves with concrete tooling choices (Debezium, Kafka, Elasticsearch, Pact). Proposal 2 is the most conservative, treating pricing as a dedicated discovery stream and explicitly allowing partial extraction if parity cannot be proven.
Proposals 1 and 4 follow a more traditional sequential extraction with explicit peak-readiness gates, while Proposal 3 emphasises monolith modularisation in place and a strict freeze calendar around sales windows.
The calls of this round
A 23-step plan that builds Kubernetes infrastructure, a strangler proxy, and observability in the first two months, then extracts services in a low-to-high-risk order: catalogue/search, customer accounts, returns, pricing, inventory, payments. Pricing is treated as a dedicated audit and rebuild stream starting early in parallel with infrastructure work. The plan ends with a 48-hour pre-peak rehearsal, load testing at 12x, and a go/no-go gate before each sales period.
The plan produced
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (after 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (after 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (after 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (after 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (after 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (after 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (after 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (after 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (after 7, 9)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (after 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (after 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (after 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (after 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (after 7, 9, 14)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (after 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (after 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (after 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (after 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (after 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (after 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (after 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (after 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
- All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
[SYSTEM] You are an expert assistant in complex project planning. Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform. Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible. Take as much time and space as you need to think through all aspects of the problem. After your thorough analysis, answer with the plan in the requested structure. Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text. [HUMAN] Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository. Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)." Generate an initial, detailed, and well-structured plan proposal. The plan has these parts: - "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none). - "estimated_complexity": "low", "medium" or "high". - "success_metrics": clear and measurable success metrics, one per line as a bullet list. Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Establish governance and migration steering committee", "description": "Create a governance structure to guide the 12-month migration and ensure alignment across teams.\n\n- Define clear decision-making authority and escalation paths.\n- Establish weekly steering meetings with representatives from each of the five teams plus leadership.\n- Create a shared vision for service boundaries and prioritize which modules to extract first.\n- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.", "dependencies": []}, {"step_id": "S2", "title": "Design service architecture and system boundaries", "description": "Map the monolith into independently deployable services with clear boundaries and synchronization points.\n\n- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).\n- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.\n- Plan the strangler approach for each module: what gets extracted first, what depends on what.\n- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Deploy Kubernetes infrastructure and container registry", "description": "Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.\n\n- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).\n- Set up container image registry with retention policies and security scanning.\n- Configure persistent storage volumes for databases and caches.\n- Implement cluster networking, RBAC, and network policies for security.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Implement strangler proxy and API gateway", "description": "Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.\n\n- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.\n- Implement request routing logic to direct traffic to services or monolith based on rules.\n- Add request/response logging and transformation layer for API versioning.\n- Enable instant traffic rerouting and rollback if a service fails.", "dependencies": ["S3"]}, {"step_id": "S5", "title": "Build feature flagging and traffic routing system", "description": "Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.\n\n- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).\n- Integrate with API gateway and service code to support percentage-based traffic splitting.\n- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).\n- Create dashboards for ops teams to adjust routing in real time without redeploying.", "dependencies": ["S3"]}, {"step_id": "S6", "title": "Establish comprehensive observability (logs, metrics, tracing)", "description": "Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.\n\n- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).\n- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.\n- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.\n- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.", "dependencies": ["S3"]}, {"step_id": "S7", "title": "Design event-driven data consistency architecture", "description": "Plan how services will stay in sync when sharing data extracted from the monolith's single database.\n\n- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).\n- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.\n- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).\n- Document how to handle eventual consistency, conflicts, and zombie data in each service.", "dependencies": ["S3"]}, {"step_id": "S8", "title": "Build inter-service communication framework (APIs and queues)", "description": "Establish libraries and standards for how services talk to each other synchronously and asynchronously.\n\n- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.\n- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).\n- Document timeout and retry policies to prevent cascading failures.\n- Provide templates and SDKs to development teams so they don't reimplement these patterns.", "dependencies": ["S3"]}, {"step_id": "S9", "title": "Extract catalog and search service", "description": "Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.\n\n- Move catalog module code from monolith to a new service repository.\n- Containerize the service and deploy to Kubernetes.\n- Keep the existing Lucene index and nightly rebuild process initially.\n- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.", "dependencies": ["S4", "S5", "S6", "S8"]}, {"step_id": "S10", "title": "Create independent catalog data layer with synchronization", "description": "Extract catalog tables from the shared database and sync changes from the monolith to the new service.\n\n- Copy catalog tables to a new PostgreSQL database managed by the catalog service.\n- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.\n- Build catalog service to subscribe to these events and update its own tables.\n- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.", "dependencies": ["S9", "S7"]}, {"step_id": "S11", "title": "Extract customer accounts service", "description": "Move customer profile, login, and loyalty data into a dedicated service that other services query.\n\n- Extract customer and loyalty tables from monolith database.\n- Build service to manage customer profile, authentication, and loyalty points.\n- Implement event stream for customer changes (profile updates, loyalty point transactions).\n- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.", "dependencies": ["S4", "S5", "S6", "S8"]}, {"step_id": "S12", "title": "Extract returns management service", "description": "Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.\n\n- Move returns processing logic and tables from monolith.\n- Build simple service with clear inputs (return requests) and outputs (refund events).\n- Connect to order data via API calls (will be extracted separately) and inventory service.\n- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.", "dependencies": ["S4", "S5", "S6", "S8"]}, {"step_id": "S13", "title": "Audit, document, and decompose pricing/promotions business rules", "description": "Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.\n\n- Form a task force: architects, the original pricing team, and business analysts.\n- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).\n- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.\n- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.\n- Identify which pricing decisions depend on cart, inventory, or customer account data.", "dependencies": ["S1"]}, {"step_id": "S14", "title": "Design and implement pricing/promotions service with enhanced testing", "description": "Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.\n\n- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.\n- Implement each country's rules as either code or a rules engine (not hardcoded strings).\n- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).\n- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.", "dependencies": ["S4", "S5", "S6", "S8", "S13"]}, {"step_id": "S15", "title": "Implement event-driven pricing and cart synchronization", "description": "Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.\n\n- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.\n- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.\n- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.\n- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.", "dependencies": ["S14", "S7", "S9"]}, {"step_id": "S16", "title": "Extract inventory management service", "description": "Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.\n\n- Extract inventory tables and warehouse sync logic from monolith.\n- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).\n- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.\n- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.", "dependencies": ["S4", "S5", "S6", "S8", "S10"]}, {"step_id": "S17", "title": "Extract payment gateway coordination service", "description": "Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.\n\n- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.\n- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.\n- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.\n- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.\n- Use gateway to route: send payments for test users/regions to new service first.", "dependencies": ["S4", "S5", "S6", "S8"]}, {"step_id": "S18", "title": "Implement resilience patterns across services (circuit breakers, fallbacks, retries)", "description": "Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.\n\n- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.\n- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.\n- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.\n- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.\n- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.", "dependencies": ["S9", "S10", "S11", "S12"]}, {"step_id": "S19", "title": "Build comprehensive integration test suite", "description": "Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.\n\n- Build test data setup: create products, customers, promos, inventory in test environment.\n- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.\n- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.\n- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.\n- Run tests on every service commit and nightly against staging environment; alert on test failure.", "dependencies": ["S14", "S16", "S17"]}, {"step_id": "S20", "title": "Create independent service deployment pipelines", "description": "Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.\n\n- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).\n- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.\n- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).\n- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.\n- Target: enable each team to deploy 1-2 times per day if needed.", "dependencies": ["S4", "S18"]}, {"step_id": "S21", "title": "Conduct load testing and peak-season capacity planning", "description": "Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.\n\n- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).\n- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?\n- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).\n- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.\n- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.", "dependencies": ["S19", "S20"]}, {"step_id": "S22", "title": "Execute comprehensive pre-peak-season validation and simulation", "description": "Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.\n\n- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.\n- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?\n- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.\n- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.\n- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.\n- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.", "dependencies": ["S21"]}, {"step_id": "S23", "title": "Monitor, optimize, and prepare for ongoing evolution", "description": "After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.\n\n- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.\n- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).\n- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.\n- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?\n- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?", "dependencies": ["S22"]}], "estimated_complexity": "high", "success_metrics": "- All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.\n- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.\n- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.\n- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.\n- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.\n- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.\n- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.\n- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.\n- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.\n- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes."}A 20-step plan that front-loads governance, baseline measurement, and production safety before any extraction. It sequences five waves from read-only catalogue/search through to cart/checkout, explicitly excluding pricing from early waves and treating it as a bounded-slice discovery stream. It mandates sales protection windows (four weeks before and through January/July), prohibits distributed transactions, and requires formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and support.
The plan produced
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (after 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (after 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (after 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (after 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (after 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (after 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (after 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (after 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (after 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (after 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (after 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (after 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (after 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (after 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (after 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (after 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (after 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (after 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (after 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
[SYSTEM] You are an expert assistant in complex project planning. Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform. Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible. Take as much time and space as you need to think through all aspects of the problem. After your thorough analysis, answer with the plan in the requested structure. Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text. [HUMAN] Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository. Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)." Generate an initial, detailed, and well-structured plan proposal. The plan has these parts: - "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none). - "estimated_complexity": "low", "medium" or "high". - "success_metrics": clear and measurable success metrics, one per line as a bullet list. Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Establish migration governance and delivery model", "description": "Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.\n\n- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.\n- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.\n- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.\n- Define explicit stop/go criteria for each production cutover and a formal rollback authority.\n- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.\n- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the monolith, traffic, data, and operational risk", "description": "Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.\n\n- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.\n- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.\n- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.\n- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.\n- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.\n- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture and domain boundaries", "description": "Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.\n\n- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.\n- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.\n- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.\n- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.\n- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.\n- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Create production safety foundations", "description": "Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.\n\n- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.\n- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.\n- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.\n- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.\n- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.\n- Create a shared operations readiness review required before any service receives production traffic.", "dependencies": ["S1", "S3"]}, {"step_id": "S5", "title": "Build secure delivery and runtime platform", "description": "Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.\n\n- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.\n- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.\n- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.\n- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.\n- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.\n- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Improve monolith safety while it remains live", "description": "Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.\n\n- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.\n- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.\n- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.\n- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.\n- Add feature flags and kill switches around all new monolith-to-service integrations.\n- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Implement integration, event, and data-transition patterns", "description": "Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.\n\n- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.\n- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.\n- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.\n- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.\n- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.\n- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Create quality, performance, and release assurance", "description": "Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.\n\n- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.\n- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.\n- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.\n- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.\n- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.\n- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S9", "title": "Select and sequence extraction waves", "description": "Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.\n\n- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.\n- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.\n- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.\n- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.\n- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.\n- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.\n- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.", "dependencies": ["S2", "S3", "S8"]}, {"step_id": "S10", "title": "Introduce edge routing and façade interfaces", "description": "Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.\n\n- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.\n- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.\n- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.\n- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.\n- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.\n- Measure baseline response equivalence and latency overhead before moving any business endpoint.", "dependencies": ["S4", "S5", "S6", "S8"]}, {"step_id": "S11", "title": "Extract catalogue read API and modern search", "description": "Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.\n\n- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.\n- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.\n- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.\n- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.\n- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.\n- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.", "dependencies": ["S7", "S8", "S9", "S10"]}, {"step_id": "S12", "title": "Modernise inventory integration and availability reads", "description": "Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.\n\n- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.\n- Publish inventory-change events and create an availability read model for storefront and search use.\n- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.\n- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.\n- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.\n- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.", "dependencies": ["S7", "S8", "S9", "S10"]}, {"step_id": "S13", "title": "Discover and contain pricing and promotions", "description": "Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.\n\n- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.\n- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.\n- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.\n- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.\n- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.", "dependencies": ["S2", "S6", "S7", "S8", "S9", "S10"]}, {"step_id": "S14", "title": "Extract customer and loyalty capabilities safely", "description": "Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.\n\n- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.\n- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.\n- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.\n- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.\n- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.\n- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.", "dependencies": ["S7", "S8", "S9", "S10"]}, {"step_id": "S15", "title": "Extract order views and bounded post-order workflows", "description": "Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.\n\n- Publish reliable order lifecycle events from the monolith using the outbox pattern.\n- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.\n- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.\n- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.\n- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.\n- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.", "dependencies": ["S7", "S8", "S9", "S10", "S14"]}, {"step_id": "S16", "title": "Create cart, checkout, and payment transition architecture", "description": "Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.\n\n- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.\n- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.\n- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.\n- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.\n- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.", "dependencies": ["S7", "S8", "S9", "S10", "S11", "S12", "S13", "S15"]}, {"step_id": "S17", "title": "Transfer ownership through controlled data cutovers", "description": "Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.\n\n- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.\n- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.\n- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.\n- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.\n- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.\n- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.", "dependencies": ["S7", "S8", "S11", "S12", "S13", "S14", "S15", "S16"]}, {"step_id": "S18", "title": "Execute progressive traffic migration and rollback drills", "description": "Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.\n\n- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.\n- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.\n- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.\n- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.\n- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.", "dependencies": ["S4", "S8", "S10", "S11", "S12", "S13", "S14", "S15", "S16", "S17"]}, {"step_id": "S19", "title": "Prepare peak-season resilience and capacity certification", "description": "Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.\n\n- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.\n- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.\n- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.\n- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.\n- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.\n- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.", "dependencies": ["S4", "S5", "S8", "S11", "S12", "S13", "S16", "S18"]}, {"step_id": "S20", "title": "Retire legacy paths and establish steady-state service governance", "description": "Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.\n\n- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.\n- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.\n- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.\n- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.\n- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.\n- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.", "dependencies": ["S17", "S18", "S19"]}], "estimated_complexity": "high", "success_metrics": "- No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.\n- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.\n- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.\n- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.\n- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.\n- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.\n- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.\n- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.\n- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.\n- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.\n- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.\n- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline."}A 25-step plan that starts with monolith modularisation in place (package-level bounded contexts, branch-by-abstraction) before creating any new processes. It enforces a hard freeze calendar around sales (six weeks before, two weeks after), extracts search first as a read-heavy low-risk seam, and uses a dual-run shadow harness for pricing before any traffic shift. The plan includes explicit steps for cart-state migration, checkout canary by country and payment method, and back-office UI migration screen-by-screen.
The plan produced
1. Charter, governance and non-negotiables
Write a short migration charter that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (after 1)
Protect January and July sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (after 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (after 1)
Give every team a safe way to ship without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (after 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (after 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (after 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by risk and coupling, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (after 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith and prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (after 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (after 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (after 5, 9)
Give the monolith a reversible integration spine.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (after 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (after 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed search service.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (after 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (after 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (after 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (after 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (after 12, 14, 17)
Run the new pricing service in shadow until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (after 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (after 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (after 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (after 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (after 16, 18, 21)
Give each stable service its own schema or database only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (after 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (after 2, 22, 24)
Prove 12x capacity on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
- Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
[SYSTEM] You are an expert assistant in complex project planning. Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform. Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible. Take as much time and space as you need to think through all aspects of the problem. After your thorough analysis, answer with the plan in the requested structure. Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text. [HUMAN] Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository. Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)." Generate an initial, detailed, and well-structured plan proposal. The plan has these parts: - "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none). - "estimated_complexity": "low", "medium" or "high". - "success_metrics": clear and measurable success metrics, one per line as a bullet list. Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter, governance and non-negotiables", "description": "Write a short **migration charter** that product, ops, finance and all five teams sign.\n\nFeature work never stops. Only production risk is constrained.\n\n- Name one accountable migration lead and a weekly steering forum.\n- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.\n- Require a tested rollback for every production step.\n- Keep the two-week monolith release train for features until a domain is fully extracted.", "dependencies": []}, {"step_id": "S2", "title": "Peak calendar and freeze protocol", "description": "Protect **January and July** sales with hard engineering blackouts.\n\nNo extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.\n\n- Publish the 12-month calendar in week one.\n- Freeze means no new migration risk, not a feature freeze.\n- Require a peak capacity rehearsal before each blackout.\n- Give ops a veto on any change that could affect checkout, payments, stock or search.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Baseline architecture, data and SLOs", "description": "Measure the live system before changing it.\n\nBuild a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.\n\n- Trace the top 30 user journeys and the 350 tables they touch.\n- Record p50/p95/p99, error rates and 12x peak headroom per journey.\n- Inventory stored procedures, cross-module joins and file exchanges.\n- Tag every endpoint used by the storefront, mobile app and back-office.", "dependencies": ["S1"]}, {"step_id": "S4", "title": "Delivery platform, flags and progressive delivery", "description": "Give every team a **safe way to ship** without the 30-minute maintenance window.\n\nNew work deploys behind flags. Old work stays on the existing train until it is ready.\n\n- Add feature flags, weighted routing and instant revert at the edge.\n- Build CI that can later publish one artefact per service.\n- Keep Java 8 on the monolith. Start new services on a current LTS.\n- Provide preview environments that replay production-like traffic.", "dependencies": ["S1"]}, {"step_id": "S5", "title": "Observability and error budgets", "description": "Instrument the monolith as if it were already many services.\n\nYou cannot extract what you cannot see.\n\n- Add distributed tracing, RED metrics and structured logs with correlation IDs.\n- Define SLOs for search, PDP, cart, checkout, payments and back-office.\n- Page on error-budget burn, not on CPU.\n- Dashboards must show monolith vs new service side by side for every cutover.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Safety net: journeys, contracts and load", "description": "Raise the net where extraction will cut.\n\nUnit coverage at 25% is not enough. Protect behaviour, not lines.\n\n- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.\n- Add contract tests on every mobile and storefront endpoint.\n- Capture characterization tests around stored procedures before moving them.\n- Automate a 12x peak load test and run it before each sale and each major cutover.", "dependencies": ["S3"]}, {"step_id": "S7", "title": "Bounded contexts and extraction backlog", "description": "Draw domain boundaries from the business, not from the package tree.\n\nSequence work by **risk and coupling**, not by fashion.\n\n- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.\n- Extract read-mostly and already-async seams first (search, inventory files).\n- Leave pricing and checkout until dual-run and reconciliation exist.\n- Rank a 12-month backlog with a rollback story on every item.", "dependencies": ["S3"]}, {"step_id": "S8", "title": "Team operating model without a freeze", "description": "Keep five domain teams. Stop treating the repo as a single ownership blob.\n\nEach team ships features in the monolith **and** prepares its future service.\n\n- Assign a service to own per team, plus a shared platform pair.\n- Code owners and module walls inside the current repository first.\n- A small platform group owns gateway, flags, events, CI and data tooling.\n- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.", "dependencies": ["S1", "S7"]}, {"step_id": "S9", "title": "Modularise the monolith in place", "description": "Create seams before you create processes.\n\nNew code may not add cross-module joins or new stored-procedure coupling.\n\n- Split packages by bounded context with compile-time walls.\n- Replace in-process calls at boundaries with interfaces (branch by abstraction).\n- Document and freeze the worst pricing and checkout internals; wrap them.\n- Ban new features from reaching into another team's tables.", "dependencies": ["S6", "S7"]}, {"step_id": "S10", "title": "Strangler facade and instant traffic rollback", "description": "Put a reverse proxy in front of every public and mobile endpoint.\n\nClients keep the same URLs. You choose monolith or service per route and per percentage.\n\n- Preserve headers, sessions, cookies and the four languages.\n- Shadow traffic before any live percentage.\n- Rollback is a route change, not a redeploy, and must complete in minutes.\n- Storefront SSR and the mobile app stay compatible until a later BFF if needed.", "dependencies": ["S4", "S5"]}, {"step_id": "S11", "title": "Events, outbox and CDC backbone", "description": "Give the monolith a **reversible integration spine**.\n\nServices must not call each other's databases. They subscribe to facts.\n\n- Add an outbox in the same Postgres transaction as business writes.\n- CDC from the monolith for tables you do not yet own.\n- Standard event names for product, price, stock, customer, order and return.\n- Idempotent consumers and a dead-letter process before the first extraction.", "dependencies": ["S5", "S9"]}, {"step_id": "S12", "title": "Data-change playbook: dual-write, reconcile, roll back", "description": "Treat every data move as a campaign with an abort switch.\n\nThe 1.2 TB database stays the system of record until a service proves otherwise.\n\n- Dual-write with the monolith write winning on conflict during trial.\n- Nightly and continuous reconciliation with row-level diffs.\n- Never cut stored procedures until logic has an equivalent test harness.\n- Rollback means stop writes to the new store and keep serving from Postgres.", "dependencies": ["S11"]}, {"step_id": "S13", "title": "Extract search as the first service", "description": "Replace the nightly Lucene rebuild with an independently deployed **search service**.\n\nThis is read-heavy, already eventually consistent, and off the payment path.\n\n- Index from catalogue and price events, not from a nightly dump.\n- Shadow queries against current Lucene until precision/recall match.\n- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.\n- Keep the old index warm through the next sale as a cold standby.", "dependencies": ["S2", "S8", "S10", "S11", "S12"]}, {"step_id": "S14", "title": "Extract catalogue read models", "description": "Serve product, media and localisation from a catalogue service.\n\nWrites can stay in the monolith until editors have a new path.\n\n- Build country and language-specific read models for eight markets.\n- Keep one product identity so pricing, stock and search stay aligned.\n- Cut storefront and mobile read traffic via the strangler.\n- Do not move merchandising tools until reads are stable.", "dependencies": ["S13"]}, {"step_id": "S15", "title": "Extract identity, accounts and session", "description": "Pull login, profile, addresses and session behind a dedicated service.\n\nMobile and web keep the same auth cookies or tokens during the switch.\n\n- Migrate sessions without forced logouts.\n- Dual-read loyalty points until that domain is extracted.\n- GDPR/export and deletion flows must work in both systems.\n- Rollback restores monolith auth with no password resets.", "dependencies": ["S8", "S10", "S12"]}, {"step_id": "S16", "title": "Extract inventory and warehouse sync", "description": "Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.\n\nThe warehouse interface stays file-based until they can change. Your side becomes events.\n\n- Service owns ATP, reservations and oversell rules.\n- Adapter keeps the existing file contract so warehouse risk is zero.\n- Cart and checkout read stock from the service via API or replica.\n- Prove no extra oversell versus today's 15-minute lag before a sale.", "dependencies": ["S8", "S11", "S12"]}, {"step_id": "S17", "title": "Pricing archaeology and dual-run harness", "description": "Do not extract the 200k-line pricing module until you can prove equivalence.\n\nNobody fully understands country rules. Tests must become the spec.\n\n- Capture production price traces for all eight countries and three currencies.\n- Build a harness that replays promotions, baskets and edge SKUs.\n- Freeze behavioural snapshots; new promo features implement twice until cutover.\n- Only then wrap pricing behind an interface inside the monolith.", "dependencies": ["S6", "S9"]}, {"step_id": "S18", "title": "Extract pricing and promotions behind dual-run", "description": "Run the new pricing service in **shadow** until it matches the monolith on live baskets.\n\nCheckout keeps using monolith prices until the error budget is clean.\n\n- Compare every quote; alert on any currency, tax or promo mismatch.\n- Shift read traffic first, then write of promo usage.\n- Keep the monolith engine deployable as rollback through the next two sales.\n- Country-specific rules move last, one market at a time if needed.", "dependencies": ["S14", "S17", "S12"]}, {"step_id": "S19", "title": "Extract cart", "description": "Move the cart after identity, catalogue, stock and price reads are stable.\n\nCart is stateful. Lose no baskets during cutover.\n\n- Dual-write carts; reconcile abandoned and active baskets.\n- Preserve promo application using the dual-run price API.\n- Session migration must survive app versions in the wild.\n- Rollback reattaches baskets to the monolith cart tables.", "dependencies": ["S15", "S16", "S18"]}, {"step_id": "S20", "title": "Extract checkout and payment orchestration", "description": "Strangle checkout without touching the three payment providers in one step.\n\nA thin orchestration service talks to existing provider integrations first.\n\n- Keep PCI and provider contracts stable; wrap, do not rewrite.\n- Idempotent order placement with an outbox to OMS.\n- Canary by country and by payment method.\n- Rollback is route-plus-flag; in-flight payments complete on the old path.", "dependencies": ["S19"]}, {"step_id": "S21", "title": "Extract order management", "description": "Move post-purchase order state once checkout emits reliable events.\n\nOMS must survive 12x peaks and warehouse files.\n\n- Order of record shifts only after reconciliation is clean for a full weekly cycle.\n- Back-office screens can still read a projection while writes move.\n- Returns and finance reports stay correct during dual-run.\n- Keep monolith OMS as standby through one sale after cutover.", "dependencies": ["S20"]}, {"step_id": "S22", "title": "Extract returns, loyalty and remaining back-office", "description": "Peel remaining domains once orders and identity are independent.\n\nStaff of 300 must not get a big-bang UI change.\n\n- Returns service consumes order events and drives refunds via payment facade.\n- Loyalty becomes the owner of points with dual-write from checkout.\n- Back-office gets BFFs or modular UIs per domain, not a new monolith.\n- Train staff per screen group; keep old screens until the new ones match.", "dependencies": ["S15", "S21"]}, {"step_id": "S23", "title": "Split data ownership and retire stored procedures", "description": "Give each stable service its **own schema or database** only after traffic and reconciliation are boring.\n\nShared Postgres is allowed during transition. It is not the end state.\n\n- Move table ownership context by context; no cross-service joins.\n- Rewrite stored procedures into service code with the characterization harness.\n- Shrink the 1.2 TB monolith database as tables go dark.\n- Rollback is restoring replication to the monolith copy, practised in staging.", "dependencies": ["S16", "S18", "S21"]}, {"step_id": "S24", "title": "Independent deploy pipelines and repository split", "description": "When a service is independently releasable, stop bundling it into the fortnightly artefact.\n\nTeams ship on demand with automated checks and progressive delivery.\n\n- One pipeline per service: test, canary, promote, revert.\n- Split repos only after module walls and CI already work in the monorepo.\n- Contract tests gate consumer and provider deploys.\n- The remaining monolith keeps the old two-week train until it is small.", "dependencies": ["S8", "S23"]}, {"step_id": "S25", "title": "Peak rehearsals, chaos and residual shrink", "description": "Prove **12x capacity** on the mixed architecture before each sale.\n\nThen keep shrinking the monolith so it is a shell, not a risk.\n\n- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.\n- Scale tests on checkout, search and inventory with production-sized data.\n- Delete dead modules, jobs and tables only after two quiet weeks.\n- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.", "dependencies": ["S2", "S22", "S24"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned downtime attributed to migration work across the 12 months.\n- Every production cutover has a practised rollback that restores the previous path in minutes.\n- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.\n- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.\n- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.\n- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).\n- Golden-journey pass rate 100% on critical paths before and after each cutover.\n- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.\n- Mean time to revert a bad service release under 10 minutes via flags or routing."}A 19-step plan that starts with bounded-context decomposition and CI/CD automation, then extracts customer accounts as a pilot, followed by catalogue/search, pricing with months-long shadow comparison, inventory, cart/checkout, and orders. It inserts two explicit peak-readiness gates (steps 12 and 16) that freeze cutovers four weeks before each sales period. The plan targets 60% monolith code reduction by month 12 and requires 80% test coverage on changed code.
The plan produced
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (after 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (after 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (after 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (after 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (after 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (after 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (after 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (after 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (after 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (after 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (after 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (after 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (after 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (after 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (after 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (after 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (after 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (after 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
- 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Generate an initial, detailed, and well-structured plan proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "The structure every proposing agent must answer with.", "properties": {"steps": {"items": {"description": "One step of a proposed plan. Dependencies are step_ids of the same proposal.", "properties": {"step_id": {"title": "Step Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "dependencies": {"items": {"type": "string"}, "title": "Dependencies", "type": "array"}}, "required": ["step_id", "title", "description", "dependencies"], "title": "Step", "type": "object", "additionalProperties": false}, "title": "Steps", "type": "array"}, "estimated_complexity": {"title": "Estimated Complexity", "type": "string"}, "success_metrics": {"title": "Success Metrics", "type": "string"}}, "required": ["steps", "estimated_complexity", "success_metrics"], "title": "ProposalContent", "type": "object", "additionalProperties": false}
{"steps": [{"step_id": "S1", "title": "Baseline and decompose the monolith into bounded contexts", "description": "Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.\n- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.\n- Map business capabilities to bounded contexts and identify candidate service seams and data owners.\n- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.\n- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.\n- Create a risk register with blast radius and rollback criteria for each candidate extraction.", "dependencies": []}, {"step_id": "S2", "title": "Define target service architecture and migration sequence", "description": "Agree the target state and the guardrails before building any new service.\n- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.\n- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.\n- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.\n- Define API versioning, security, tenancy, and country-specific routing.\n- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.\n- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Establish observability, SLOs and production load testing", "description": "Make the current system measurable so cutovers are based on data, not hope.\n- Add structured logs, metrics, and distributed tracing to the monolith and future services.\n- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.\n- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.\n- Build a performance test environment that replays production-like traffic at peak 12x volume.\n- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.", "dependencies": ["S1"]}, {"step_id": "S4", "title": "Build zero-downtime CI/CD and database migration automation", "description": "This is the safety rail for every later step: frequent, reversible, low-risk deployments.\n- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.\n- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.\n- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.\n- Ensure every service change is independently deployable in minutes, with no planned maintenance window.\n- Use infrastructure-as-code and immutable artifacts for all environments.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Strengthen tests and add contract testing before cutting seams", "description": "Raise confidence in behaviour without freezing features, focusing on seams to be extracted.\n- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.\n- Add consumer-driven contract tests between the monolith and new services.\n- Introduce mutation testing and enforce at least 80% coverage on changed code.\n- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.\n- Keep a long-running dual-read and diff harness for later services.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Introduce traffic routing and feature flag platform", "description": "Enable gradual migration and instant rollback without redeploying the entire monolith.\n- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.\n- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.\n- Implement kill switches that revert to monolith paths in one action.\n- Integrate flags with SLO dashboards and deployment rollback.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Extract customer accounts and loyalty as pilot service", "description": "Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.\n- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.\n- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.\n- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.\n- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.\n- Use the pilot to refine templates, runbooks, and training for other teams.", "dependencies": ["S2", "S3", "S4", "S5", "S6"]}, {"step_id": "S8", "title": "Extract catalogue and search into a dedicated service", "description": "Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.\n- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.\n- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.\n- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.\n- Route reads progressively by country and language and validate search quality, latency, and conversion.\n- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.", "dependencies": ["S3", "S4", "S5", "S6", "S7"]}, {"step_id": "S9", "title": "Extract pricing and promotions with dual-run comparison", "description": "The most complex module; migration must be based on observed behavioural equivalence.\n- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.\n- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.\n- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.\n- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.\n- Keep the monolith promotion engine available until after all peak seasons.", "dependencies": ["S7", "S8"]}, {"step_id": "S10", "title": "Extract inventory service and modernise warehouse integration", "description": "Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.\n- Build an inventory service owning stock levels, reservations, and warehouse sync logic.\n- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.\n- Expose inventory availability and reservation APIs for cart, checkout, and back-office.\n- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.\n- Route inventory consumers to the service progressively, maintaining the monolith fallback.", "dependencies": ["S7"]}, {"step_id": "S11", "title": "Extract cart and checkout service", "description": "Move the highest-value transaction path only after its dependencies are available and proven.\n- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.\n- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.\n- Use saga or orchestration for payment, inventory reservation, and order creation.\n- Route by country, currency, and traffic percentage; start with one payment provider and one country.\n- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.", "dependencies": ["S7", "S8", "S9", "S10"]}, {"step_id": "S12", "title": "Peak readiness gate before first sales peak", "description": "Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.\n- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.\n- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.\n- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.\n- Pre-scale infrastructure to at least 30% above expected peak.\n- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.", "dependencies": ["S7", "S8", "S9", "S10", "S11"]}, {"step_id": "S13", "title": "Extract order management service after first peak", "description": "Move order persistence and lifecycle after the first peak, using events from checkout and inventory.\n- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.\n- Replace monolith order creation and status update code behind flags.\n- Backfill historical orders into the service and run reconciliation.\n- Route order read/write traffic progressively; maintain the monolith fallback.\n- Ensure returns and customer service integration remains consistent.", "dependencies": ["S11", "S12"]}, {"step_id": "S14", "title": "Extract returns service", "description": "Move returns and refunds out of the monolith once order and inventory services are stable.\n- Build a returns service owning return requests, labels, refund settlements, and status.\n- Integrate with order, inventory, and payment services via APIs and events.\n- Migrate business rules country-by-country with dual-run comparison.\n- Keep the monolith fallback and rollback for all return journeys.", "dependencies": ["S13"]}, {"step_id": "S15", "title": "Extract back-office capabilities", "description": "Decouple internal staff tools from the monolith so operations run on the new services.\n- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.\n- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.\n- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.\n- Automate manual processes and remove direct SQL access to migrated data.", "dependencies": ["S13", "S14"]}, {"step_id": "S16", "title": "Peak readiness gate before second sales peak", "description": "Repeat the readiness gate for the second peak with more services in production.\n- Freeze cutovers and irreversible migrations four weeks before and during the peak.\n- Run full production-like load test at 12x peak with current routing ratios.\n- Rehearse rollback for order management, returns, and back-office services.\n- Verify capacity headroom and failover to monolith if required.\n- Certify only if all critical SLOs are met under peak stress.", "dependencies": ["S13", "S14", "S15"]}, {"step_id": "S17", "title": "Decommission monolith code and data ownership for migrated modules", "description": "Remove the old implementation only after both peaks and after all services have proven parity.\n- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.\n- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.\n- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.\n- Run final reconciliation and zero-downtime data archival.", "dependencies": ["S16"]}, {"step_id": "S18", "title": "Final cutover, contract freeze and monolith retirement", "description": "Complete the strangler migration so the monolith stops serving business traffic.\n- Switch any remaining traffic to services and remove edge routing to the monolith.\n- Decommission monolith deployments; maintain a read-only archive for audit.\n- Finalise API contracts, versioning, and service ownership.\n- Complete security reviews and production runbooks for all services.", "dependencies": ["S17"]}, {"step_id": "S19", "title": "Continuous improvement and governance handover", "description": "Make the new architecture the default and keep it safe after migration.\n- Embed service ownership: each team owns build, deploy, and operate with SLOs.\n- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.\n- Update architecture decision records, runbooks, and onboarding material.\n- Establish a light-touch governance board for API and data contracts.", "dependencies": ["S18"]}], "estimated_complexity": "high", "success_metrics": "- 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.\n- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.\n- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.\n- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.\n- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.\n- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.\n- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.\n- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.\n- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.\n- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events."}A 20-step plan organised in seven extraction waves, targeting complete monolith retirement (zero lines in production) by month 12. It specifies concrete tooling: Debezium for CDC, Kafka for events, Elasticsearch to replace Lucene, Pact for contract tests, and Gatling/k6 for load testing. Pricing gets a dedicated six-step analysis and shadow-mode extraction (steps 13-14) with a 0.01% discrepancy threshold over two weeks before traffic shift.
The plan includes storefront BFF modernisation and a 30-day zero-traffic verification before decommissioning.
The plan produced
1. Full-Scope Discovery and Dependency Mapping
Perform a complete technical and organisational audit of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as local, cross-module read, or cross-module write.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (after 1)
Create the deployment and release-safety infrastructure that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to daily deployable by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (after 1)
Instrument the monolith so that every subsequent extraction is measurable and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (after 2)
Raise test coverage from 25 % to at least 60 % on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (after 1)
Reorganise the five teams into stream-aligned, domain-owned squads and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (after 2, 3)
Deploy an API gateway in front of the monolith that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (after 1, 4)
Prepare the 1.2 TB PostgreSQL database for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an
outboxtable, later relayed to a message broker. - Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (after 6, 7)
Stand up the messaging infrastructure that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context:
catalogue-events,order-events,inventory-events,pricing-events,customer-events. - Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context:
9. Containerisation and Kubernetes Platform Readiness (after 2, 3)
Package the monolith and prepare a Kubernetes-based runtime for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (after 4, 6, 7, 8, 9)
Carve out the lowest-risk, well-bounded domain first to validate the full extraction playbook.
- Build a new
customer-service(Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points. - Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the reference implementation for all subsequent waves.
- Build a new
11. Extract Catalogue and Search Service (Wave 2) (after 10)
Replace the nightly Lucene rebuild with a real-time search and catalogue service.
- Build a
catalogue-serviceowning product data, categories, and media references; use CDC from the monolith DB during transition. - Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
- Build a
12. Extract Inventory and Warehouse Sync Service (Wave 3) (after 10)
Isolate the inventory domain and its 15-minute file-exchange with the warehouse system.
- Build an
inventory-serviceowning stock levels, reservations, and warehouse synchronisation. - Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes
inventory-updatedevents to Kafka. - During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
- Build an
13. Deep Analysis and Rule Documentation for Pricing & Promotions (after 1)
Before touching the most complex 200 K-line module, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a
pricing-servicewith a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code. - Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (after 11, 12, 13)
Rebuild the highest-risk module as an independent service using the documented rule set from S13.
- Build a
pricing-servicewith a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java. - Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Build a
15. Extract Cart, Checkout, and Payment Service (Wave 5) (after 14)
Separate the revenue-critical checkout flow into its own service with hardened payment integration.
- Build a
checkout-serviceowning cart state, checkout orchestration, and integration with the three payment providers. - Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
- Build a
16. Extract Order Management and Returns Service (Wave 6) (after 15)
Move post-purchase order lifecycle and returns processing into a dedicated service.
- Build an
order-serviceconsumingorder-placedevents from checkout; it owns order state machine, fulfilment tracking, and returns workflow. - Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Build an
17. Extract Back-Office and Admin Portal (Wave 7) (after 16)
Deliver a modern back-office for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (after 11, 14, 15)
Update the customer-facing storefront and mobile-app integration to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (after 9, 15, 16)
Prove the platform sustains 12× peak load before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (after 16, 17, 18, 19)
Retire the legacy monolith only after all traffic is served by the new services.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
- Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
[SYSTEM] You are an expert assistant in complex project planning. Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform. Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible. Take as much time and space as you need to think through all aspects of the problem. After your thorough analysis, answer with the plan in the requested structure. Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text. [HUMAN] Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository. Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)." Generate an initial, detailed, and well-structured plan proposal. The plan has these parts: - "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none). - "estimated_complexity": "low", "medium" or "high". - "success_metrics": clear and measurable success metrics, one per line as a bullet list. Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Full-Scope Discovery and Dependency Mapping", "description": "Perform a **complete technical and organisational audit** of the monolith before any code changes.\n\n- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.\n- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.\n- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).\n- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.\n- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.\n- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.", "dependencies": []}, {"step_id": "S2", "title": "Build CI/CD Pipelines and Feature-Flag Platform", "description": "Create the **deployment and release-safety infrastructure** that every later step depends on.\n\n- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.\n- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.\n- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.\n- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.\n- Target: reduce the two-week release cycle to **daily deployable** by end of this step.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Establish Observability, Tracing, and SLO Baseline", "description": "Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.\n\n- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).\n- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.\n- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.\n- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.\n- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.", "dependencies": ["S1"]}, {"step_id": "S4", "title": "Automated Testing Uplift and Contract-Test Foundation", "description": "Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.\n\n- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.\n- Add integration tests using Testcontainers with a seeded copy of the production schema.\n- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.\n- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.\n- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Team Topology Realignment and Governance Model", "description": "Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.\n\n- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.\n- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.\n- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.\n- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.\n- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.", "dependencies": ["S1"]}, {"step_id": "S6", "title": "Strangler-Fig Gateway and Anti-Corruption Layer", "description": "Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.\n\n- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.\n- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.\n- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.\n- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.\n- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.", "dependencies": ["S2", "S3"]}, {"step_id": "S7", "title": "Database Decomposition Strategy and Shared-Data Refactor", "description": "Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.\n\n- Classify all 350 tables by bounded context using the dependency map from S1.\n- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.\n- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.\n- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.\n- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.\n- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.", "dependencies": ["S1", "S4"]}, {"step_id": "S8", "title": "Event-Driven Backbone and Async Messaging Layer", "description": "Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.\n\n- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.\n- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.\n- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.\n- Add idempotent consumer patterns and dead-letter queues from day one.\n- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.", "dependencies": ["S6", "S7"]}, {"step_id": "S9", "title": "Containerisation and Kubernetes Platform Readiness", "description": "Package the monolith and prepare a **Kubernetes-based runtime** for all future services.\n\n- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.\n- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.\n- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.\n- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.\n- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.", "dependencies": ["S2", "S3"]}, {"step_id": "S10", "title": "Extract Customer Accounts and Loyalty Service (Wave 1)", "description": "Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.\n\n- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.\n- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.\n- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.\n- The monolith continues to serve as fallback; a single flag flip routes 100 % back.\n- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.\n- This extraction serves as the **reference implementation** for all subsequent waves.", "dependencies": ["S4", "S6", "S7", "S8", "S9"]}, {"step_id": "S11", "title": "Extract Catalogue and Search Service (Wave 2)", "description": "Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.\n\n- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.\n- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.\n- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.\n- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.\n- Keep the legacy Lucene index warm for instant rollback for 60 days.\n- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.", "dependencies": ["S10"]}, {"step_id": "S12", "title": "Extract Inventory and Warehouse Sync Service (Wave 3)", "description": "Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.\n\n- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.\n- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.\n- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.\n- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.\n- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.\n- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.", "dependencies": ["S10"]}, {"step_id": "S13", "title": "Deep Analysis and Rule Documentation for Pricing & Promotions", "description": "Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.\n\n- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.\n- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.\n- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).\n- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.\n- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.\n- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.", "dependencies": ["S1"]}, {"step_id": "S14", "title": "Extract Pricing and Promotions Service (Wave 4)", "description": "Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.\n\n- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.\n- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).\n- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.\n- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.\n- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.\n- Assign dedicated on-call coverage for the first 30 days post-cutover.", "dependencies": ["S11", "S12", "S13"]}, {"step_id": "S15", "title": "Extract Cart, Checkout, and Payment Service (Wave 5)", "description": "Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.\n\n- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.\n- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.\n- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.\n- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.\n- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.\n- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.", "dependencies": ["S14"]}, {"step_id": "S16", "title": "Extract Order Management and Returns Service (Wave 6)", "description": "Move **post-purchase order lifecycle and returns processing** into a dedicated service.\n\n- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.\n- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.\n- Back-office order views call the new service API through the gateway; legacy views remain as fallback.\n- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.\n- Validate that the returns process (including cross-border returns across the 8 countries) works identically.\n- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.", "dependencies": ["S15"]}, {"step_id": "S17", "title": "Extract Back-Office and Admin Portal (Wave 7)", "description": "Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.\n\n- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.\n- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.\n- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.\n- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.\n- Decommission legacy admin screens only after 30 days of zero critical issues.\n- Provide training sessions and documentation for all 300 back-office users.", "dependencies": ["S16"]}, {"step_id": "S18", "title": "Storefront Modernisation and Mobile-App API Alignment", "description": "Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.\n\n- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.\n- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.\n- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.\n- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.\n- Validate all 4 language / 3 currency combinations through automated E2E tests.\n- Rollback: gateway routes storefront traffic back to the monolith rendering path.", "dependencies": ["S11", "S14", "S15"]}, {"step_id": "S19", "title": "Peak-Season Load Testing and Resilience Validation", "description": "Prove the platform sustains **12× peak load** before the January and July sales windows.\n\n- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.\n- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.\n- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.\n- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.\n- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.\n- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).", "dependencies": ["S9", "S15", "S16"]}, {"step_id": "S20", "title": "Monolith Decommission and Final Data Migration", "description": "Retire the legacy monolith **only after all traffic is served by the new services**.\n\n- Verify that zero production requests route to the monolith for 30 consecutive days.\n- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.\n- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.\n- Decommission monolith infrastructure; reclaim compute and storage resources.\n- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.\n- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.", "dependencies": ["S16", "S17", "S18", "S19"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.\n- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.\n- Deployment frequency increases from bi-weekly to at least daily per service by month 4.\n- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.\n- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.\n- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.\n- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.\n- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.\n- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.\n- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.\n- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.\n- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme."}Round 1 — refinement 1 of 4
All five proposals converged strongly toward a shared architecture: strangler gateway, event backbone with outbox/CDC, pricing archaeology before extraction, dual peak-readiness gates, and honest acknowledgment that full monolith retirement may not be achievable in 12 months. The refinement round produced materially better plans overall, with Proposals 2 and 3 standing out for risk realism and Proposal 1 remaining the weakest due to overly aggressive scope commitments. The principal divergence remaining is whether the 12-month target demands full monolith decommission (Proposals 1, 5) or accepts a residual monolith behind façades (Proposals 2, 3).
The calls of this round
Influences: who took what from whom
| Round 1 ↓ · round 0 → | Proposal 1 | Proposal 2 | Proposal 3 | Proposal 4 | Proposal 5 | New steps |
|---|---|---|---|---|---|---|
| Proposal 1 |
kept4 | same titles2 analyst sees+2 / −1 | same titles2 analyst sees+2 / −1 | same titles4 analyst sees+1 / −0 | same titles3 analyst sees+1 / −0 | new8 |
| Proposal 2 |
same titles1 analyst sees+1 / −1 | kept6 | same titles2 analyst sees+2 / −0 | same titles1 analyst sees+1 / −0 | same titles0 analyst sees+0 / −1 | new12 |
| Proposal 3 |
same titles0 analyst sees+0 / −1 | same titles4 analyst sees+4 / −0 | kept10 | same titles0 analyst sees+0 / −0 | same titles0 analyst sees+0 / −1 | new9 |
| Proposal 4 |
same titles0 analyst sees+0 / −0 | same titles2 analyst sees+2 / −0 | same titles3 analyst sees+3 / −1 | kept8 | same titles1 analyst sees+1 / −0 | new9 |
| Proposal 5 |
same titles1 analyst sees+1 / −0 | same titles7 analyst sees+7 / −1 | same titles3 analyst sees+3 / −1 | same titles3 analyst sees+3 / −0 | kept8 | new0 |
The proposal adopted the governance-and-peak-calendar framing, pricing archaeology workstream, and warehouse adapter pattern from other round-0 proposals, which are genuine improvements. However, it retained unrealistic end-state commitments: decommissioning the monolith to under 100k lines and assigning all 350 tables to single services by month 12. The step descriptions are thin compared to peers, and the sequencing still places cart/checkout extraction after only one peak gate, compressing the riskiest work into the final quarter.
- Added explicit peak-season blackout protocol (step 1) with named freeze windows, adopted from Proposals 2 and 3.
- Introduced a dedicated pricing archaeology workstream (step 10) running in parallel with infrastructure, matching the approach of Proposals 3 and 5.
- Added a warehouse adapter step (step 11) that preserves the existing file contract, borrowed from Proposal 2's step 12.
- Added two explicit peak readiness gates (steps 14, 18) rather than a single end-of-programme test.
- Success metrics now include pricing parity at 99.99% and reconciliation thresholds, aligning with Proposal 2's rigor.
- Still commits to reducing the monolith to under 100k lines and decommissioning it fully by month 12, which contradicts the honest-scope lesson adopted by Proposals 2 and 3.
- Step descriptions are one-to-two sentences each, far less detailed than the 5–10 bullet sub-steps in Proposals 2, 3, and 5, making execution guidance vague.
- Cart/checkout extraction (step 19) depends only on peak gate 2, leaving no explicit failure-mode analysis or compensation-path design step before touching the revenue path.
- No explicit step for monolith modularisation or architecture tests before extraction begins; step 7 mentions it in one sentence but provides no mechanism.
- Proposal 2 : Sales-protection windows with a six-week freeze before and two weeks after January/July peaks.
- Proposal 2 : Warehouse adapter that preserves the existing file contract while publishing inventory events.
- Proposal 3 : Pricing archaeology: capture production decision traces and build a golden-master corpus before any extraction.
- Proposal 3 : Dual-run shadow comparison for pricing with a discrepancy threshold before live traffic.
- Proposal 4 : Feature-flag platform and progressive delivery as a prerequisite for all extractions.
- Proposal 5 : Shadow-mode pricing comparison with a 4–6 week observation window and 0.01% discrepancy gate.
- Proposal 2 : Explicit statement that full monolith retirement is not a 12-month promise and that pricing/checkout may remain behind façades.
- Proposal 3 : Honest 12-month scope: independently deployable services are the goal; full monolith retirement is not promised.
+ Migration charter, governance, and peak-season blackout protocol+ Baseline the monolith: architecture, data, and operational risk+ Define target bounded contexts and data ownership model+ Build CI/CD, feature flags, and progressive-delivery platform+ Stabilise and modularise the monolith in place+ Deploy event-driven backbone: Kafka, outbox pattern, and CDC+ Deploy API gateway and traffic-routing layer with instant rollback+ Discover, document, and freeze pricing and promotions rules (parallel workstream)+ Modernise warehouse integration: adapter for existing file exchange+ Wave 1: Extract search service (read-only, nightly-batch replacement)+ Peak readiness gate 1: before January/July peak (if in window)+ Wave 2: Extract inventory service with warehouse adapter+ Peak readiness gate 2: before second major peak (July if first was January)+ Final peak readiness validation and chaos engineering+ Retire legacy paths, decommission monolith, and establish steady-state governanceFull-Scope Discovery and Dependency MappingBuild CI/CD Pipelines and Feature-Flag PlatformTeam Topology Realignment and Governance ModelStrangler-Fig Gateway and Anti-Corruption LayerDatabase Decomposition Strategy and Shared-Data RefactorEvent-Driven Backbone and Async Messaging LayerContainerisation and Kubernetes Platform ReadinessExtract Inventory and Warehouse Sync Service (Wave 3)Deep Analysis and Rule Documentation for Pricing & PromotionsStorefront Modernisation and Mobile-App API AlignmentPeak-Season Load Testing and Resilience ValidationMonolith Decommission and Final Data Migration
The plan produced
1. Migration charter, governance, and peak-season blackout protocol new
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (after 1) from P2 step 2
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (after 2) new
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (after 1) new
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (after 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (after 2, 5) from P4 step 5
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (after 6) from P3 step 9
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (after 3, 4) new
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (after 4, 7) new
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (after 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country.
Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (after 8) new
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes
inventory-updatedevents to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.12. Wave 1: Extract search service (read-only, nightly-batch replacement) (after 8, 9, 10) new
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (after 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (after 13) from P4 step 16
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (after 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (after 11, 15) from P4 step 10
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout.
Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (after 10, 13, 16) from P5 step 14
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service.
A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (after 17) from P4 step 16
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (after 18) from P3 step 20
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys.
Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%.
Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (after 19) from P5 step 16
Build an order service consuming
order-placedevents from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window.Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (after 20) from P5 step 17
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible.
Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (after 21) new
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR.
Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business.
This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (after 22) from P2 step 20
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days.
Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans.
Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
- Zero unplanned downtime attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- Every extraction step is reversible within 5 minutes via flag rollback or route change, validated at least once in production before full cutover.
- Peak-season capacity guaranteed: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- By end of month 12: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- Database decomposition complete: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- Monolith code reduced from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- Test coverage on migrated code paths reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- Deployment velocity transformed: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- Pricing and promotions parity maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- Payment processing resilience: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Data consistency and reconciliation: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- Feature delivery continues uninterrupted: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- Back-office continuity: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- Mean time to recover (MTTR) for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- Warehouse integration modernised: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 655fdafb-56dd-4ad6-bd0f-4bb657813959, Agent: claudeHaiku4.5_initial_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
Previous Proposal 2 (ID: 5f35320e-40bf-4797-a282-13ff94f785f1, Agent: gpt-5.6-terra_initial_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
Previous Proposal 3 (ID: b39f2a46-559f-4920-9664-540fcdb612f4, Agent: grok-4.6_initial_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
Previous Proposal 4 (ID: 9219a465-1887-4823-81a8-3cbfc3bb545b, Agent: deepseek-v4-pro_initial_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
Previous Proposal 5 (ID: 733858cb-4dad-4bb6-85c9-79a3e6d968d9, Agent: qwen3.8-max_initial_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Migration charter, governance, and peak-season blackout protocol", "description": "Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the monolith: architecture, data, and operational risk", "description": "Map the entire system before making changes. Document current state to become the rollback reference for every step.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target bounded contexts and data ownership model", "description": "Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build CI/CD, feature flags, and progressive-delivery platform", "description": "Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.", "dependencies": ["S1"]}, {"step_id": "S5", "title": "Establish observability: structured logs, metrics, tracing, and SLOs", "description": "Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.", "dependencies": ["S4"]}, {"step_id": "S6", "title": "Strengthen tests and establish contract-testing foundation", "description": "Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.", "dependencies": ["S2", "S5"]}, {"step_id": "S7", "title": "Stabilise and modularise the monolith in place", "description": "Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.", "dependencies": ["S6"]}, {"step_id": "S8", "title": "Deploy event-driven backbone: Kafka, outbox pattern, and CDC", "description": "Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.", "dependencies": ["S3", "S4"]}, {"step_id": "S9", "title": "Deploy API gateway and traffic-routing layer with instant rollback", "description": "Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.", "dependencies": ["S4", "S7"]}, {"step_id": "S10", "title": "Discover, document, and freeze pricing and promotions rules (parallel workstream)", "description": "Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.", "dependencies": ["S2"]}, {"step_id": "S11", "title": "Modernise warehouse integration: adapter for existing file exchange", "description": "Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.", "dependencies": ["S8"]}, {"step_id": "S12", "title": "Wave 1: Extract search service (read-only, nightly-batch replacement)", "description": "Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.", "dependencies": ["S8", "S9", "S10"]}, {"step_id": "S13", "title": "Wave 1: Extract catalogue read service", "description": "Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.", "dependencies": ["S12"]}, {"step_id": "S14", "title": "Peak readiness gate 1: before January/July peak (if in window)", "description": "If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.", "dependencies": ["S13"]}, {"step_id": "S15", "title": "Wave 2: Extract customer and identity service", "description": "Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.", "dependencies": ["S13", "S14"]}, {"step_id": "S16", "title": "Wave 2: Extract inventory service with warehouse adapter", "description": "Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.", "dependencies": ["S15", "S11"]}, {"step_id": "S17", "title": "Wave 2: Extract pricing and promotions service (shadow mode, months 4–8)", "description": "Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.", "dependencies": ["S10", "S13", "S16"]}, {"step_id": "S18", "title": "Peak readiness gate 2: before second major peak (July if first was January)", "description": "Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.", "dependencies": ["S17"]}, {"step_id": "S19", "title": "Wave 3: Extract cart and checkout (with payment provider integration)", "description": "Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.", "dependencies": ["S18"]}, {"step_id": "S20", "title": "Wave 3: Extract order management and returns", "description": "Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.", "dependencies": ["S19"]}, {"step_id": "S21", "title": "Extract back-office and modernise staff portal (300 users, 8 countries)", "description": "Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.", "dependencies": ["S20"]}, {"step_id": "S22", "title": "Final peak readiness validation and chaos engineering", "description": "Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.", "dependencies": ["S21"]}, {"step_id": "S23", "title": "Retire legacy paths, decommission monolith, and establish steady-state governance", "description": "After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.", "dependencies": ["S22"]}], "estimated_complexity": "high", "success_metrics": "\n- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.\n- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.\n- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.\n- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.\n- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.\n- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.\n- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.\n- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.\n- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.\n- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.\n- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.\n- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.\n- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.\n- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.\n- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes."}The refinement sharpened the proposal's already strong risk discipline by adding an explicit peak calendar step (step 4), a dedicated payment-adapter step (step 16) separated from checkout, and a clearer back-office migration path (step 20). The 12-month scope is now explicitly bounded: façades and proven slices count as success, and a funded follow-on roadmap covers anything not safely transferred. The step count dropped from 20 to 22 but each step gained more actionable sub-bullets and clearer entry/exit criteria.
- Added step 4 (peak calendar and release-control policy) making the January/July constraint an executable artefact with permitted-work definitions.
- Separated payment-provider adapters (step 16) from checkout orchestration (step 18), reducing blast radius and allowing provider isolation before touching the transaction path.
- Added step 20 for incremental back-office migration by workflow and role, with parallel operation and training.
- Step 3 now explicitly defines a year-one exit scope and states that legacy pricing and order creation may remain behind façades.
- Step 19 (data ownership cutovers) adds automatic halt on reconciliation threshold breach and explicit prohibition on deleting data during initial transfer.
- Success metrics now include 'no first-time cutover inside sales-protection windows' as a measurable constraint.
- Step count increased from 20 to 22, adding some structural complexity without adding new domain coverage.
- The proposal no longer has a single explicit 'select and sequence extraction waves' step; sequencing is now distributed across steps 11–18, making the overall wave structure slightly harder to read at a glance.
- Proposal 1 : Event-driven pricing and cart synchronisation: publish promotion lifecycle events and have cart recalculate totals.
- Proposal 3 : Hard engineering blackout: no extractions, schema splits, or traffic switches in the six weeks before a sale.
- Proposal 3 : Modularise the monolith in place with compile-time architecture tests and a ban on new cross-module joins.
- Proposal 4 : Production-like staging environment with payment-provider and warehouse-file simulators.
- Proposal 1 : Full monolith decommission to under 100k lines by month 12.
- Proposal 5 : Monolith codebase reduced to 0 lines in production by end of month 12.
+ Launch the migration programme and protect revenue+ Establish the factual baseline and critical invariants+ Set target boundaries and realistic 12-month scope+ Create the peak calendar and release-control policy+ Build the paved road for independently deployable services+ Stabilise and modularise the live monolith+ Implement governed events, replication, and reconciliation+ Build risk-weighted quality and capacity assurance+ Contain pricing and promotions through archaeology and a façade+ Introduce payment-provider adapters and financial reconciliation+ Move proven pricing slices and prepare cart and checkout façades+ Progressively migrate cart and checkout orchestration+ Transfer data ownership one entity group at a time+ Migrate back-office workflows incrementally+ Certify hybrid peak readiness and rehearse reversions+ Consolidate proven services and hand over sustainable operationsEstablish migration governance and delivery modelDefine target architecture and domain boundariesCreate production safety foundationsBuild secure delivery and runtime platformImprove monolith safety while it remains liveImplement integration, event, and data-transition patternsCreate quality, performance, and release assuranceSelect and sequence extraction wavesDiscover and contain pricing and promotionsCreate cart, checkout, and payment transition architectureTransfer ownership through controlled data cutoversExecute progressive traffic migration and rollback drillsPrepare peak-season resilience and capacity certificationRetire legacy paths and establish steady-state service governance
The plan produced
1. Launch the migration programme and protect revenue new
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (after 1) new
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (after 2) new
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (after 1, 2) from P3 step 2
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (after 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (after 3, 5) new
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (after 2, 5, 6) from P3 step 9
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (after 3, 6, 7) from P1 step 15
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (after 2, 5, 6, 8) new
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (after 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (after 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (after 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (after 2, 7, 8, 9, 10) new
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (after 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (after 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (after 8, 9, 10, 15) new
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (after 11, 12, 13, 14, 15, 16) new
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (after 4, 9, 12, 16, 17) from P4 step 11
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (after 8, 11, 12, 14, 15, 17, 18) new
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (after 11, 12, 14, 15, 19) new
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (after 4, 5, 9, 11, 12, 16, 18) new
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (after 19, 20, 21) new
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
- No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 655fdafb-56dd-4ad6-bd0f-4bb657813959, Agent: claudeHaiku4.5_initial_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
Previous Proposal 2 (ID: 5f35320e-40bf-4797-a282-13ff94f785f1, Agent: gpt-5.6-terra_initial_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
Previous Proposal 3 (ID: b39f2a46-559f-4920-9664-540fcdb612f4, Agent: grok-4.6_initial_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
Previous Proposal 4 (ID: 9219a465-1887-4823-81a8-3cbfc3bb545b, Agent: deepseek-v4-pro_initial_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
Previous Proposal 5 (ID: 733858cb-4dad-4bb6-85c9-79a3e6d968d9, Agent: qwen3.8-max_initial_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Launch the migration programme and protect revenue", "description": "Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.\n\n- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.\n- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.\n- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.\n- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.\n- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.", "dependencies": []}, {"step_id": "S2", "title": "Establish the factual baseline and critical invariants", "description": "Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.\n\n- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.\n- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.\n- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.\n- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.\n- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set target boundaries and realistic 12-month scope", "description": "Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.\n\n- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.\n- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.\n- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.\n- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.\n- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Create the peak calendar and release-control policy", "description": "Turn the January and July constraint into an executable calendar and change policy.\n\n- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.\n- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.\n- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.\n- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.\n- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.", "dependencies": ["S1", "S2"]}, {"step_id": "S5", "title": "Instrument the monolith and define operational objectives", "description": "Make the existing estate observable before any production traffic is moved.\n\n- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.\n- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.\n- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.\n- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.\n- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.", "dependencies": ["S2", "S3"]}, {"step_id": "S6", "title": "Build the paved road for independently deployable services", "description": "Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.\n\n- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.\n- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.\n- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.\n- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.\n- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.", "dependencies": ["S3", "S5"]}, {"step_id": "S7", "title": "Stabilise and modularise the live monolith", "description": "Make the monolith safer to coexist with services while preserving feature delivery.\n\n- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.\n- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.\n- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.\n- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.", "dependencies": ["S2", "S5", "S6"]}, {"step_id": "S8", "title": "Implement governed events, replication, and reconciliation", "description": "Build reusable coexistence patterns before moving any data or command responsibility.\n\n- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.\n- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.\n- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.\n- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.", "dependencies": ["S3", "S6", "S7"]}, {"step_id": "S9", "title": "Build risk-weighted quality and capacity assurance", "description": "Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.\n\n- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.\n- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.\n- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.\n- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.\n- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.", "dependencies": ["S2", "S5", "S6", "S8"]}, {"step_id": "S10", "title": "Introduce edge routing and stable channel façades", "description": "Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.\n\n- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.\n- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.\n- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.\n- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.\n- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.", "dependencies": ["S5", "S6", "S7", "S9"]}, {"step_id": "S11", "title": "Extract catalogue reads and modernise search", "description": "Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.\n\n- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.\n- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.\n- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.\n- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.\n- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.", "dependencies": ["S4", "S8", "S9", "S10"]}, {"step_id": "S12", "title": "Modernise warehouse integration and inventory availability reads", "description": "Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.\n\n- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.\n- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.\n- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.\n- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.", "dependencies": ["S4", "S8", "S9", "S10"]}, {"step_id": "S13", "title": "Contain pricing and promotions through archaeology and a façade", "description": "Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.\n\n- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.\n- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.\n- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.\n- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.\n- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.", "dependencies": ["S2", "S7", "S8", "S9", "S10"]}, {"step_id": "S14", "title": "Extract customer, consent, and bounded loyalty capabilities", "description": "Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.\n\n- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.\n- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.\n- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.\n- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.\n- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.", "dependencies": ["S8", "S9", "S10"]}, {"step_id": "S15", "title": "Extract order views and bounded post-order workflows", "description": "Create order-domain value without splitting the revenue-critical order-creation transaction too early.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox pattern.\n- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.\n- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.\n- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.\n- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.", "dependencies": ["S8", "S9", "S10", "S12", "S14"]}, {"step_id": "S16", "title": "Introduce payment-provider adapters and financial reconciliation", "description": "Isolate provider-specific complexity before changing checkout orchestration or payment ownership.\n\n- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.\n- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.\n- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.\n- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.\n- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.", "dependencies": ["S8", "S9", "S10", "S15"]}, {"step_id": "S17", "title": "Move proven pricing slices and prepare cart and checkout façades", "description": "Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.\n\n- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.\n- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.\n- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.\n- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.\n- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.", "dependencies": ["S11", "S12", "S13", "S14", "S15", "S16"]}, {"step_id": "S18", "title": "Progressively migrate cart and checkout orchestration", "description": "Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.\n\n- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.\n- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.\n- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.", "dependencies": ["S4", "S9", "S12", "S16", "S17"]}, {"step_id": "S19", "title": "Transfer data ownership one entity group at a time", "description": "Perform write cutovers as controlled state transitions, not as a one-time database split.\n\n- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.\n- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.\n- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.\n- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.\n- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.", "dependencies": ["S8", "S11", "S12", "S14", "S15", "S17", "S18"]}, {"step_id": "S20", "title": "Migrate back-office workflows incrementally", "description": "Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.\n\n- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.\n- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.\n- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.\n- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.", "dependencies": ["S11", "S12", "S14", "S15", "S19"]}, {"step_id": "S21", "title": "Certify hybrid peak readiness and rehearse reversions", "description": "Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.\n\n- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.\n- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.\n- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.\n- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.\n- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.", "dependencies": ["S4", "S5", "S9", "S11", "S12", "S16", "S18"]}, {"step_id": "S22", "title": "Consolidate proven services and hand over sustainable operations", "description": "Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.\n\n- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.\n- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.\n- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.\n- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.\n- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.", "dependencies": ["S19", "S20", "S21"]}], "estimated_complexity": "high", "success_metrics": "- No unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.\n- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.\n- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.\n- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.\n- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.\n- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.\n- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.\n- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.\n- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.\n- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.\n- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline."}The refinement consolidated the original 25 steps into 23 with tighter grouping and added two explicit peak-certification steps (21, 22) that were previously implicit. The honest-scope position is now stated bluntly in step 3: 'Full monolith retirement is not a 12-month promise.' The pricing section (steps 15–16) is sharper, separating archaeology from dual-run slice migration. The team model step (4) now specifies a 50/30/20 capacity split, making the no-freeze commitment concrete.
- Two explicit peak-certification steps (21, 22) with game-day scenarios, formal go/no-go, and monolith-reversion load tests.
- Step 3 now states explicitly that pricing engine, checkout write path, and core OMS may still delegate to the monolith at month 12.
- Step 4 adds a concrete 50/30/20 capacity split and names the platform-pair role.
- Step 10 adds entity transition states (monolith-owned → replicated read → dual-read → service-owned → retired) as a governance model.
- Step 20 (single-writer ownership cutovers) adds automatic halt on reconciliation breach and explicit stored-procedure retirement criteria.
- Success metrics now include mobile/storefront endpoint compatibility and warehouse file-contract preservation as measurable constraints.
- The original proposal's explicit 'Extract cart' and 'Extract checkout' steps (19, 20) are merged into a single step 18, losing some granularity on cart-state migration and session handling.
- The original's step 22 (returns, loyalty, back-office) is split across steps 17 and 23 but the back-office migration path is less detailed than in Proposal 2's step 20 or Proposal 5's step 18.
- Proposal 2 : Transition states for each entity: monolith-owned, replicated read model, shadow-validated, service-owned, legacy-retired.
- Proposal 2 : Warehouse adapter that validates, deduplicates, and acknowledges files without changing the warehouse contract.
- Proposal 2 : Load-test traffic reversion to the monolith and confirm the monolith can absorb reverted load.
- Proposal 2 : Formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and support.
- Proposal 1 : Full monolith decommission and reduction to under 100k lines by month 12.
- Proposal 5 : Monolith codebase reduced to 0 lines in production by end of month 12.
+ Baseline the live system and business invariants+ Target architecture and honest 12-month scope+ Team model that keeps features flowing+ Inventory adapter and availability reads+ Customer, session and loyalty with GDPR+ Dual-run only proven pricing slices+ Order query, notifications and returns slices+ Checkout façade and payment adapters+ Independent pipelines after the first service is real+ Single-writer ownership cutovers+ First peak-season certification+ Second peak-season certification+ Shrink the monolith and hand over governancePeak calendar and freeze protocolBaseline architecture, data and SLOsBounded contexts and extraction backlogTeam operating model without a freezeData-change playbook: dual-write, reconcile, roll backExtract identity, accounts and sessionExtract inventory and warehouse syncExtract pricing and promotions behind dual-runExtract cartExtract checkout and payment orchestrationExtract order managementExtract returns, loyalty and remaining back-officeSplit data ownership and retire stored proceduresIndependent deploy pipelines and repository splitPeak rehearsals, chaos and residual shrink
The plan produced
1. Charter, peak calendar and non-negotiables
Write a short migration charter that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (after 1) new
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (after 2) from P2 step 3
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (after 1, 3) new
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (after 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on error-budget burn and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (after 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (after 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (after 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (after 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a route change, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (after 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (after 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (after 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (after 9, 10) from P2 step 12
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (after 9, 10) new
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (after 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (after 10, 12, 15) new
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (after 10, 14) new
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (after 12, 13, 16, 17) new
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (after 6, 11) new
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (after 10, 11, 12, 13, 14, 16, 17, 18) new
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (after 7, 9, 11, 13) from P2 step 19
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (after 16, 18, 21) from P2 step 19
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (after 19, 20, 22) new
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
- Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 655fdafb-56dd-4ad6-bd0f-4bb657813959, Agent: claudeHaiku4.5_initial_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
Previous Proposal 2 (ID: 5f35320e-40bf-4797-a282-13ff94f785f1, Agent: gpt-5.6-terra_initial_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
Previous Proposal 3 (ID: b39f2a46-559f-4920-9664-540fcdb612f4, Agent: grok-4.6_initial_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
Previous Proposal 4 (ID: 9219a465-1887-4823-81a8-3cbfc3bb545b, Agent: deepseek-v4-pro_initial_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
Previous Proposal 5 (ID: 733858cb-4dad-4bb6-85c9-79a3e6d968d9, Agent: qwen3.8-max_initial_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter, peak calendar and non-negotiables", "description": "Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.\n\n- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.\n- Require a rehearsed rollback for every production step, with named rollback authority.\n- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.\n- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live system and business invariants", "description": "Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.\n\n- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.\n- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.\n- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.\n- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.\n- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Target architecture and honest 12-month scope", "description": "Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.\n\n- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.\n- One system of record per entity. Consumers may replicate data. They must not write another service’s database.\n- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.\n- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Team model that keeps features flowing", "description": "Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.\n\n- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.\n- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.\n- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.\n- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.", "dependencies": ["S1", "S3"]}, {"step_id": "S5", "title": "Observability and error budgets on the monolith", "description": "Instrument the monolith as if it were already many services. You cannot extract what you cannot see.\n\n- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.\n- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.\n- Page on **error-budget burn** and business failures, not only on CPU.\n- Build side-by-side dashboards for monolith versus candidate service on every cutover.\n- Add immutable audit events for price changes, payments, stock adjustments and admin actions.", "dependencies": ["S2"]}, {"step_id": "S6", "title": "Flags, CI and progressive delivery paved road", "description": "Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.\n\n- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.\n- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.\n- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.\n- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.\n- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S7", "title": "Safety net: journeys, contracts and 12x load", "description": "Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.\n- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.\n- Capture characterisation tests around stored procedures and pricing before moving them.\n- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.", "dependencies": ["S2", "S5", "S6"]}, {"step_id": "S8", "title": "Modularise the monolith in place", "description": "Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.\n\n- Split packages by bounded context with compile-time architecture tests.\n- Replace in-process calls at boundaries with interfaces. Branch by abstraction.\n- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.\n- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.\n- Raise regression coverage on any module before it is touched.", "dependencies": ["S3", "S7"]}, {"step_id": "S9", "title": "Strangler edge with instant traffic rollback", "description": "Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.\n\n- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.\n- Route by path, country, cohort, flag and percentage. Default remains the monolith.\n- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.\n- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.\n- Storefront SSR and the mobile app stay compatible until a later BFF if needed.", "dependencies": ["S5", "S6", "S7"]}, {"step_id": "S10", "title": "Events, outbox, CDC and reconciliation spine", "description": "Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.\n\n- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.\n- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.\n- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.\n- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.\n- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.", "dependencies": ["S5", "S8"]}, {"step_id": "S11", "title": "Extract search as the first service", "description": "Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.\n\n- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.\n- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.\n- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.\n- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.", "dependencies": ["S9", "S10"]}, {"step_id": "S12", "title": "Extract catalogue read models", "description": "Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.\n\n- Build country and language read models for eight markets around one product identity.\n- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.\n- Cut storefront and mobile read traffic via the strangler after shadow comparison.\n- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.", "dependencies": ["S11"]}, {"step_id": "S13", "title": "Inventory adapter and availability reads", "description": "Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.\n\n- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.\n- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.\n- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.\n- Leave reservation and allocation authority in the monolith until order ownership is designed.\n- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.", "dependencies": ["S9", "S10"]}, {"step_id": "S14", "title": "Customer, session and loyalty with GDPR", "description": "Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.\n\n- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.\n- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.\n- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.\n- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.", "dependencies": ["S9", "S10"]}, {"step_id": "S15", "title": "Pricing archaeology, golden masters and façade", "description": "Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.\n\n- Cross-functional squad: engineers, merchandising, finance, country ops and QA.\n- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.\n- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.\n- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.\n- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.", "dependencies": ["S2", "S7", "S8"]}, {"step_id": "S16", "title": "Dual-run only proven pricing slices", "description": "Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.\n\n- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.\n- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.\n- Shift read traffic first, then promo-usage writes, country by country if needed.\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S10", "S12", "S15"]}, {"step_id": "S17", "title": "Order query, notifications and returns slices", "description": "Create independently deployable order value without splitting the transactional checkout path yet.\n\n- Publish reliable order lifecycle events from the monolith outbox.\n- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.\n- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.\n- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.\n- Reconcile counts, states, refunds, returns and event lag continuously.", "dependencies": ["S10", "S14"]}, {"step_id": "S18", "title": "Checkout façade and payment adapters", "description": "Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.\n\n- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.\n- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.\n- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.\n- Canary by country and payment method. In-flight payments complete on the old path if you roll back.\n- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.", "dependencies": ["S12", "S13", "S16", "S17"]}, {"step_id": "S19", "title": "Independent pipelines after the first service is real", "description": "When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.\n\n- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.\n- Split repos only after module walls and CI already work in the monorepo.\n- Target at least weekly independent releases, then daily where risk is low.\n- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.", "dependencies": ["S6", "S11"]}, {"step_id": "S20", "title": "Single-writer ownership cutovers", "description": "Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.\n\n- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.\n- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.\n- Halt traffic expansion automatically on reconciliation or SLO thresholds.\n- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.", "dependencies": ["S10", "S11", "S12", "S13", "S14", "S16", "S17", "S18"]}, {"step_id": "S21", "title": "First peak-season certification", "description": "Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers in the protection window. Feature work may continue behind flags.\n- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.\n- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.\n- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.\n- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.", "dependencies": ["S7", "S9", "S11", "S13"]}, {"step_id": "S22", "title": "Second peak-season certification", "description": "Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.\n\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.\n- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale, agree provider rate limits and staff a war room.\n- After the sale, compare actuals to forecasts and freeze lessons into the next wave.", "dependencies": ["S16", "S18", "S21"]}, {"step_id": "S23", "title": "Shrink the monolith and hand over governance", "description": "Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.\n\n- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.\n- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.\n- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.\n- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.", "dependencies": ["S19", "S20", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributed to migration work in the 12 months.\n- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.\n- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.\n- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.\n- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.\n- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.\n- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.\n- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.\n- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.\n- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.\n- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases."}The refinement added a migration charter with peak calendar (step 1), a dedicated monolith-modularisation step (9), and two explicit peak-readiness gates (steps 20, 21) that were previously generic. The pricing section is now split into discovery (step 15) and extraction behind façade (step 16), matching the archaeology-first pattern from Proposals 2, 3, and 5. The data-transition playbook (step 8) is new and adds entity transition states and automatic halt thresholds.
The plan is more realistic about sequencing but still targets eight independently deployable capabilities by month 12, which is ambitious.
- Added step 1 (charter, governance, peak calendar) with a 50/30/20 capacity split and explicit non-negotiables.
- Added step 9 (modularize monolith) with ArchUnit tests, expand-contract rules, and a ban on new cross-module joins.
- Split pricing into discovery (step 15) and extraction (step 16), with a golden-master harness and 99.99% parity gate.
- Added step 8 (data-transition playbook) with entity transition states, reconciliation thresholds, and rehearsed rollback.
- Two explicit peak gates (steps 20, 21) with six-week blackouts, 12x load tests, and monolith-reversion validation.
- Step 11 (staging and load-test harness) is new and specifies anonymized production-scale data with provider and warehouse simulators.
- Step 16 (pricing extraction) depends on step 20 (pre-January peak readiness), creating a circular risk: if the January peak is in month 1, pricing extraction cannot start until after it, compressing the timeline.
- The back-office extraction (step 19) is bundled with returns, giving less attention to the 300-staff migration than Proposal 2's dedicated step 20.
- The original proposal's explicit 'Extract back-office capabilities' step with incremental screen migration is compressed into a single sub-bullet in step 19.
- Proposal 2 : Transition states for each entity and prohibition on distributed transactions, replaced by outbox, idempotency, and reconciliation.
- Proposal 2 : Load-test traffic reversion to the monolith and confirm fallback capacity before each peak.
- Proposal 3 : Migration charter signed by all teams with non-negotiables and a published 12-month calendar.
- Proposal 3 : Modularise the monolith in place with compile-time walls and a ban on new cross-module joins.
- Proposal 3 : Single-writer ownership cutovers with automatic halt on reconciliation breach.
- Proposal 5 : Deep pricing archaeology with golden-master corpus, machine-readable rule catalogue, and dead-code identification.
- Proposal 3 : Honest 12-month scope: full monolith retirement is not promised; pricing and checkout may remain behind façades.
+ Migration charter, governance, and peak calendar+ Baseline architecture, data, traffic, and operational risk+ Build progressive delivery platform and CI/CD+ API gateway and strangler façade+ Event backbone, outbox, and CDC+ Data transition and reconciliation playbook+ Modularize monolith and enforce seams+ Build production-like staging and load test harness+ Pricing and promotions discovery and golden-master harness+ Pre-January peak readiness and freeze+ Pre-July peak readiness and freeze+ Final ownership cutovers and monolith decommissionBaseline and decompose the monolith into bounded contextsBuild zero-downtime CI/CD and database migration automationIntroduce traffic routing and feature flag platformPeak readiness gate before first sales peakExtract back-office capabilitiesPeak readiness gate before second sales peakDecommission monolith code and data ownership for migrated modulesFinal cutover, contract freeze and monolith retirement
The plan produced
1. Migration charter, governance, and peak calendar from P3 step 1
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (after 1) from P2 step 2
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (after 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (after 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (after 1, 4) new
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (after 3, 4, 5) new
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (after 3, 4, 5) new
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (after 7) new
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (after 3, 4) from P3 step 9
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (after 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (after 4, 5, 10) new
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (after 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (after 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (after 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (after 2, 9, 10) new
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (after 6, 7, 8, 11, 12, 14, 15, 20) from P5 step 14
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (after 6, 7, 8, 11, 13, 14, 16, 20) from P3 step 20
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (after 7, 8, 14, 17) from P2 step 15
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (after 6, 8, 13, 16, 18)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (after 1, 4, 5, 11, 12, 13, 14, 15) new
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (after 16, 17, 18, 19, 20) new
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (after 18, 19, 21) new
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (after 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 655fdafb-56dd-4ad6-bd0f-4bb657813959, Agent: claudeHaiku4.5_initial_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
Previous Proposal 2 (ID: 5f35320e-40bf-4797-a282-13ff94f785f1, Agent: gpt-5.6-terra_initial_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
Previous Proposal 3 (ID: b39f2a46-559f-4920-9664-540fcdb612f4, Agent: grok-4.6_initial_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
Previous Proposal 4 (ID: 9219a465-1887-4823-81a8-3cbfc3bb545b, Agent: deepseek-v4-pro_initial_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
Previous Proposal 5 (ID: 733858cb-4dad-4bb6-85c9-79a3e6d968d9, Agent: qwen3.8-max_initial_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "The structure every proposing agent must answer with.", "properties": {"steps": {"items": {"description": "One step of a proposed plan. Dependencies are step_ids of the same proposal.", "properties": {"step_id": {"title": "Step Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "dependencies": {"items": {"type": "string"}, "title": "Dependencies", "type": "array"}}, "required": ["step_id", "title", "description", "dependencies"], "title": "Step", "type": "object", "additionalProperties": false}, "title": "Steps", "type": "array"}, "estimated_complexity": {"title": "Estimated Complexity", "type": "string"}, "success_metrics": {"title": "Success Metrics", "type": "string"}}, "required": ["steps", "estimated_complexity", "success_metrics"], "title": "ProposalContent", "type": "object", "additionalProperties": false}
{"estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.\n- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.\n- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.\n- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.\n- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.\n- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.\n- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.\n- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.\n- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.\n- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.", "steps": [{"step_id": "S1", "title": "Migration charter, governance, and peak calendar", "description": "Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.\n- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.\n- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.\n- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.\n- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data, traffic, and operational risk", "description": "Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.\n- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.\n- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.\n- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.\n- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.\n- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture and migration sequence", "description": "Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.\n- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.\n- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.\n- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.\n- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.\n- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Establish observability, SLOs, and synthetic monitoring", "description": "Make every current and future component observable, operable, and auditable before material traffic moves.\n- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.\n- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.\n- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.\n- Build dashboards that show monolith and new service side by side for every cutover.\n- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build progressive delivery platform and CI/CD", "description": "Provide a paved road for independently deployable services and reduce deployment risk.\n- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.\n- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.\n- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.\n- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.\n- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.", "dependencies": ["S1", "S4"]}, {"step_id": "S6", "title": "API gateway and strangler façade", "description": "Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.\n- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.\n- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.\n- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.\n- Enable shadow traffic mirroring to new services while the monolith remains source of truth.\n- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.", "dependencies": ["S3", "S4", "S5"]}, {"step_id": "S7", "title": "Event backbone, outbox, and CDC", "description": "Create a reversible integration spine so services can communicate without direct database access.\n- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.\n- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.\n- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.\n- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.\n- Validate that the backbone can sustain 12x peak event volume with headroom.", "dependencies": ["S3", "S4", "S5"]}, {"step_id": "S8", "title": "Data transition and reconciliation playbook", "description": "Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.\n- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.\n- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.\n- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.\n- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.\n- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.", "dependencies": ["S7"]}, {"step_id": "S9", "title": "Modularize monolith and enforce seams", "description": "Create seams inside the monolith before creating separate processes.\n- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.\n- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.\n- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.\n- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.\n- Add feature flags around all new monolith-to-service integrations.", "dependencies": ["S3", "S4"]}, {"step_id": "S10", "title": "Strengthen automated testing and contract tests", "description": "Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.\n- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.\n- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.\n- Add consumer-driven contract tests between monolith and new services.\n- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.\n- Add performance regression gates to CI/CD.", "dependencies": ["S4", "S5"]}, {"step_id": "S11", "title": "Build production-like staging and load test harness", "description": "Create a production-like test environment and load profiles for continuous validation.\n- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.\n- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.\n- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.\n- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.\n- Use this environment for every pre-cutover and pre-peak gate.", "dependencies": ["S4", "S5", "S10"]}, {"step_id": "S12", "title": "Extract catalogue and search read service", "description": "Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.\n- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.\n- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.\n- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.\n- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.\n- Keep the old Lucene index warm as a cold standby through the next sale.", "dependencies": ["S6", "S7", "S8", "S9", "S10", "S11"]}, {"step_id": "S13", "title": "Extract customer accounts and loyalty service", "description": "Move identity-adjacent data only after privacy, consent, and data ownership are clear.\n- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.\n- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.\n- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.\n- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.\n- Rollback restores monolith authentication without password resets or forced logouts.", "dependencies": ["S6", "S7", "S8", "S9", "S10", "S11", "S12"]}, {"step_id": "S14", "title": "Extract inventory read model and warehouse adapter", "description": "Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.\n- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.\n- Publish inventory-change events and create an availability read model for storefront and search use.\n- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.\n- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.\n- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.", "dependencies": ["S6", "S7", "S8", "S11", "S12"]}, {"step_id": "S15", "title": "Pricing and promotions discovery and golden-master harness", "description": "Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.\n- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.\n- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.\n- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.\n- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.\n- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.", "dependencies": ["S2", "S9", "S10"]}, {"step_id": "S16", "title": "Extract pricing and promotions service behind façade", "description": "Rebuild pricing and promotions only through verified, bounded slices behind the façade.\n- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.\n- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.\n- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.\n- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.\n- Require financial-impact analysis and business sign-off for each activated slice.", "dependencies": ["S15", "S6", "S7", "S8", "S11", "S12", "S14", "S20"]}, {"step_id": "S17", "title": "Extract cart, checkout, and payment orchestration", "description": "Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.\n- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.\n- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.\n- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.\n- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.", "dependencies": ["S16", "S13", "S14", "S6", "S7", "S8", "S11", "S20"]}, {"step_id": "S18", "title": "Extract order management and post-order workflows", "description": "Move post-purchase order state once checkout emits reliable events.\n- Publish reliable order lifecycle events from the monolith using the outbox pattern.\n- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.\n- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.\n- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.\n- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.", "dependencies": ["S17", "S7", "S8", "S14"]}, {"step_id": "S19", "title": "Extract returns and back-office services", "description": "Move returns and selected back-office capabilities after order and customer services are stable.\n- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.\n- Migrate returns business rules country-by-country with dual-run comparison.\n- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.\n- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.\n- Rollback re-routes returns and back-office screens to monolith paths.", "dependencies": ["S18", "S13", "S16", "S6", "S8"]}, {"step_id": "S20", "title": "Pre-January peak readiness and freeze", "description": "Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.\n- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.\n- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.\n- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.\n- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.\n- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.", "dependencies": ["S1", "S4", "S5", "S11", "S12", "S13", "S14", "S15"]}, {"step_id": "S21", "title": "Pre-July peak readiness and freeze", "description": "Protect the July sale after more services are live by repeating and extending the capacity certification.\n- Enforce the same six-week blackout before July.\n- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.\n- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.\n- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.\n- Obtain formal peak-readiness sign-off from all stakeholders.", "dependencies": ["S20", "S16", "S17", "S18", "S19"]}, {"step_id": "S22", "title": "Final ownership cutovers and monolith decommission", "description": "Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.\n- Verify zero production requests route to the monolith for 30 consecutive days for each domain.\n- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.\n- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.\n- Archive the monolith codebase and database with read-only audit access for 12 months.\n- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.", "dependencies": ["S21", "S18", "S19"]}, {"step_id": "S23", "title": "Continuous improvement and service governance", "description": "Make service ownership sustainable and continuously improve the new architecture.\n- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.\n- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.\n- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.\n- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.\n- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.", "dependencies": ["S22"]}]}The refinement restructured the original 20 steps into 22 with clearer wave numbering, added a dedicated resilience-patterns step (9), and expanded the pricing section (steps 14–15) with a golden-master harness and dual-run comparison. The data-ownership cutover step (19) is new and adds entity transition states, automatic halt thresholds, and stored-procedure retirement criteria. The proposal retains its ambitious end-state (full monolith decommission) but now sequences it behind two peak gates and a 30-day zero-traffic observation, making it more realistic in execution if not in target.
- Added step 9 (inter-service communication and resilience patterns) with circuit breakers, bulkheads, fallbacks, and chaos testing.
- Expanded pricing into two steps: archaeology (14) and extraction behind dual-run (15), with a 0.01% discrepancy gate and 90-day rollback retention.
- Added step 19 (data ownership cutovers) with entity transition states, reconciliation thresholds, and stored-procedure retirement via characterization harness.
- Added step 20 (progressive traffic migration and rollback drills) with quantitative promotion criteria per stage.
- Success metrics now include inventory reconciliation accuracy ≥ 99.9%, zero oversell incidents, and back-office availability ≥ 99.9%.
- Step 1 now includes a 50/30/20 capacity split and explicit ban on big-bang rewrites and irreversible cutovers.
- Still commits to full monolith decommission (step 22: 'zero production requests route to the monolith for 30 consecutive days'), which is riskier than the honest-scope position of Proposals 2 and 3.
- Success metric 'Monolith codebase reduced by at least 60%' is less precise than the original's '0 lines in production' but still commits to a decommission target that may not be achievable if pricing or checkout parity is not proven.
- Step 18 bundles back-office and storefront modernisation into one step, making it the longest and most complex step in the plan with 11 sub-bullets covering two distinct audiences (300 staff and millions of customers).
- Proposal 1 : Event-driven backbone with Kafka topics per bounded context and transactional outbox publishing.
- Proposal 2 : Reserve team capacity at 50% roadmap, 30% migration, 20% quality/operational work.
- Proposal 2 : Baseline: trace journeys through modules, tables, stored procedures, and external dependencies; classify all 350 tables.
- Proposal 2 : Stabilise the monolith with architecture tests, expand-contract schema rules, and a ban on new cross-module joins.
- Proposal 2 : Warehouse adapter that validates, deduplicates, and acknowledges files; shadow-compare availability before traffic shift.
- Proposal 2 : Load-test the full hybrid path at 12x plus headroom and test traffic reversion to the monolith.
- Proposal 2 : Progressive traffic migration through dark launch, shadow, employee cohort, country, and percentage stages with quantitative promotion criteria.
- Proposal 2 : Transfer data ownership one entity group at a time with reconciliation thresholds and automatic halt.
- Proposal 3 : Team model: five domain teams with a shared platform pair; migration is a sprint percentage, not a freeze.
- Proposal 3 : Modularise the monolith with compile-time walls and a ban on new cross-module joins or stored-procedure coupling.
- Proposal 3 : Pricing archaeology: capture production decision traces, build a golden-master corpus, freeze behavioural snapshots.
- Proposal 4 : Baseline: measure normal and sale-peak throughput, latency, database load, and recovery time.
- Proposal 4 : Define synchronous API rules, asynchronous event rules, versioning, idempotency, and error-handling conventions.
- Proposal 4 : Feature-flag platform with per-user, per-country, per-percentage routing and dark-launch capability.
- Proposal 2 : Explicit statement that full monolith retirement is not a 12-month promise; pricing and checkout may remain behind façades.
- Proposal 3 : Honest 12-month scope: independently deployable services are the goal; the monolith may still delegate for pricing and checkout.
+ Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes+ Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback+ Stabilise and Modularise the Monolith In Place+ Build Inter-Service Communication Framework and Resilience Patterns+ Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams+ Extract Customer Accounts, Identity, and Loyalty Service (Wave 1)+ Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness+ Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4)+ Extract Back-Office Capabilities and Storefront Modernisation (Wave 7)+ Monolith Decommission, Final Data Migration, and Steady-State GovernanceBuild secure delivery and runtime platformImprove monolith safety while it remains liveCreate quality, performance, and release assuranceSelect and sequence extraction wavesIntroduce edge routing and façade interfacesDiscover and contain pricing and promotionsExtract customer and loyalty capabilities safelyRetire legacy paths and establish steady-state service governance
The plan produced
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model from P2 step 1
Create the organisational scaffolding that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (after 1) from P2 step 2
Build an evidence-based picture of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (after 2) from P4 step 2
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (after 1, 3) from P4 step 3
Instrument the monolith and all future services so that every extraction is measurable and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (after 3, 4) from P3 step 4
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (after 4, 5)
Place an API gateway in front of the monolith that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (after 2, 4, 5) from P3 step 9
The monolith remains a production dependency for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (after 5, 7) from P2 step 7
Create the integration spine that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (after 5, 8) from P1 step 8
Establish libraries and standards for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (after 2, 4, 5, 8) from P4 step 5
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (after 6, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (after 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (after 6, 8, 9, 10) from P2 step 12
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (after 2, 7, 8, 10) from P3 step 17
Do not extract the 200 K-line pricing module until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (after 11, 13, 14)
Rebuild the highest-risk module as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (after 12, 13, 15)
Move the revenue-critical transaction path only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (after 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (after 17)
Deliver a modern back-office for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (after 11, 12, 13, 15, 16, 17) from P2 step 17
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (after 6, 10, 11, 12, 13, 15, 16, 17, 19) from P2 step 18
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (after 5, 10, 11, 13, 15, 16, 20) from P2 step 19
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (after 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 655fdafb-56dd-4ad6-bd0f-4bb657813959, Agent: claudeHaiku4.5_initial_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
Previous Proposal 2 (ID: 5f35320e-40bf-4797-a282-13ff94f785f1, Agent: gpt-5.6-terra_initial_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
Previous Proposal 3 (ID: b39f2a46-559f-4920-9664-540fcdb612f4, Agent: grok-4.6_initial_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
Previous Proposal 4 (ID: 9219a465-1887-4823-81a8-3cbfc3bb545b, Agent: deepseek-v4-pro_initial_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
Previous Proposal 5 (ID: 733858cb-4dad-4bb6-85c9-79a3e6d968d9, Agent: qwen3.8-max_initial_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Establish Migration Governance, Peak Protection Calendar, and Team Operating Model", "description": "Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.\n\n- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.\n- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.\n- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.\n- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.\n- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.\n- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.\n- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.", "dependencies": []}, {"step_id": "S2", "title": "Baseline Architecture, Data Model, Traffic, and Operational Risk", "description": "Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.\n\n- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.\n- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.\n- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.\n- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.\n- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.\n- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.\n- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define Target Service Architecture, Domain Boundaries, and Migration Sequence", "description": "Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.\n\n- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.\n- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.\n- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.\n- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.\n- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.\n- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.\n- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build Observability, SLOs, and Production Safety Foundations", "description": "Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.\n\n- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).\n- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.\n- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.\n- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.\n- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.\n- Create a shared operations readiness review required before any service receives production traffic.\n- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.", "dependencies": ["S1", "S3"]}, {"step_id": "S5", "title": "Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes", "description": "Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.\n\n- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.\n- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.\n- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.\n- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.\n- Set up a container image registry with retention policies and security scanning.\n- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.\n- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.\n- Target: reduce the two-week release cycle to daily deployable per service by end of this step.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback", "description": "Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.\n\n- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.\n- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.\n- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.\n- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.\n- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.\n- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.\n- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.\n- Measure baseline response equivalence and latency overhead before moving any business endpoint.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Stabilise and Modularise the Monolith In Place", "description": "The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.\n\n- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.\n- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.\n- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.\n- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.\n- Ban new features from reaching into another team's tables or adding cross-module joins.\n- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.\n- Add feature flags and kill switches around all new monolith-to-service integrations.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S8", "title": "Build Event Backbone, Outbox, CDC, and Data-Transition Patterns", "description": "Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.\n\n- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.\n- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.\n- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.\n- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.\n- Add idempotent consumer patterns and dead-letter queues from day one.\n- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.\n- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.\n- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.", "dependencies": ["S5", "S7"]}, {"step_id": "S9", "title": "Build Inter-Service Communication Framework and Resilience Patterns", "description": "Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.\n\n- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.\n- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.\n- Document timeout and retry policies to prevent cascading failures.\n- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.\n- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.\n- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.\n- Provide templates and SDKs to development teams so they do not reimplement these patterns.\n- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.", "dependencies": ["S5", "S8"]}, {"step_id": "S10", "title": "Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams", "description": "Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.\n\n- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.\n- Add integration tests using Testcontainers with a seeded copy of the production schema.\n- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.\n- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.\n- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.\n- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.\n- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).\n- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.", "dependencies": ["S2", "S4", "S5", "S8"]}, {"step_id": "S11", "title": "Extract Catalogue Read API and Modern Search Service (Wave 1)", "description": "Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.\n\n- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.\n- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.\n- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.\n- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.\n- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.\n- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.\n- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.\n- Keep the old Lucene index warm through the next sale as a cold standby.", "dependencies": ["S6", "S8", "S9", "S10"]}, {"step_id": "S12", "title": "Extract Customer Accounts, Identity, and Loyalty Service (Wave 1)", "description": "Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.\n\n- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.\n- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.\n- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.\n- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.\n- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.\n- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.\n- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.\n- This extraction serves as the reference implementation for all subsequent waves.", "dependencies": ["S6", "S8", "S9", "S10"]}, {"step_id": "S13", "title": "Modernise Inventory Integration and Extract Availability Service (Wave 2)", "description": "Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.\n\n- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.\n- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.\n- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.\n- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.\n- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.\n- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.\n- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.\n- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.\n- Prove no extra oversell versus today's 15-minute lag before a sale.", "dependencies": ["S6", "S8", "S9", "S10"]}, {"step_id": "S14", "title": "Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness", "description": "Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.\n\n- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.\n- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.\n- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.\n- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.\n- Classify rules into universal, country-specific, and campaign / temporary.\n- Define the target architecture: a pricing-service with a rules engine externalised from application code.\n- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.\n- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.\n- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.", "dependencies": ["S2", "S7", "S8", "S10"]}, {"step_id": "S15", "title": "Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4)", "description": "Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.\n\n- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.\n- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).\n- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.\n- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.\n- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.\n- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.\n- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.\n- Assign dedicated on-call coverage for the first 30 days post-cutover.\n- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.", "dependencies": ["S11", "S13", "S14"]}, {"step_id": "S16", "title": "Extract Cart, Checkout, and Payment Orchestration Service (Wave 5)", "description": "Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.\n\n- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.\n- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.\n- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.\n- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.\n- Keep PCI and provider contracts stable; wrap, do not rewrite.\n- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.\n- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.\n- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.\n- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.", "dependencies": ["S12", "S13", "S15"]}, {"step_id": "S17", "title": "Extract Order Management, Returns, and Post-Order Workflows (Wave 6)", "description": "Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.\n\n- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.\n- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.\n- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.\n- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.\n- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.\n- Backfill historical orders into the service and run reconciliation.\n- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.\n- Back-office order views call the new service API through the gateway; legacy views remain as fallback.\n- Validate that the returns process (including cross-border returns across the 8 countries) works identically.\n- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.\n- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.", "dependencies": ["S16"]}, {"step_id": "S18", "title": "Extract Back-Office Capabilities and Storefront Modernisation (Wave 7)", "description": "Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.\n\n- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.\n- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.\n- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.\n- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.\n- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.\n- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.\n- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.\n- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.\n- Validate all 4 language / 3 currency combinations through automated E2E tests.\n- Train staff per screen group; keep old screens until the new ones match.\n- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.", "dependencies": ["S17"]}, {"step_id": "S19", "title": "Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures", "description": "Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.\n\n- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.\n- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.\n- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.\n- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.\n- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.\n- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.\n- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.\n- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.", "dependencies": ["S11", "S12", "S13", "S15", "S16", "S17"]}, {"step_id": "S20", "title": "Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing", "description": "Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.\n\n- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.\n- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.\n- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.\n- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.\n- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.\n- Mean time to revert a bad service release must be under 10 minutes via flags or routing.", "dependencies": ["S6", "S10", "S11", "S12", "S13", "S15", "S16", "S17", "S19"]}, {"step_id": "S21", "title": "Peak-Season Resilience Certification and Capacity Validation", "description": "Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.\n\n- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.\n- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.\n- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.\n- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.\n- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.\n- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.\n- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.\n- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.\n- Any component that fails the 12x test blocks go-live.", "dependencies": ["S5", "S10", "S11", "S13", "S15", "S16", "S20"]}, {"step_id": "S22", "title": "Monolith Decommission, Final Data Migration, and Steady-State Governance", "description": "Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.\n\n- Verify that zero production requests route to the monolith for 30 consecutive days.\n- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.\n- Remove feature flags and dark-launch paths for all migrated capabilities.\n- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.\n- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.\n- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.\n- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.\n- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.\n- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.\n- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.", "dependencies": ["S19", "S20", "S21"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.\n- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).\n- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.\n- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.\n- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.\n- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.\n- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.\n- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.\n- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.\n- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.\n- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.\n- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.\n- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.\n- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.\n- No cross-service direct database joins remain for migrated capabilities.\n- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.\n- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes."}Round 2 — refinement 2 of 4
All five proposals converged strongly toward a shared vocabulary: peak-protection windows, façade-first pricing and checkout, single-writer cutovers, and an honest year-one scope that may leave the monolith partially intact. The most ambitious agents (Proposals 2, 3) adopted explicit non-goals and conditional success criteria, while the more prescriptive ones (1, 4, 5) retained numeric targets and full decommission plans. The principal remaining divergence is whether month-12 success is defined as 'independently deployable façades with proven rollback' or as 'monolith reduced ≥ 60 % with daily deploys'.
The calls of this round
Influences: who took what from whom
| Round 2 ↓ · round 1 → | Proposal 1 | Proposal 2 | Proposal 3 | Proposal 4 | Proposal 5 | New steps |
|---|---|---|---|---|---|---|
| Proposal 1 |
kept12 | same titles2 analyst sees+2 / −1 | same titles0 analyst sees+1 / −1 | same titles2 analyst sees+1 / −0 | same titles2 analyst sees+1 / −0 | new5 |
| Proposal 2 |
same titles0 analyst sees+0 / −1 | kept13 | same titles3 analyst sees+2 / −0 | same titles2 analyst sees+2 / −0 | same titles0 analyst sees+0 / −1 | new3 |
| Proposal 3 |
same titles0 analyst sees+0 / −1 | same titles3 analyst sees+3 / −0 | kept8 | same titles1 analyst sees+1 / −0 | same titles0 analyst sees+0 / −1 | new10 |
| Proposal 4 |
same titles2 analyst sees+0 / −0 | same titles3 analyst sees+2 / −1 | same titles2 analyst sees+2 / −1 | kept11 | same titles2 analyst sees+1 / −0 | new1 |
| Proposal 5 |
same titles0 analyst sees+0 / −0 | same titles2 analyst sees+2 / −1 | same titles2 analyst sees+2 / −1 | same titles0 analyst sees+0 / −0 | kept19 | new0 |
The rewrite adds stronger safety language (≤5-min rollback, error-budget auto-rollback, immutable audit events) and adopts the façade-first checkout pattern visible in Proposals 2 and 3. However, it retains aggressive end-state metrics—'≥ 60 % monolith reduction', '8 + independently deployable services', 'daily deploy cadence'—that contradict the conditional, evidence-gated philosophy the other proposals adopted. The tension between 'retain legacy pricing behind façade if parity is unproven' (S16) and 'monolith reduced ≥ 60 %' (success metric) is unresolved.
- Explicit ≤ 5-minute rollback SLA and error-budget auto-rollback policy (S4, S22)
- Adopts façade-first checkout with monolith delegation as default (S17), matching the safer pattern from Proposals 2 and 3
- Adds immutable audit events for pricing, payments, stock, and admin actions (S4)
- Peak readiness gates (S15, S19) now include explicit game-day scenarios (provider offline, event lag, warehouse file replay)
- Warehouse adapter step (S11) now includes delayed/duplicate/malformed file testing
- Retains 'monolith codebase reduced ≥ 60 %' as a hard metric, conflicting with the conditional scope language added to S16 and S23
- S10 (pricing archaeology) lacks the explicit 'dead-rule identification' (rules not fired in 24 months) that Proposal 3 added to reduce scope
- S23 still promises full decommission and 'zero production requests route to monolith for 30 days', which may be unrealistic given the conditional pricing and checkout language in S16–S17
- No explicit non-goals list; the plan still implies full monolith retirement is the default expectation
- Proposal 2 : Façade-first cart and checkout that initially delegates to monolith commands, with ownership transfer only after evidence gates pass.
- Proposal 2 : Single-writer data ownership cutovers as controlled state transitions with reconciliation thresholds that halt expansion.
- Proposal 3 : Explicit statement that if full pricing extraction is not safe in 12 months, the façade plus proven slices constitutes success.
- Proposal 4 : Peak readiness gates as formal certification steps with go/no-go sign-off from engineering, ops, commerce, finance, warehouse, and support.
- Proposal 5 : Specific SLO numbers (storefront p99 < 400 ms, checkout p99 < 1.2 s) and error-budget auto-rollback policy.
- Proposal 3 : Explicit non-goals list (no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise).
- Proposal 2 : Year-one exit scope defined as 'independently deployable façades' with transactional ownership transfer only where gates pass, explicitly accepting a smaller outcome.
+ Build observability, SLOs and error-budget infrastructure+ Strengthen testing: characterisation, contracts, and 12x load validation+ Parallel workstream: price and promotion archaeology and golden-master corpus+ Modernise warehouse integration without changing warehouse contract+ Wave 2: Extract inventory availability reads and reservation logic+ Peak readiness gate 1: certify hybrid estate before first peak (January or July)+ Migrate back-office and refactor storefront to consume service layer+ Transfer data ownership one entity at a time through reversible cutovers+ Execute progressive traffic migration with measured increments and automated rollbackEstablish observability: structured logs, metrics, tracing, and SLOsStrengthen tests and establish contract-testing foundationDiscover, document, and freeze pricing and promotions rules (parallel workstream)Modernise warehouse integration: adapter for existing file exchangeWave 1: Extract search service (read-only, nightly-batch replacement)Peak readiness gate 1: before January/July peak (if in window)Wave 2: Extract inventory service with warehouse adapterExtract back-office and modernise staff portal (300 users, 8 countries)Final peak readiness validation and chaos engineering
The plan produced
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (after 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (after 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (after 2) from P5 step 4
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (after 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (after 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (after 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (after 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (after 2, 4, 5, 7) new
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (after 2) from P4 step 15
This workstream runs in parallel with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (after 3, 8) from P2 step 12
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes
inventory-updatedevents to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (after 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (after 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (after 6, 8, 9, 11, 12) new
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (after 9, 12, 13, 14) new
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (after 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (after 6, 8, 9, 13, 14, 16) from P4 step 17
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (after 8, 13, 14, 17) from P5 step 17
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming
order-placedevents; it owns order state machine, fulfilment tracking, and returns workflow.Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (after 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (after 13, 16, 17, 18) new
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (after 8, 12, 13, 14, 16, 17, 18) from P2 step 19
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (after 5, 9, 12, 13, 14, 16, 17, 18, 20) new
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (after 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
- Zero unplanned customer-facing downtime attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- Every production cutover has a rehearsed rollback tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- 8+ independently deployable services by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- Deployment frequency increases from bi-weekly to ≥ daily per service, with no mandatory monolith maintenance window for routine compatible releases.
- Pricing and promotion parity ≥ 99.99% against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at each cutover completion; inventory accuracy ≥ 99.9%.
- All extracted services have zero direct writes to another service's database; cross-service state propagation uses governed APIs or versioned events only.
- Test coverage on all migrated code paths ≥ 80%; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- Feature delivery continues at ≥ 80% of agreed baseline throughput; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability ≥ 99.9% during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- Peak-load capacity sustained at 12x during both January and July sales; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 78422c30-0658-482e-9dd9-24903d13d8db, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
Previous Proposal 2 (ID: 22b16580-40e1-4832-b2a2-1ae110438ab8, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
Previous Proposal 3 (ID: 36139e82-24a4-4a60-b6bc-e9255b8a8c86, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
Previous Proposal 4 (ID: b54d6d10-cfee-4ab8-881e-f99325826938, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
Previous Proposal 5 (ID: ebf249ae-88f6-45db-9d66-e3341d87cfa6, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Migration charter, governance and peak-protection freeze windows", "description": "Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.\n\nAppoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.\n\nPublish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.\n\nDefine team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live system: architecture, data, traffic and invariants", "description": "Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.\n\nTrace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.\n\nRecord p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.\n\nClassify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.\n\nCapture production-like anonymised data and documented peak-load profiles for repeatable testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target bounded contexts, data ownership model, and extraction sequence", "description": "Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.\n\nDefine bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.\n\nAssign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.\n\nSequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build observability, SLOs and error-budget infrastructure", "description": "Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.\n\nDeploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.\n\nBuild real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.\n\nCreate immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build CI/CD pipeline, feature flags, and progressive-delivery platform", "description": "Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.\n\nStand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.\n\nImplement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.\n\nCentralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Place API gateway and strangler façade with instant rollback", "description": "Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.\n\nRoute by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.\n\nImplement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.\n\nTest route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Stabilise and modularise the monolith in place", "description": "The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.\n\nEnforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.\n\nIntroduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.\n\nAdd feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S8", "title": "Deploy event backbone: Kafka, outbox, CDC and reconciliation", "description": "Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.\n\nDeploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.\n\nDefine versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.\n\nBuild a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S9", "title": "Strengthen testing: characterisation, contracts, and 12x load validation", "description": "Replace confidence based on fortnightly release with automated evidence for each independently deployed component.\n\nBuild characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.\n\nBuild golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.\n\nBuild production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S10", "title": "Parallel workstream: price and promotion archaeology and golden-master corpus", "description": "This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.\n\nForm a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.\n\nCapture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.\n\nBuild a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.", "dependencies": ["S2"]}, {"step_id": "S11", "title": "Modernise warehouse integration without changing warehouse contract", "description": "Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.\n\nBuild an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.\n\nThe adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.\n\nTest delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.", "dependencies": ["S3", "S8"]}, {"step_id": "S12", "title": "Wave 1: Extract catalogue read service and modern search", "description": "Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.\n\nBuild a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.\n\nRun both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.\n\nShift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.\n\nRollback is a route change; latency overhead must be < 50 ms.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S13", "title": "Wave 1: Extract customer accounts, identity and loyalty", "description": "Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.\n\nDefine canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.\n\nStart with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.\n\nMove loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.\n\nThis service becomes the reference implementation for all subsequent extraction waves.", "dependencies": ["S6", "S8", "S9", "S12"]}, {"step_id": "S14", "title": "Wave 2: Extract inventory availability reads and reservation logic", "description": "Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.\n\nBuild an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.\n\nShadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.\n\nPreserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.\n\nProve no extra oversell versus today's 15-minute lag before any peak season.", "dependencies": ["S6", "S8", "S9", "S11", "S12"]}, {"step_id": "S15", "title": "Peak readiness gate 1: certify hybrid estate before first peak (January or July)", "description": "Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.\n\nLoad-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.\n\nTest traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.\n\nRun chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.\n\nObtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.", "dependencies": ["S9", "S12", "S13", "S14"]}, {"step_id": "S16", "title": "Wave 3: Extract pricing and promotions service (shadow mode, months 4–8)", "description": "Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.\n\nBuild a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).\n\nRun the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.\n\nOnly after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.\n\nKeep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.", "dependencies": ["S10", "S12", "S14"]}, {"step_id": "S17", "title": "Wave 3: Extract cart, checkout and payment orchestration", "description": "Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.\n\nDefine cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.\n\nCart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.\n\nBuild a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.\n\nCanary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.", "dependencies": ["S6", "S8", "S9", "S13", "S14", "S16"]}, {"step_id": "S18", "title": "Wave 4: Extract order management, returns, and post-order workflows", "description": "Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.\n\nPublish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.\n\nBuild an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.\n\nMigrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.\n\nPreserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.", "dependencies": ["S8", "S13", "S14", "S17"]}, {"step_id": "S19", "title": "Peak readiness gate 2: certify before second peak (July if first was January)", "description": "Protect the second major sales peak by repeating and extending capacity certification with more services live.\n\nFreeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.\n\nTest traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.\n\nValidate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.\n\nObtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.", "dependencies": ["S15", "S16", "S17"]}, {"step_id": "S20", "title": "Migrate back-office and refactor storefront to consume service layer", "description": "Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.\n\nBuild a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.\n\nMigrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.\n\nRefactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.\n\nImplement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.", "dependencies": ["S13", "S16", "S17", "S18"]}, {"step_id": "S21", "title": "Transfer data ownership one entity at a time through reversible cutovers", "description": "Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.\n\nFor each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.\n\nRoute writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.\n\nRewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.\n\nRetain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.", "dependencies": ["S8", "S12", "S13", "S14", "S16", "S17", "S18"]}, {"step_id": "S22", "title": "Execute progressive traffic migration with measured increments and automated rollback", "description": "Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.\n\nProgress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.\n\nAutomate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.\n\nMaintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.", "dependencies": ["S5", "S9", "S12", "S13", "S14", "S16", "S17", "S18", "S20"]}, {"step_id": "S23", "title": "Retire legacy paths, decommission monolith and establish steady-state governance", "description": "After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.\n\nVerify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.\n\nDrop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.\n\nEstablish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.\n\nConduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.", "dependencies": ["S19", "S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "\n- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.\n- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.\n- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.\n- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.\n- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.\n- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.\n- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.\n- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.\n- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.\n- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.\n- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.\n- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.\n- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.\n- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.\n- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.\n"}The revision tightens the conditional-scope philosophy throughout: the year-one target is now explicitly 'independently deployable capabilities, not an unsafe promise to fully retire every monolith transaction'. Payment isolation (S15) is elevated to a standalone step before checkout migration, and the pricing step now requires business and finance sign-off per rule slice. The plan drops the separate 'peak calendar' step and folds it into governance (S1), reducing step count from 22 to 21 without losing content.
- Payment-provider adapters (S15) are now a standalone step with explicit in-flight rollback semantics: accepted attempts keep their idempotency key and completion path
- Pricing façade step (S10) adds machine-readable rule catalogue and business/finance sign-off on current observable behaviour before any slice moves
- Year-one exit scope (S3) is now explicit and conditional: 'Transactional command ownership transfers only when evidence gates pass'
- S8 adds explicit write-rollback semantics: previously accepted commands must complete through their original state machine, not be blindly reversed
- S21 now requires a funded follow-on roadmap for anything that correctly remained in the monolith
- Removing the standalone peak-calendar step (former S4) makes the freeze-window rules slightly harder to locate; they are now embedded in S1 bullet text
- S6 (test and capacity evidence) drops the explicit mutation-testing mention that the round-1 version included for pricing and checkout paths
- Proposal 3 : 100% automated scenario coverage for defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios as a gate before ownership transfer.
- Proposal 3 : Pricing slices receive live traffic only after ≥ 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Proposal 4 : Strangler gateway step explicitly preserving server-rendered storefront and mobile API contracts without requiring a mobile release.
- Proposal 4 : Checkout façade with durable attempt state machine, idempotency keys, and explicit compensation paths before any ownership transfer.
- Proposal 1 : Hard metric of 'monolith codebase reduced from 2 million lines to < 100k lines' and full decommission as a year-one target.
- Proposal 5 : Hard metric of 'monolith codebase reduced by at least 60%' as a success criterion.
+ Baseline behaviour, dependencies, data, and invariants+ Build the delivery, security, and progressive-release paved road+ Create test, contract, and capacity evidence+ Modularise the monolith and create stable seams+ Run pricing archaeology and establish the legacy pricing façade+ Deliver order views, notifications, and bounded returns+ Move only proven pricing rule slices+ Introduce cart and checkout façades, then migrate safe orchestrationEstablish the factual baseline and critical invariantsCreate the peak calendar and release-control policyBuild the paved road for independently deployable servicesStabilise and modularise the live monolithBuild risk-weighted quality and capacity assuranceContain pricing and promotions through archaeology and a façadeExtract order views and bounded post-order workflowsMove proven pricing slices and prepare cart and checkout façadesProgressively migrate cart and checkout orchestration
The plan produced
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (after 1) new
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (after 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (after 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (after 3, 4) from P3 step 6
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (after 2, 4, 5) new
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (after 3, 5, 6) from P4 step 9
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (after 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (after 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (after 2, 6, 7, 8, 9) new
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (after 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (after 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (after 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (after 8, 9, 12, 13) from P3 step 17
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (after 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (after 10, 11, 12, 15) from P3 step 16
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (after 12, 13, 15, 16) from P4 step 17
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (after 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (after 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (after 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (after 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 78422c30-0658-482e-9dd9-24903d13d8db, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
Previous Proposal 2 (ID: 22b16580-40e1-4832-b2a2-1ae110438ab8, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
Previous Proposal 3 (ID: 36139e82-24a4-4a60-b6bc-e9255b8a8c86, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
Previous Proposal 4 (ID: b54d6d10-cfee-4ab8-881e-f99325826938, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
Previous Proposal 5 (ID: ebf249ae-88f6-45db-9d66-e3341d87cfa6, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Launch governed migration programme and protect sales", "description": "Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.\n\n- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.\n- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.\n- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.\n- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.\n- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.\n- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.", "dependencies": []}, {"step_id": "S2", "title": "Baseline behaviour, dependencies, data, and invariants", "description": "Create the factual baseline that every migration, capacity decision, and rollback will be compared against.\n\n- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.\n- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.\n- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.\n- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.\n- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.\n- Produce anonymised production-shaped fixtures and a representative 12x load profile.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set boundaries, ownership, and a realistic year-one target", "description": "Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.\n\n- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.\n- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.\n- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.\n- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.\n- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.\n- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument the estate and establish operational control", "description": "Make legacy and new paths observable before moving material traffic.\n\n- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.\n- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.\n- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.\n- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.\n- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.", "dependencies": ["S1", "S2"]}, {"step_id": "S5", "title": "Build the delivery, security, and progressive-release paved road", "description": "Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.\n\n- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.\n- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.\n- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.\n- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.\n- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.\n- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Create test, contract, and capacity evidence", "description": "Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.\n\n- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.\n- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.\n- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.\n- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.\n- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.\n- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Modularise the monolith and create stable seams", "description": "Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.\n\n- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.\n- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.\n- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.\n- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.\n- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Build governed event, replication, and reconciliation capabilities", "description": "Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.\n\n- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.\n- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.\n- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.\n- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.\n- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.\n- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S9", "title": "Deploy edge routing and channel-compatible façades", "description": "Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.\n\n- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.\n- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.\n- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.\n- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.\n- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.", "dependencies": ["S4", "S5", "S6", "S7"]}, {"step_id": "S10", "title": "Run pricing archaeology and establish the legacy pricing façade", "description": "Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.\n\n- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.\n- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.\n- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.\n- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.\n- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.\n- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.", "dependencies": ["S2", "S6", "S7", "S8", "S9"]}, {"step_id": "S11", "title": "Extract catalogue read models and search", "description": "Use read-heavy capabilities to prove the operational model without changing transactional ownership.\n\n- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.\n- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.\n- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.\n- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.\n- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.\n- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.", "dependencies": ["S8", "S9"]}, {"step_id": "S12", "title": "Modernise warehouse exchange and inventory availability reads", "description": "Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.\n\n- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.\n- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.\n- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.\n- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.\n- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.\n- Provide immediate read fallback and prove no oversell increase attributable to the new path.", "dependencies": ["S8", "S9", "S11"]}, {"step_id": "S13", "title": "Extract customer, consent, and bounded loyalty slices", "description": "Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.\n\n- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.\n- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.\n- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.\n- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.\n- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.\n- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.", "dependencies": ["S8", "S9", "S11"]}, {"step_id": "S14", "title": "Deliver order views, notifications, and bounded returns", "description": "Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.\n\n- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.\n- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.\n- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.\n- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.\n- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.\n- Keep legacy query and workflow routes available for immediate fallback during the observation period.", "dependencies": ["S8", "S9", "S12", "S13"]}, {"step_id": "S15", "title": "Isolate payment providers and create financial controls", "description": "Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.\n\n- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.\n- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.\n- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.\n- Preserve country and payment-method routing plus customer-facing response semantics during adoption.\n- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.\n- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.", "dependencies": ["S6", "S8", "S9", "S14"]}, {"step_id": "S16", "title": "Move only proven pricing rule slices", "description": "Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.\n\n- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.\n- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.\n- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.\n- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.\n- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.\n- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.", "dependencies": ["S10", "S11", "S12", "S15"]}, {"step_id": "S17", "title": "Introduce cart and checkout façades, then migrate safe orchestration", "description": "Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.\n\n- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.\n- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.\n- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.\n- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.\n- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.\n- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.", "dependencies": ["S12", "S13", "S15", "S16"]}, {"step_id": "S18", "title": "Transfer data ownership through single-writer cutovers", "description": "Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.\n\n- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.\n- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.\n- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.\n- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.\n- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.\n- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.", "dependencies": ["S8", "S12", "S13", "S14", "S16", "S17"]}, {"step_id": "S19", "title": "Migrate back-office workflows by role and domain", "description": "Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.\n\n- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.\n- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.\n- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.\n- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.\n- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.\n- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.", "dependencies": ["S11", "S12", "S13", "S14", "S18"]}, {"step_id": "S20", "title": "Certify each sales peak and rehearse full reversion", "description": "Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.\n\n- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.\n- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.\n- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.\n- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.\n- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.\n- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.", "dependencies": ["S4", "S6", "S9", "S11", "S12", "S15", "S17"]}, {"step_id": "S21", "title": "Consolidate proven services and establish the follow-on roadmap", "description": "Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.\n\n- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.\n- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.\n- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.\n- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.\n- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.\n- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.", "dependencies": ["S18", "S19", "S20"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.\n- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.\n- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.\n- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.\n- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.\n- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.\n- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.\n- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.\n- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.\n- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.\n- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.\n- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window."}The plan is restructured around two explicit 'seasons' aligned to the January and July peaks, making the calendar constraint operational rather than aspirational. A new unified extraction playbook (S10) eliminates per-domain improvisation. The honest-scope philosophy is strengthened with explicit non-goals (S3) and a conditional throttle ('If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only').
The step count drops from 23 to 22 while gaining clarity.
- New S10 codifies a single extraction playbook with quantitative promotion criteria, eliminating per-domain improvisation across five teams
- S3 adds explicit non-goals: no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise
- S3 adds a conditional throttle: if the first sale is < 16 weeks away, Season 1 shrinks to search plus warehouse adapter only
- S11 adds dead-rule identification: rules not fired in 24 months are documented but not rewritten, reducing scope
- S22 explicitly states 'Do not declare the programme done if sales protection, money integrity, or revertability was traded away'
- The two-season structure makes the plan less granular for teams working on parallel workstreams; pricing archaeology (S11) and search (S12) have no explicit month numbers
- S4 merges CI/CD, flags, and platform into one step, losing the separate Kubernetes sizing detail that round-1 S6 had
- Proposal 2 : Five-minute detection target for critical journey failures as an explicit operational metric.
- Proposal 2 : Warehouse adapter that journals, validates, deduplicates, acknowledges, retries, and replays files, with the adapter running alongside the legacy job during transition.
- Proposal 2 : Peak certification includes written sign-off from engineering, ops, commerce, finance, warehouse, and support, and game days must cover provider outage, event delay, database failover, and flag/route rollback.
- Proposal 4 : Back-office migration by workflow and role, starting with read-only views and moving commands only after service ownership is proven.
- Proposal 1 : Target of reducing monolith code from 2 million lines to < 100k and decommissioning the monolith within 12 months.
- Proposal 5 : Hard metric of 'monolith codebase reduced by at least 60%' and 'remaining monolith no longer owns migrated data'.
+ Charter the programme around peaks, money, and rollback+ Set honest year-one boundaries and non-goals+ Keep five domain teams and a thin paved-road platform+ Instrument the monolith and define journey SLOs+ Build the behavioural safety net and 12x harness+ Codify one extraction playbook every team must use+ Start pricing archaeology and put a façade in front of the engine+ Season 1: wrap warehouse files and extract availability reads+ Certify the first peak on the real hybrid estate+ Season 2: order-query slices and payment-provider adapters+ Season 2: cart and checkout façades, then only proven orchestration+ Certify the second peak and rehearse full-load reversion+ Move back-office by workflow and transfer write ownership only where proven+ Shrink residual coupling and hand over a durable operating modelCharter, peak calendar and non-negotiablesTarget architecture and honest 12-month scopeTeam model that keeps features flowingObservability and error budgets on the monolithFlags, CI and progressive delivery paved roadSafety net: journeys, contracts and 12x loadInventory adapter and availability readsPricing archaeology, golden masters and façadeOrder query, notifications and returns slicesCheckout façade and payment adaptersIndependent pipelines after the first service is realSingle-writer ownership cutoversFirst peak-season certificationSecond peak-season certificationShrink the monolith and hand over governance
The plan produced
1. Charter the programme around peaks, money, and rollback new
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (after 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (after 2) new
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (after 1, 3) new
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (after 2) from P2 step 5
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (after 4, 5) new
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (after 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (after 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a route change, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (after 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (after 6, 8, 9) new
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (after 2, 7) new
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (after 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (after 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (after 10) from P2 step 12
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (after 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (after 6, 8, 12, 13, 14) new
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (after 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (after 9, 15, 16) new
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (after 14, 17, 18) from P4 step 17
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (after 16, 17, 18, 19) from P2 step 21
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (after 19, 20) new
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (after 21) new
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 78422c30-0658-482e-9dd9-24903d13d8db, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
Previous Proposal 2 (ID: 22b16580-40e1-4832-b2a2-1ae110438ab8, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
Previous Proposal 3 (ID: 36139e82-24a4-4a60-b6bc-e9255b8a8c86, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
Previous Proposal 4 (ID: b54d6d10-cfee-4ab8-881e-f99325826938, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
Previous Proposal 5 (ID: ebf249ae-88f6-45db-9d66-e3341d87cfa6, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter the programme around peaks, money, and rollback", "description": "Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.\n\n- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.\n- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.\n- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.\n- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.\n- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.\n- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live system and freeze business invariants", "description": "Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.\n\n- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.\n- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.\n- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.\n- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.\n- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set honest year-one boundaries and non-goals", "description": "Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.\n\nDefine domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n\n- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.\n- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.\n- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.\n- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.\n- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.\n- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Keep five domain teams and a thin paved-road platform", "description": "Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.\n\n- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.\n- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.\n- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.\n- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.\n- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.\n- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.\n- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.", "dependencies": ["S1", "S3"]}, {"step_id": "S5", "title": "Instrument the monolith and define journey SLOs", "description": "Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.\n\n- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.\n- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.\n- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.\n- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.\n- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.", "dependencies": ["S2"]}, {"step_id": "S6", "title": "Build the behavioural safety net and 12x harness", "description": "Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.\n- Add characterisation tests around stored procedures and pricing before modifying them.\n- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.\n- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.\n- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Modularise the live monolith without stopping features", "description": "Create seams before you create processes. The monolith remains the primary system for most of the year.\n\n- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.\n- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Wrap high-risk access behind facades even while it still runs in-process.\n- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.\n- Add kill switches to every new monolith-to-service integration.\n- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Place a strangler edge with minute-scale rollback", "description": "Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.\n\n- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.\n- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.\n- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.\n- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.\n- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.\n- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.", "dependencies": ["S4", "S5", "S6"]}, {"step_id": "S9", "title": "Stand up events, outbox, and a reconciliation product", "description": "Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.\n\n- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.\n- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.\n- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.\n- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.\n- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.", "dependencies": ["S4", "S7"]}, {"step_id": "S10", "title": "Codify one extraction playbook every team must use", "description": "Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.\n\nEvery extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.\n\n- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n- Shadow never duplicates payments or other customer-visible commands.\n- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.\n- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.\n- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Start pricing archaeology and put a façade in front of the engine", "description": "Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.\n\n- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.\n- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.\n- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.\n- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.\n- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.\n- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.", "dependencies": ["S2", "S7"]}, {"step_id": "S12", "title": "Season 1: extract search as the first independently deployable service", "description": "Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.\n\n- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.\n- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.\n- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.\n- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.\n- Keep the old index warm through the next sale as standby.", "dependencies": ["S10"]}, {"step_id": "S13", "title": "Season 1: extract catalogue read models", "description": "Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.\n\n- Build country and language read models for eight markets around one product identity.\n- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.\n- Shadow-compare content, availability display, and locale fields before any live percentage.\n- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.\n- Do not move authoring tools until reads are operationally boring.", "dependencies": ["S12"]}, {"step_id": "S14", "title": "Season 1: wrap warehouse files and extract availability reads", "description": "Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.\n- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.\n- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.\n- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.", "dependencies": ["S10"]}, {"step_id": "S15", "title": "Season 1: extract customer reads and bounded loyalty with GDPR", "description": "Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.\n\n- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.\n- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.\n- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.\n- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.\n- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.", "dependencies": ["S10"]}, {"step_id": "S16", "title": "Certify the first peak on the real hybrid estate", "description": "Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers in the protection window. Feature work may continue behind flags.\n- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.\n- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.\n- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.\n- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.\n- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.", "dependencies": ["S6", "S8", "S12", "S13", "S14"]}, {"step_id": "S17", "title": "Season 2: dual-run only proven pricing slices", "description": "Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.\n\n- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.\n- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.\n- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.\n- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S11", "S13", "S16"]}, {"step_id": "S18", "title": "Season 2: order-query slices and payment-provider adapters", "description": "Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox.\n- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.\n- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.\n- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.\n- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.\n- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.\n- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.", "dependencies": ["S9", "S15", "S16"]}, {"step_id": "S19", "title": "Season 2: cart and checkout façades, then only proven orchestration", "description": "Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.\n\n- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.\n- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.\n- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.\n- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.\n- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.", "dependencies": ["S14", "S17", "S18"]}, {"step_id": "S20", "title": "Certify the second peak and rehearse full-load reversion", "description": "Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same protection window. No first-time cutovers or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale, agree provider rate limits, and staff a war room.\n- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.\n- After the sale, compare actuals to forecasts and freeze lessons into the final wave.", "dependencies": ["S16", "S17", "S18", "S19"]}, {"step_id": "S21", "title": "Move back-office by workflow and transfer write ownership only where proven", "description": "Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.\n\n- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.\n- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.\n- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.\n- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.\n- Do not delete tables, procedures, or flags as part of initial ownership transfer.", "dependencies": ["S19", "S20"]}, {"step_id": "S22", "title": "Shrink residual coupling and hand over a durable operating model", "description": "Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.\n\n- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.\n- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.\n- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.\n- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.\n- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.\n- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.", "dependencies": ["S21"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.\n- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.\n- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.\n- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.\n- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.\n- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.\n- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.\n- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.\n- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.\n- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.\n- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.\n- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing."}The revision consolidates the original 23 steps into 21 by merging the resilience-patterns step into the event-backbone step and splitting the single peak gate into two explicit gates (S18, S20) aligned to January and July. Data-ownership cutovers (S19) are now explicitly scheduled after the second peak, reducing risk. The plan adds a back-office step (S17) that was missing in round 1.
Success metrics now include '10 core capabilities independently deployable', up from 8, which is more ambitious but supported by the step structure.
- Two explicit peak gates (S18 for first peak, S20 for second) replace a single generic gate, with specific service lists per gate
- S19 (data ownership cutovers) is now explicitly placed after the second peak, reducing risk during sales windows
- New S17 adds incremental back-office migration with BFF, parallel operation, and role-based access, filling a gap in round 1
- S15 (cart/checkout façade) now explicitly separates deployability from ownership transfer, matching the safer pattern from Proposals 2 and 3
- Success metrics add 'each table has exactly one owning service by month 12', making data ownership measurable
- Dropping the standalone inter-service communication and resilience-patterns step (round-1 S9) loses explicit circuit-breaker, bulkhead, and fallback-strategy guidance; these are now only implied in S8
- S14 (pricing extraction) depends on S18 (first peak gate), creating a circular-ish dependency: pricing shadow mode needs peak certification, but peak certification lists pricing as a service to test
- The '10 core capabilities independently deployable' metric is more aggressive than the conditional language elsewhere in the plan, creating tension
- Proposal 2 : Warehouse adapter that journals, validates, deduplicates, acknowledges, retries, and replays files, with reconciliation per SKU and warehouse before traffic shift.
- Proposal 2 : Peak certification includes game days for provider outage, event delay/duplication, database failover, cache failure, and flag/gateway failure, with written sign-off from all stakeholders.
- Proposal 3 : Strangler edge step explicitly preserving mobile API compatibility and stating 'no mobile release should be required for a backend cutover'.
- Proposal 3 : Order-query slices and payment-provider adapters as independently deployable capabilities before checkout orchestration changes.
- Proposal 5 : Specific SLO numbers (storefront p99 < 400 ms, checkout p99 < 1.2 s) and error-budget auto-rollback policy.
- Proposal 3 : Explicit non-goals list including 'no monolith decommission' as a year-one promise.
- Proposal 2 : Year-one exit scope defined as façades with conditional ownership transfer, explicitly accepting that legacy pricing and checkout may remain delegated.
+ Monolith modularization and test hardening+ Strangler gateway and traffic routing+ Extract search service+ Build cart/checkout façade and payment provider adapters+ Modernise back-office incrementally+ Pre-peak readiness gate #1+ Transfer data ownership one entity group at a time after the second peak+ Pre-peak readiness gate #2+ Retire obsolete paths and establish steady-state governanceDeploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic RollbackStabilise and Modularise the Monolith In PlaceBuild Inter-Service Communication Framework and Resilience PatternsRaise Test Coverage, Contract Tests, and Safety Net Before Cutting SeamsExtract Cart, Checkout, and Payment Orchestration Service (Wave 5)Extract Back-Office Capabilities and Storefront Modernisation (Wave 7)Transfer Data Ownership Through Controlled Cutovers and Retire Stored ProceduresExecute Progressive Traffic Migration, Rollback Drills, and Chaos TestingPeak-Season Resilience Certification and Capacity ValidationMonolith Decommission, Final Data Migration, and Steady-State Governance
The plan produced
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (after 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (after 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (after 2) from P5 step 4
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (after 3, 4) from P5 step 5
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (after 2, 4, 5) new
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (after 4, 5, 6) from P3 step 9
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (after 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (after 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (after 7, 8, 9)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (after 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (after 7, 8, 10) from P2 step 12
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (after 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (after 10, 11, 12, 13, 18)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (after 11, 12, 14, 18) from P3 step 18
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (after 12, 15) from P1 step 20
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (after 10, 11, 12, 14, 15, 16) from P2 step 20
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (after 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (after 20) from P2 step 19
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (after 5, 14, 15, 16, 17, 18)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (after 19) from P1 step 23
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 78422c30-0658-482e-9dd9-24903d13d8db, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
Previous Proposal 2 (ID: 22b16580-40e1-4832-b2a2-1ae110438ab8, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
Previous Proposal 3 (ID: 36139e82-24a4-4a60-b6bc-e9255b8a8c86, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
Previous Proposal 4 (ID: b54d6d10-cfee-4ab8-881e-f99325826938, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
Previous Proposal 5 (ID: ebf249ae-88f6-45db-9d66-e3341d87cfa6, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "The structure every proposing agent must answer with.", "properties": {"steps": {"items": {"description": "One step of a proposed plan. Dependencies are step_ids of the same proposal.", "properties": {"step_id": {"title": "Step Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "dependencies": {"items": {"type": "string"}, "title": "Dependencies", "type": "array"}}, "required": ["step_id", "title", "description", "dependencies"], "title": "Step", "type": "object", "additionalProperties": false}, "title": "Steps", "type": "array"}, "estimated_complexity": {"title": "Estimated Complexity", "type": "string"}, "success_metrics": {"title": "Success Metrics", "type": "string"}}, "required": ["steps", "estimated_complexity", "success_metrics"], "title": "ProposalContent", "type": "object", "additionalProperties": false}
{"steps": [{"step_id": "S1", "title": "Programme governance, peak calendar, and team model", "description": "Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.\n- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.\n- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.\n- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.\n- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.\n- Keep all new feature work on feature flags so deployment is decoupled from customer release.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data, traffic, and invariants", "description": "Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.\n- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.\n- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.\n- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.\n- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.\n- Create anonymised production-like fixtures and a repeatable load profile for later testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Target architecture and migration sequence", "description": "Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.\n- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.\n- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.\n- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.\n- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.\n- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Observability and SLO foundation", "description": "Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.\n- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.\n- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.\n- Alert on error-budget burn and business failures, not only infrastructure metrics.\n- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.\n- Add immutable audit events for pricing, payments, stock changes, and admin actions.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Delivery platform, feature flags, and progressive delivery", "description": "Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.\n- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.\n- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.\n- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.\n- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.\n- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Monolith modularization and test hardening", "description": "Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.\n- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.\n- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.\n- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.\n- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.\n- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Strangler gateway and traffic routing", "description": "Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.\n- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.\n- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.\n- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.\n- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.\n- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.", "dependencies": ["S4", "S5", "S6"]}, {"step_id": "S8", "title": "Event backbone, outbox, CDC, and reconciliation", "description": "Build the integration spine that decouples services and allows safe coexistence with the monolith.\n- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.\n- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.\n- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.\n- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.\n- Maintain the rule that one command owner writes each entity; replication and events feed everything else.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S9", "title": "Extract search service", "description": "Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.\n- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.\n- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.\n- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.\n- Keep the old Lucene index warm as a cold standby through the next peak.\n- Deploy independently at least weekly and practise rollback to monolith search.", "dependencies": ["S7", "S8"]}, {"step_id": "S10", "title": "Extract catalogue read service", "description": "Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.\n- Build country and language read models for eight markets around one product identity.\n- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.\n- Shadow-compare product data, availability display, and localization against the monolith.\n- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.\n- Do not make catalogue authoritative for price or stock.", "dependencies": ["S9", "S8", "S7"]}, {"step_id": "S11", "title": "Extract customer accounts, sessions, and loyalty service", "description": "Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.\n- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.\n- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.\n- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.\n- Ensure subject access and deletion work in both monolith and service during transition.\n- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.", "dependencies": ["S7", "S8", "S9"]}, {"step_id": "S12", "title": "Modernize warehouse integration and extract inventory availability service", "description": "Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.\n- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.\n- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.\n- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.\n- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.\n- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.", "dependencies": ["S7", "S8", "S10"]}, {"step_id": "S13", "title": "Pricing archaeology and golden-master harness", "description": "Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.\n- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.\n- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.\n- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.\n- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.\n- Produce a signed rule specification and a machine-readable rule catalogue.", "dependencies": ["S2", "S4", "S6"]}, {"step_id": "S14", "title": "Extract pricing and promotions service behind a façade", "description": "Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.\n- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.\n- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.\n- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.\n- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.\n- Publish pricing events when promotions are created or ended so downstream services can react.", "dependencies": ["S13", "S18", "S10", "S11", "S12"]}, {"step_id": "S15", "title": "Build cart/checkout façade and payment provider adapters", "description": "Strangle checkout without rewriting payment providers. A façade delegates to the current path first.\n- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.\n- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.\n- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.\n- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.", "dependencies": ["S14", "S18", "S11", "S12"]}, {"step_id": "S16", "title": "Extract order management and returns", "description": "Move post-purchase workflows after checkout emits reliable order events.\n- Publish order lifecycle events from the checkout/command owner using the outbox pattern.\n- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.\n- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.\n- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.\n- Keep legacy back-office order screens as fallback until the new portal is stable.", "dependencies": ["S15", "S12"]}, {"step_id": "S17", "title": "Modernise back-office incrementally", "description": "Replace back-office screens workflow by workflow, keeping legacy screens available.\n- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.\n- Migrate read-only views first, then command workflows after service ownership and controls are established.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.\n- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.\n- Remove direct SQL access to migrated data; move reports to governed read models.", "dependencies": ["S14", "S15", "S16", "S10", "S11", "S12"]}, {"step_id": "S18", "title": "Pre-peak readiness gate #1", "description": "Certify the hybrid estate before the first of January or July that falls inside the 12-month period.\n- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.\n- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.\n- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.\n- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.\n- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.", "dependencies": ["S5", "S7", "S8", "S9", "S10", "S11", "S12"]}, {"step_id": "S19", "title": "Transfer data ownership one entity group at a time after the second peak", "description": "After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.\n- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.\n- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.\n- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.\n- Retire stored procedures only when characterization tests prove equivalent service logic.\n- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.", "dependencies": ["S20"]}, {"step_id": "S20", "title": "Pre-peak readiness gate #2", "description": "Certify the more complete hybrid estate before the second peak period.\n- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.\n- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.\n- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.\n- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.\n- Obtain formal sign-off from all stakeholders before entering the protection window.", "dependencies": ["S5", "S18", "S14", "S15", "S16", "S17"]}, {"step_id": "S21", "title": "Retire obsolete paths and establish steady-state governance", "description": "Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.\n- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.\n- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.\n- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.\n- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.\n- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.", "dependencies": ["S19"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration across the 12 months.\n- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.\n- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.\n- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.\n- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.\n- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.\n- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.\n- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.\n- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.\n- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.\n- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.\n- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.\n- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.\n- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries."}The plan adds three new steps: pricing archaeology (S13), order-query/returns slices (S15), and payment-provider adapters (S16), filling gaps from round 1. The second peak gate (S22) is now explicit. However, the plan retains aggressive metrics ('monolith reduced ≥ 60%', 'daily deploy per service') alongside conditional language ('façade plus proven slices is success'), creating internal tension.
The step count grows to 23, the highest in the round, and some steps (S19, S20) are very long with many sub-bullets that could be split.
- New S13 (pricing archaeology) adds golden-master corpus with '≥ 1,000 real orders per country', dead-rule identification, and machine-readable rule catalogue
- New S15 (order query and returns slices) separates post-order value from the transactional checkout path, matching Proposals 2 and 3
- New S16 (payment adapters) isolates provider complexity before checkout changes, with explicit in-flight rollback semantics
- S22 adds explicit second-peak certification with disaster-recovery drills and post-sale lessons
- S14 adds 'If full engine extraction is not safe inside 12 months, the façade plus proven slices is success, not failure'
- Success metrics retain 'monolith codebase reduced by at least 60%', conflicting with the conditional pricing and checkout language in S14 and S17
- S19 (back-office and storefront) is overloaded: it covers back-office BFF, storefront refactor, mobile API migration, CDN caching, and E2E validation in one step
- The plan has 23 steps with some very long sub-bullet lists (S1, S13, S19, S20), making it harder for five teams to parse and assign ownership
- S23 (decommission) still promises 'zero production requests route to monolith for 30 consecutive days', which conflicts with the conditional scope language
- Proposal 2 : Warehouse adapter with journal, validate, deduplicate, acknowledge, and replay capabilities, running alongside the legacy job during transition.
- Proposal 2 : Pricing slices require ≥ 99.99% exact parity on golden-master and production-shadow cases before live traffic, with business and finance sign-off per slice.
- Proposal 3 : Customer extraction starts with replicated profile and loyalty-balance reads; loyalty is modelled as an auditable ledger with balance inquiry before accrual or redemption.
- Proposal 3 : Cart and checkout façades initially delegate to legacy commands; ownership transfer only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Proposal 3 : Explicit non-goals list: no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise.
- Proposal 2 : Year-one exit scope defined as independently deployable façades with conditional ownership transfer, explicitly accepting that legacy pricing and checkout may remain delegated.
+ Pricing archaeology, golden-master harness, and pricing façade+ Extract order query, notifications, and returns slices (Wave 3)+ Introduce payment-provider adapters and financial reconciliation (Wave 4)+ Peak-season resilience certification and capacity validation (July)Build Inter-Service Communication Framework and Resilience PatternsDeep Pricing Archaeology, Rule Documentation, and Dual-Run HarnessExecute Progressive Traffic Migration, Rollback Drills, and Chaos Testing
The plan produced
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (after 1)
Build an evidence-based picture of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (after 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (after 2)
Instrument the monolith and all future services so that every extraction is measurable and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (after 3)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (after 4, 5)
Place an API gateway in front of the monolith that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (after 2, 4)
The monolith remains a production dependency for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (after 5, 7)
Create the integration spine that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (after 2, 4, 5)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (after 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (after 6, 8, 9) from P2 step 12
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (after 6, 8, 9)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (after 2, 7, 9) from P3 step 15
Do not extract the 200,000-line pricing module until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (after 10, 11, 13)
Rebuild the highest-risk module as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (after 8, 12) from P3 step 17
Create independently deployable order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (after 6, 8, 9) from P2 step 16
Isolate provider-specific complexity before changing checkout orchestration or payment ownership. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (after 12, 14, 16)
Move the revenue-critical transaction path only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (after 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (after 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (after 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (after 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (after 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (after 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 78422c30-0658-482e-9dd9-24903d13d8db, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
Previous Proposal 2 (ID: 22b16580-40e1-4832-b2a2-1ae110438ab8, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
Previous Proposal 3 (ID: 36139e82-24a4-4a60-b6bc-e9255b8a8c86, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
Previous Proposal 4 (ID: b54d6d10-cfee-4ab8-881e-f99325826938, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
Previous Proposal 5 (ID: ebf249ae-88f6-45db-9d66-e3341d87cfa6, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter, governance, peak-protection calendar, and team operating model", "description": "Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.\n\n- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.\n- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.\n- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.\n- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.\n- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.\n- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.\n- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data model, traffic, and operational risk", "description": "Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.\n\n- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.\n- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.\n- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.\n- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.\n- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.\n- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.\n- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target service architecture, domain boundaries, and honest 12-month scope", "description": "Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.\n\n- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.\n- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.\n- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.\n- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.\n- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.\n- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.\n- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.\n- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build observability, SLOs, and production safety foundations", "description": "Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.\n\n- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.\n- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.\n- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.\n- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.\n- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.\n- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.\n- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime", "description": "Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.\n\n- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.\n- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.\n- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.\n- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.\n- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.\n- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.\n- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.", "dependencies": ["S3"]}, {"step_id": "S6", "title": "Deploy strangler gateway with instant traffic rollback", "description": "Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.\n\n- Deploy an API gateway or service mesh in front of the existing load balancer.\n- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.\n- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.\n- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.\n- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.\n- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.\n- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Stabilise and modularise the monolith in place", "description": "The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.\n\n- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.\n- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.\n- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.\n- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.\n- Add feature flags and kill switches around all new monolith-to-service integrations.\n- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.\n- Raise automated regression coverage around critical journeys before touching them.", "dependencies": ["S2", "S4"]}, {"step_id": "S8", "title": "Build event backbone, outbox, CDC, and data-transition patterns", "description": "Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.\n\n- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.\n- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.\n- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.\n- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.\n- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.\n- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.\n- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.\n- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.\n- Validate that the backbone can sustain 12x peak event volume with headroom.", "dependencies": ["S5", "S7"]}, {"step_id": "S9", "title": "Raise test coverage, contract tests, and safety net before cutting seams", "description": "Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.\n\n- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.\n- Add integration tests using Testcontainers with a seeded copy of the production schema.\n- Introduce consumer-driven contract tests between every pair of modules that will become separate services.\n- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.\n- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.\n- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.\n- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).\n- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S10", "title": "Extract catalogue read service and modernise search (Wave 1)", "description": "Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.\n\n- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.\n- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.\n- Build country and language-specific read models for eight markets around one product identity.\n- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.\n- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.\n- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.\n- Keep the old Lucene index warm through the next sale as a cold standby.\n- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Modernise warehouse integration and extract inventory availability reads (Wave 2)", "description": "Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.\n\n- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.\n- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.\n- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.\n- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.\n- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.\n- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.\n- Prove no extra oversell versus today's 15-minute lag before a sale.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S12", "title": "Extract customer accounts, identity, and loyalty service (Wave 2)", "description": "Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.\n\n- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.\n- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.\n- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.\n- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.\n- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.\n- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.\n- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.\n- Rollback restores monolith authentication with no password resets or forced logouts.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S13", "title": "Pricing archaeology, golden-master harness, and pricing façade", "description": "Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.\n\n- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.\n- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.\n- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.\n- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.\n- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.\n- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.\n- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.", "dependencies": ["S2", "S7", "S9"]}, {"step_id": "S14", "title": "Extract pricing and promotions service behind dual-run comparison (Wave 3)", "description": "Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.\n\n- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.\n- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).\n- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.\n- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.\n- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.\n- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.\n- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S10", "S11", "S13"]}, {"step_id": "S15", "title": "Extract order query, notifications, and returns slices (Wave 3)", "description": "Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.\n\n- Publish reliable order lifecycle events from the monolith using the outbox pattern.\n- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.\n- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.\n- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.\n- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.\n- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.", "dependencies": ["S8", "S12"]}, {"step_id": "S16", "title": "Introduce payment-provider adapters and financial reconciliation (Wave 4)", "description": "Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.\n\n- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.\n- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.\n- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.\n- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.\n- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.\n- Keep PCI and provider contracts stable throughout the migration.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S17", "title": "Extract cart and checkout orchestration with progressive traffic control (Wave 5)", "description": "Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.\n\n- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.\n- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.\n- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.\n- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.\n- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.", "dependencies": ["S12", "S14", "S16"]}, {"step_id": "S18", "title": "Extract order management, returns, and post-order workflows (Wave 5)", "description": "Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.\n\n- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.\n- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.\n- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.\n- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.\n- Back-office order views call the new service API through the gateway; legacy views remain as fallback.\n- Validate that the returns process (including cross-border returns across the 8 countries) works identically.\n- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.", "dependencies": ["S15", "S17"]}, {"step_id": "S19", "title": "Migrate back-office workflows and modernise storefront integration (Wave 6)", "description": "Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.\n\n- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.\n- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.\n- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.\n- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.\n- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.\n- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.\n- Validate all 4 language / 3 currency combinations through automated E2E tests.\n- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.", "dependencies": ["S10", "S11", "S12", "S15", "S18"]}, {"step_id": "S20", "title": "Transfer data ownership through controlled single-writer cutovers", "description": "Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.\n\n- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.\n- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.\n- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.\n- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.\n- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.\n- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.\n- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.\n- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.\n- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.", "dependencies": ["S10", "S11", "S12", "S14", "S15", "S17"]}, {"step_id": "S21", "title": "Peak-season resilience certification and capacity validation (January)", "description": "Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.\n\n- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.\n- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.\n- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.\n- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.\n- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.\n- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.\n- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.\n- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.\n- Any component that fails the 12x test blocks go-live.", "dependencies": ["S5", "S9", "S10", "S11"]}, {"step_id": "S22", "title": "Peak-season resilience certification and capacity validation (July)", "description": "Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.\n- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.\n- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.\n- After the sale, compare actuals to forecasts and freeze lessons into the next wave.\n- Obtain formal peak-readiness sign-off from all stakeholders.", "dependencies": ["S14", "S17", "S21"]}, {"step_id": "S23", "title": "Monolith decommission, final data migration, and steady-state governance", "description": "Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.\n\n- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.\n- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.\n- Remove feature flags and dark-launch paths for all migrated capabilities.\n- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.\n- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.\n- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.\n- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.\n- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.\n- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.\n- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.", "dependencies": ["S19", "S20", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.\n- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).\n- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.\n- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.\n- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.\n- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.\n- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.\n- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.\n- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.\n- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.\n- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.\n- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.\n- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.\n- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.\n- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.\n- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.\n- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.\n- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.\n- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support."}Round 3 — refinement 3 of 4
All five proposals converged strongly on a shared vocabulary and structure: an honest year-one scope that accepts façades as valid outcomes, a seasonal cadence gated by two formal peak-certification steps, and a single extraction playbook. The main remaining differentiator is conservatism about timing and write-ownership transfer: Proposals 2 and 3 remain the most cautious, Proposal 1 adds explicit programme re-forecasting, and Proposals 4 and 5 lean toward a fuller 23-step programme with more ambitious decommission targets.
The calls of this round
Influences: who took what from whom
| Round 3 ↓ · round 2 → | Proposal 1 | Proposal 2 | Proposal 3 | Proposal 4 | Proposal 5 | New steps |
|---|---|---|---|---|---|---|
| Proposal 1 |
kept9 | same titles2 analyst sees+1 / −1 | same titles0 analyst sees+1 / −1 | same titles1 analyst sees+0 / −0 | same titles5 analyst sees+1 / −0 | new6 |
| Proposal 2 |
same titles0 analyst sees+0 / −1 | kept11 | same titles1 analyst sees+1 / −0 | same titles0 analyst sees+0 / −1 | same titles0 analyst sees+1 / −0 | new6 |
| Proposal 3 |
same titles0 analyst sees+0 / −1 | same titles0 analyst sees+1 / −0 | kept19 | same titles0 analyst sees+0 / −1 | same titles0 analyst sees+1 / −0 | new1 |
| Proposal 4 |
same titles8 analyst sees+1 / −0 | same titles1 analyst sees+0 / −1 | same titles1 analyst sees+1 / −1 | kept10 | same titles3 analyst sees+1 / −0 | new0 |
| Proposal 5 |
same titles3 analyst sees+1 / −1 | same titles5 analyst sees+1 / −0 | same titles10 analyst sees+1 / −0 | same titles2 analyst sees+0 / −1 | kept3 | new0 |
Proposal 1 adds genuinely new programme-management ideas (decision trees for migration delay, a Month-3 strategic review, a 4-month warehouse-adapter burn-in gate) and restructures the calendar around explicit month labels. However, it removes the dedicated progressive traffic migration step from its previous version and the standalone peak readiness gate 1, folding traffic management and certification into other steps. The result is richer in programme control but thinner in operational execution detail.
- Step 15 (Post-peak 1 strategic review) introduces a formal re-forecast mechanism if migration slips exceed 20% of planned capacity, absent from all other proposals
- Step 11 requires the warehouse adapter to operate for at least 4 months before inventory read extraction, adding a concrete reliability gate
- Success metrics add a post-peak reforecast threshold and warehouse-adapter stability duration, making programme adaptability measurable
- Step 1 explicitly documents decision trees for migration delay scenarios (pricing archaeology taking 4 months instead of 2)
- Removed the standalone progressive traffic migration step (previous S22) that provided a detailed stage-by-stage traffic playbook with quantitative promotion criteria
- Removed peak readiness gate 1 as a distinct step; the January peak is handled only through the strategic review in S15, losing explicit load-test and reversion-rehearsal detail for the first peak
- Removed the standalone storefront BFF refactoring detail (CDN, edge caching, mobile backward-compatibility enforcement) that was in previous S20
- Success metric deployment frequency weakened from 'at least daily per service' to 'at least weekly per service'
- Proposal 3 : The explicit extraction playbook codified as a single mandatory process for all teams, including the rule that write rollback differs from route rollback.
- Proposal 2 : The explicit non-goals list and the principle that a façade delegating to the monolith is an acceptable year-one outcome.
- Proposal 5 : The extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, and rollback quality as scoring dimensions.
- Proposal 3 : The explicit rule to keep the monolith on Java 8 and start new services on a current LTS, with Java 8 upgrade listed as a non-goal.
- Proposal 2 : The principle that a September start leaves too little time before January for major domain extraction, limiting pre-January scope to operational foundations.
+ Charter programme with capacity model and peak-protection calendar+ Stabilise monolith and create extraction seams+ Deploy event backbone, outbox pattern, and reconciliation framework+ Strengthen test coverage and build safety net+ Modernise warehouse integration without changing warehouse contract+ Wave 1: Extract search and catalogue read services (Months 2–4, post-January)+ Post-peak 1 strategic review and capacity rebalancing (Month 3)+ Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8)+ Pre-peak 2 readiness certification (Month 6, before July)+ Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer)+ Wave 3: Order service and post-purchase workflows (Months 9–11)Charter, governance, peak-protection calendar, and team operating modelStabilise and modularise the monolith in placeBuild event backbone, outbox, CDC, and data-transition patternsRaise test coverage, contract tests, and safety net before cutting seamsExtract catalogue read service and modernise search (Wave 1)Extract pricing and promotions service behind dual-run comparison (Wave 3)Extract cart and checkout orchestration with progressive traffic control (Wave 5)Extract order management, returns, and post-order workflows (Wave 5)Peak-season resilience certification and capacity validation (January)Peak-season resilience certification and capacity validation (July)Monolith decommission, final data migration, and steady-state governance
The plan produced
1. Charter programme with capacity model and peak-protection calendar new
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (after 1) from P5 step 2
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (after 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (after 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (after 3, 4) from P5 step 5
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (after 4, 5) from P5 step 6
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (after 2, 4) from P2 step 7
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (after 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (after 2, 4, 5, 7) new
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (after 2, 7, 9) from P4 step 13
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (after 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (after 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (after 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (after 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (after 4, 12, 13, 14) new
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (after 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (after 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (after 6, 8, 9) from P5 step 16
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (after 5, 9, 12, 13, 14) new
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (after 13, 16, 18) new
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (after 8, 14, 17, 20) new
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (after 12, 16, 17, 20, 21) from P5 step 19
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (after 8, 12, 13, 14, 16, 18, 20, 21, 22) from P2 step 18
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: fcda7308-45cd-41e0-bd70-0eb1f922bdde, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
Previous Proposal 2 (ID: 8acc83c9-8c26-4ca9-bcf9-6e34ebc47a34, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
Previous Proposal 3 (ID: 967b6acc-d50a-47de-93dd-75d8f3da72d4, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Previous Proposal 4 (ID: 8151bd29-0f0f-4347-b6b7-9fa374191c2c, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
Previous Proposal 5 (ID: b658c637-ca64-4543-b1fd-0e5f8e964efe, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter programme with capacity model and peak-protection calendar", "description": "Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.\n\nAppoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.\n\nPublish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.\n\nDefine the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data model, traffic, and operational risk", "description": "Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.\n\nTrace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.\n\nClassify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.\n\nCreate a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture, bounded contexts, and data-ownership rules", "description": "Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.\n\nDefine bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.\n\nProhibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.\n\nSequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build observability, SLOs, and error-budget control", "description": "Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.\n\nDeploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.\n\nImplement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.\n\nCreate immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build delivery platform: CI/CD, feature flags, canary deployment, and runtime", "description": "Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.\n\nStand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.\n\nProvision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.\n\nCentralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Place strangler gateway with instant traffic routing and rollback", "description": "Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.\n\nDeploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.\n\nImplement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.\n\nImplement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Stabilise monolith and create extraction seams", "description": "The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.\n\nEnforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.\n\nApply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.\n\nBuild characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.", "dependencies": ["S2", "S4"]}, {"step_id": "S8", "title": "Deploy event backbone, outbox pattern, and reconciliation framework", "description": "Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.\n\nDeploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.\n\nBuild a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.\n\nDefine entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S9", "title": "Strengthen test coverage and build safety net", "description": "Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.\n\nBuild characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.\n\nBuild end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.\n\nBuild a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S10", "title": "Pricing archaeology and golden-master corpus", "description": "Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).\n\nForm a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.\n\nInventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.\n\nProduce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.\n\nDeliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.", "dependencies": ["S2", "S7", "S9"]}, {"step_id": "S11", "title": "Modernise warehouse integration without changing warehouse contract", "description": "The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.\n\nBuild a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.\n\nImplement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.\n\nTest delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.\n\nThis adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.", "dependencies": ["S3", "S8"]}, {"step_id": "S12", "title": "Wave 1: Extract search and catalogue read services (Months 2–4, post-January)", "description": "Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.\n\nBuild a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.\n\nRun both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.\n\nRollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S13", "title": "Wave 1: Extract inventory availability reads (Months 3–5)", "description": "Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.\n\nBuild an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.\n\nShadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.\n\nPreserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).\n\nProvide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.", "dependencies": ["S6", "S8", "S9", "S11", "S12"]}, {"step_id": "S14", "title": "Wave 1: Extract customer, identity, and loyalty service (Months 3–5)", "description": "Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.\n\nDefine canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.\n\nStart with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.\n\nMove loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.\n\nMaintain a staffed exception process for mismatched data-subject requests and loyalty records.", "dependencies": ["S6", "S8", "S9", "S12"]}, {"step_id": "S15", "title": "Post-peak 1 strategic review and capacity rebalancing (Month 3)", "description": "After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.\n\nMeasure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?\n\nReview the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.\n\nFormalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.\n\nThis review determines whether Waves 3 and 4 proceed as planned or are restructured.", "dependencies": ["S4", "S12", "S13", "S14"]}, {"step_id": "S16", "title": "Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8)", "description": "Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.\n\nBuild a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).\n\nRun the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.\n\nBegin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.\n\nIf full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.", "dependencies": ["S10", "S12", "S13"]}, {"step_id": "S17", "title": "Wave 2: Extract order-query and returns slices (Months 5–8)", "description": "Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.\n\nPublish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.\n\nExtract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.\n\nBackfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.\n\nKeep legacy back-office order screens as fallback until the new portal is stable.", "dependencies": ["S8", "S13", "S14"]}, {"step_id": "S18", "title": "Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8)", "description": "Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.\n\nWrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.\n\nIntroduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.\n\nPreserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.\n\nAgree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S19", "title": "Pre-peak 2 readiness certification (Month 6, before July)", "description": "Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.\n\nFreeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.\n\nRun full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.\n\nTest traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.\n\nObtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.", "dependencies": ["S5", "S9", "S12", "S13", "S14"]}, {"step_id": "S20", "title": "Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer)", "description": "Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.\n\nDefine cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.\n\nAdd checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.\n\nMove cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n\nCanary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.\n\nIf ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.", "dependencies": ["S13", "S16", "S18"]}, {"step_id": "S21", "title": "Wave 3: Order service and post-purchase workflows (Months 9–11)", "description": "Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.\n\nPublish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.\n\nBuild a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.\n\nBackfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.\n\nValidate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.", "dependencies": ["S8", "S14", "S17", "S20"]}, {"step_id": "S22", "title": "Modernise back-office and storefront integration (Months 9–12)", "description": "Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.\n\nDeliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.\n\nRun old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.\n\nRefactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.\n\nImplement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.", "dependencies": ["S12", "S16", "S17", "S20", "S21"]}, {"step_id": "S23", "title": "Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12)", "description": "Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.\n\nFor each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.\n\nRoute writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.\n\nRewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.\n\nSchedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.", "dependencies": ["S8", "S12", "S13", "S14", "S16", "S18", "S20", "S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "\n- Zero unplanned customer-facing downtime attributable to migration across the 12 months.\n- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.\n- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).\n- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.\n- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.\n- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.\n- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.\n- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.\n- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.\n- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.\n- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.\n- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.\n- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.\n- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.\n- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.\n- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.\n- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.\n- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.\n- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.\n- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.\n- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12."}Proposal 2 consolidates 21 steps into 18 by merging related activities (instrumentation with testing, paved road with monolith modularisation, pricing slices with cart/checkout façades). It adds a concrete September-to-August calendar example and sharpens command-rollback semantics. The compression improves readability without losing substantive content, and the January gate (S9) is now more explicit about limited pre-January scope.
- Step 9 explicitly acknowledges a September start leaves limited pre-January time and restricts first-season scope to operational foundations and rehearsed read improvements
- Step 6 adds explicit in-flight command semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back
- Steps 4 and 5 merge observability, testing, paved road, and monolith modularisation into two dense steps, reducing coordination overhead while preserving all content
- Success metrics add explicit inventory-oversell baseline comparison and mobile/storefront contract compatibility as standalone metrics
- Merging steps reduces traceability: the previous separate 'Create test, contract, and capacity evidence' step (S6) is now embedded in S4, making it harder to assign ownership and track completion
- The previous explicit 'Do not make Java modernization or repository splitting a prerequisite' guidance is compressed into a single clause in S5, losing emphasis
- Previous step 14 (order views, notifications, bounded returns) is merged into S13 with less detail on freshness labels and cross-border return validation
- Proposal 3 : The explicit non-goals list (big-bang pricing rewrite, physical database split, Java 8 upgrade, forced mobile release, warehouse-contract change, monolith decommission) and the conditional throttle if the first sale is fewer than 16 weeks away.
- Proposal 5 : The extraction scorecard dimensions: coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
- Proposal 1 : A formal post-peak strategic review with capacity re-forecasting if migration slips exceed 20%.
- Proposal 4 : The target of monolith codebase reduction by at least 60% and the remaining monolith no longer serving customer traffic for migrated domains.
+ Build operational control and the behavioural safety net+ Create the paved road and make the monolith safe to coexist+ Install edge routing with safe fallback semantics+ January peak gate: freeze risk and certify the initial hybrid estate+ Move proven pricing slices and introduce cart and checkout façades+ July peak gate: certify the expanded hybrid topology+ Transfer only evidence-backed ownership and migrate back-office workflowsInstrument the estate and establish operational controlBuild the delivery, security, and progressive-release paved roadCreate test, contract, and capacity evidenceModularise the monolith and create stable seamsDeploy edge routing and channel-compatible façadesMove only proven pricing rule slicesIntroduce cart and checkout façades, then migrate safe orchestrationTransfer data ownership through single-writer cutoversMigrate back-office workflows by role and domainCertify each sales peak and rehearse full reversion
The plan produced
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (after 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (after 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (after 2) from P3 step 6
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (after 3, 4) new
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (after 4, 5) new
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (after 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (after 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (after 4, 5, 6, 7) new
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (after 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (after 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (after 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (after 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (after 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (after 8, 11, 12, 14) new
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (after 10, 11, 12, 13, 14, 15) new
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (after 13, 15, 16) new
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (after 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: fcda7308-45cd-41e0-bd70-0eb1f922bdde, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
Previous Proposal 2 (ID: 8acc83c9-8c26-4ca9-bcf9-6e34ebc47a34, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
Previous Proposal 3 (ID: 967b6acc-d50a-47de-93dd-75d8f3da72d4, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Previous Proposal 4 (ID: 8151bd29-0f0f-4347-b6b7-9fa374191c2c, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
Previous Proposal 5 (ID: b658c637-ca64-4543-b1fd-0e5f8e964efe, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter the programme and protect both sales peaks", "description": "Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.\n\n- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.\n- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.\n- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.\n- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.\n- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.\n- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.", "dependencies": []}, {"step_id": "S2", "title": "Baseline behaviour, dependencies, data, and peak capacity", "description": "Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.\n\n- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.\n- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.\n- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.\n- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.\n- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.\n- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set boundaries, ownership rules, and realistic year-one scope", "description": "Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.\n\n- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.\n- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.\n- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.\n- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.\n- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.\n- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build operational control and the behavioural safety net", "description": "Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.\n\n- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.\n- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.\n- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.\n- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.\n- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.\n- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.\n- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Create the paved road and make the monolith safe to coexist", "description": "Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.\n\n- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.\n- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.\n- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.\n- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.\n- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.\n- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.\n- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Install edge routing with safe fallback semantics", "description": "Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.\n\n- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.\n- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.\n- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.\n- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.\n- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.\n- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Establish events, replication, and reconciliation as a product", "description": "Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.\n\n- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.\n- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.\n- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.\n- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.\n- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.\n- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.", "dependencies": ["S3", "S5"]}, {"step_id": "S8", "title": "Run pricing archaeology and deploy a legacy pricing façade", "description": "Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.\n\n- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.\n- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.\n- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.\n- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.\n- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.\n- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.\n- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S9", "title": "January peak gate: freeze risk and certify the initial hybrid estate", "description": "Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.\n\n- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.\n- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.\n- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.\n- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.\n- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.\n- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.", "dependencies": ["S4", "S5", "S6", "S7"]}, {"step_id": "S10", "title": "Extract search and catalogue read models after January", "description": "Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.\n\n- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.\n- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.\n- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.\n- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.\n- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.\n- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.", "dependencies": ["S6", "S7", "S9"]}, {"step_id": "S11", "title": "Wrap warehouse exchange and extract inventory availability reads", "description": "Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.\n- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.\n- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.\n- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.\n- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.\n- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.", "dependencies": ["S6", "S7", "S9", "S10"]}, {"step_id": "S12", "title": "Extract customer, consent, and low-risk loyalty slices", "description": "Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.\n\n- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.\n- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.\n- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.\n- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.\n- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.\n- Retain immediate route fallback and independent service operational ownership for every released slice.", "dependencies": ["S6", "S7", "S9"]}, {"step_id": "S13", "title": "Deliver order queries, notifications, and bounded returns", "description": "Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.\n\n- Publish reliable order lifecycle facts using the outbox from the current command owner.\n- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.\n- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.\n- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.\n- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.\n- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.", "dependencies": ["S6", "S7", "S11", "S12"]}, {"step_id": "S14", "title": "Isolate payment providers and introduce financial controls", "description": "Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.\n\n- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.\n- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.\n- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.\n- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.\n- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.\n- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.", "dependencies": ["S4", "S6", "S7", "S13"]}, {"step_id": "S15", "title": "Move proven pricing slices and introduce cart and checkout façades", "description": "Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.\n\n- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.\n- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.\n- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.\n- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.\n- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.\n- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.", "dependencies": ["S8", "S11", "S12", "S14"]}, {"step_id": "S16", "title": "July peak gate: certify the expanded hybrid topology", "description": "Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.\n\n- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.\n- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.\n- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.\n- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.\n- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.\n- Require formal sign-off from the same cross-functional group used for January.", "dependencies": ["S10", "S11", "S12", "S13", "S14", "S15"]}, {"step_id": "S17", "title": "Transfer only evidence-backed ownership and migrate back-office workflows", "description": "After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.\n\n- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.\n- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.\n- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.\n- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.\n- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.\n- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.\n- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.", "dependencies": ["S13", "S15", "S16"]}, {"step_id": "S18", "title": "Consolidate the sustainable hybrid estate and publish follow-on scope", "description": "Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.\n\n- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.\n- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.\n- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.\n- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.\n- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.\n- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.", "dependencies": ["S17"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.\n- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.\n- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.\n- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.\n- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.\n- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.\n- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.\n- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.\n- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.\n- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.\n- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.\n- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.\n- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.\n- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition."}Proposal 3 makes two structural improvements: it merges the separate search and catalogue extraction steps into a single Season 1 step (S12), and it consolidates the final back-office, write-ownership, and steady-state handover into one closing step (S20). It adds a Postgres connection budget to the paved-road step and PCI scope protection to metrics. The result is tighter at 20 steps without losing substance.
- Step 5 adds an explicit Postgres connection budget for the hybrid estate, addressing a concrete capacity risk when services share the 1.2 TB database
- Success metrics add 'PCI scope is not expanded' as an explicit constraint, preventing scope creep during payment-adapter extraction
- Step 12 merges search and catalogue into one extraction step, reducing coordination overhead and acknowledging they share the same playbook and fallback path
- Step 15 adds 'Staff hypercare from the existing five teams. Do not assume extra people appear for sale week,' a realistic staffing constraint absent from other proposals
- Merging search and catalogue into one step (S12) loses the previous version's explicit sequencing where search was extracted first to validate the platform before catalogue; now both are treated simultaneously
- The final step (S20) combines back-office migration, write-ownership transfer, and steady-state governance, making it very dense and harder to schedule within the remaining timeline
- Removed the previous explicit 'If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only' from the charter step; it remains in S1 but is less prominent
- Proposal 2 : The explicit write-rollback semantics: routing a command back is insufficient; previously accepted commands must complete through their original compatible state machine or enter an auditable exception workflow.
- Proposal 5 : The extraction scorecard dimensions including coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Proposal 1 : The target of monolith codebase reduction by at least 60% and decommission of monolith infrastructure.
- Proposal 4 : Scheduling data ownership transfer only after the second peak (post-July), with a dedicated step for entity-by-entity write cutovers.
+ Build a thin paved road for independent deploymentKeep five domain teams and a thin paved-road platformSeason 1: extract search as the first independently deployable serviceShrink residual coupling and hand over a durable operating model
The plan produced
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (after 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (after 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (after 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (after 3, 4) new
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (after 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (after 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (after 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a route change, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (after 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (after 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (after 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (after 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (after 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (after 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (after 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (after 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (after 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (after 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (after 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (after 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: fcda7308-45cd-41e0-bd70-0eb1f922bdde, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
Previous Proposal 2 (ID: 8acc83c9-8c26-4ca9-bcf9-6e34ebc47a34, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
Previous Proposal 3 (ID: 967b6acc-d50a-47de-93dd-75d8f3da72d4, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Previous Proposal 4 (ID: 8151bd29-0f0f-4347-b6b7-9fa374191c2c, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
Previous Proposal 5 (ID: b658c637-ca64-4543-b1fd-0e5f8e964efe, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter the programme around peaks, money, and rollback", "description": "Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.\n\nFeature work never stops. Only production risk is constrained.\n\n- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.\n- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.\n- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.\n- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.\n- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.\n- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.\n- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.\n- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live system and freeze business invariants", "description": "Measure the live estate before changing it.\n\nThis baseline is the capacity, correctness, and rollback reference for every later wave.\n\n- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.\n- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.\n- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.\n- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.\n- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.\n- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set honest year-one boundaries and non-goals", "description": "Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.\n\n- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.\n- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.\n- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.\n- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.\n- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.\n- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.\n- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument the estate and define journey SLOs", "description": "Make the existing estate observable before any production traffic moves.\n\nYou cannot extract what you cannot see.\n\n- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.\n- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.\n- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.\n- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.\n- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.\n- Target five-minute detection for critical journey failure.", "dependencies": ["S1", "S2"]}, {"step_id": "S5", "title": "Build a thin paved road for independent deployment", "description": "Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.\n\n- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.\n- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.\n- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.\n- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.\n- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.\n- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.\n- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Build the behavioural safety net and 12x harness", "description": "Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.\n\nPrioritise affected journeys over a blanket line-coverage target.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.\n- Add characterisation tests around stored procedures and pricing before modifying them.\n- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.\n- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.\n- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Modularise the live monolith without stopping features", "description": "Create seams before you create processes. The monolith remains the primary system for most of the year.\n\n- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.\n- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Wrap high-risk access behind façades even while it still runs in-process.\n- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.\n- Add kill switches to every new monolith-to-service integration.\n- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Place a strangler edge with minute-scale rollback", "description": "Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.\n\n- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.\n- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.\n- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.\n- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.\n- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.\n- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.", "dependencies": ["S4", "S5", "S6", "S7"]}, {"step_id": "S9", "title": "Stand up events, outbox, and a reconciliation product", "description": "Build reusable coexistence patterns before moving data or command responsibility.\n\nServices subscribe to facts. They do not call each other's databases.\n\n- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.\n- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.\n- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.\n- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.\n- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S10", "title": "Codify one extraction playbook every team must use", "description": "Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.\n\nEvery extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.\n\n- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n- Shadow never duplicates payments or other customer-visible commands.\n- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.\n- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.\n- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.\n- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Start pricing archaeology and put a façade in front of the engine", "description": "Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.\n\nStart this in parallel with platform work.\n\n- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.\n- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.\n- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.\n- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.\n- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.\n- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.", "dependencies": ["S2", "S6", "S7"]}, {"step_id": "S12", "title": "Season 1: extract search and catalogue read models", "description": "Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.\n\n- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.\n- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.\n- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.\n- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.\n- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.\n- Keep the old Lucene index warm through the next sale as standby.", "dependencies": ["S10"]}, {"step_id": "S13", "title": "Season 1: wrap warehouse files and extract availability reads", "description": "Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.\n- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.\n- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.\n- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.", "dependencies": ["S10", "S12"]}, {"step_id": "S14", "title": "Season 1: extract customer reads and bounded loyalty with GDPR", "description": "Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.\n\n- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.\n- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.\n- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.\n- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.\n- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.", "dependencies": ["S10"]}, {"step_id": "S15", "title": "Certify the first peak on the real hybrid estate", "description": "Certify whatever is live, and every fallback, before the first of January or July.\n\nA service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers in the protection window. Feature work may continue behind flags.\n- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.\n- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.\n- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.\n- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.\n- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.\n- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.", "dependencies": ["S6", "S8", "S12", "S13"]}, {"step_id": "S16", "title": "Season 2: dual-run only proven pricing slices", "description": "Run a candidate evaluator in shadow until it matches the monolith on live baskets.\n\nCheckout keeps monolith prices until the money path is clean.\n\n- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.\n- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.\n- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.\n- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S11", "S12", "S15"]}, {"step_id": "S17", "title": "Season 2: order-query slices and payment-provider adapters", "description": "Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox.\n- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.\n- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.\n- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.\n- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.\n- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.\n- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.\n- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.", "dependencies": ["S9", "S14", "S15"]}, {"step_id": "S18", "title": "Season 2: cart and checkout façades, then only proven orchestration", "description": "Strangle the transactional path without a big-bang rewrite.\n\nIndependent deployability of the façade is valuable even if the monolith still executes the write.\n\n- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.\n- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.\n- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.\n- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.\n- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.", "dependencies": ["S13", "S16", "S17"]}, {"step_id": "S19", "title": "Certify the second peak and rehearse full-load reversion", "description": "Repeat certification before the second sale with more services in the path.\n\nDo not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same protection window. No first-time cutovers or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.\n- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.\n- After the sale, compare actuals to forecasts and freeze lessons into the final wave.", "dependencies": ["S15", "S16", "S17", "S18"]}, {"step_id": "S20", "title": "Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid", "description": "Move the 300 staff users by workflow and role, not by replacing the whole admin application.\n\nYear-end success is a smaller, honest hybrid, not a dark monolith at any cost.\n\n- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.\n- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.\n- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.\n- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.\n- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.\n- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.\n- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.", "dependencies": ["S18", "S19"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.\n- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.\n- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.\n- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.\n- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.\n- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.\n- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.\n- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.\n- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.\n- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.\n- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.\n- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing."}Proposal 4 restructures from 21 to 23 steps, adding dedicated steps for strangler gateway (S6), monolith modularisation (S7), and payment adapters (S17). It adopts the honest year-one scope and façade-as-success language from other proposals. However, it retains the aggressive success metric of 'at least 10 core capabilities independently deployable' and 'monolith codebase reduced by at least 60%', which conflict with the conservative tone adopted by most other proposals.
The step numbering introduces a dependency anomaly where S19 (data ownership) depends on S20 (peak gate 2).
- Step 6 (strangler gateway) is now a dedicated step with explicit traffic-mirroring rules, rollback rehearsal, and latency-overhead measurement, previously embedded in other steps
- Step 17 (payment adapters) is separated from checkout, matching the consensus that provider isolation precedes orchestration changes
- Step 3 now includes explicit entity transition states and the honest year-one exit scope, adopting the conditional-ownership language
- Success metrics add back-office availability and zero forced logouts as explicit constraints
- Step 19 (data ownership transfer) depends on step 20 (peak readiness gate 2), creating a circular-feeling dependency where ownership transfer is scheduled after the second peak but the peak gate depends on services being live
- The success metric 'at least 10 core capabilities independently deployable' and 'monolith codebase reduced by at least 60%' are more aggressive than the honest scope stated in step 3, creating internal inconsistency
- Removed the previous version's explicit 'Execute progressive traffic migration with measured increments' step; traffic management is now distributed across extraction steps without a unified playbook
- Step 21 (back-office and storefront) combines two substantial workstreams that were previously more clearly separated
- Proposal 1 : The wave-based extraction structure with search/catalogue first, then customer/inventory, then pricing, then checkout, with explicit shadow-comparison and traffic-shifting percentages.
- Proposal 3 : The explicit non-goals list and the principle that the façade is the independently deployable artefact if full extraction is unsafe.
- Proposal 5 : The explicit year-one exit scope listing independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query, payment adapters, pricing façade, and cart/checkout façades.
- Proposal 3 : The explicit rule to keep the monolith on Java 8 and start new services on a current LTS, with Java 8 upgrade as a non-goal.
- Proposal 2 : The principle that a September start limits pre-January scope to operational foundations only, deferring unproven service routes.
+ Programme governance, peak-protection calendar, and team capacity+ Target architecture, bounded contexts, and honest 12-month scope+ Strangler gateway and route-based rollback+ Monolith modularisation and test hardening+ Wave 4: Payment provider adapters and financial reconciliationMigration charter, governance and peak-protection freeze windowsDefine target bounded contexts, data ownership model, and extraction sequencePlace API gateway and strangler façade with instant rollbackStabilise and modularise the monolith in placeExecute progressive traffic migration with measured increments and automated rollback
The plan produced
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (after 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (after 2) from P5 step 3
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (after 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (after 3, 4) from P5 step 5
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (after 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (after 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (after 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (after 2, 4, 5, 7) from P1 step 9
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (after 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (after 3, 8, 9) from P1 step 11
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (after 6, 8, 9) from P1 step 12
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (after 6, 8, 9, 12) from P1 step 13
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (after 6, 8, 9, 11) from P1 step 14
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (after 9, 11, 12, 13, 14) from P1 step 15
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (after 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (after 6, 8, 9, 15) from P5 step 16
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (after 12, 13, 14, 16, 17) from P3 step 19
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (after 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (after 15, 16, 17, 18, 19) from P1 step 19
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (after 13, 16, 17, 18, 19, 20) from P1 step 20
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (after 8, 12, 13, 14, 16, 17, 18, 19, 21) from P2 step 18
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (after 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: fcda7308-45cd-41e0-bd70-0eb1f922bdde, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
Previous Proposal 2 (ID: 8acc83c9-8c26-4ca9-bcf9-6e34ebc47a34, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
Previous Proposal 3 (ID: 967b6acc-d50a-47de-93dd-75d8f3da72d4, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Previous Proposal 4 (ID: 8151bd29-0f0f-4347-b6b7-9fa374191c2c, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
Previous Proposal 5 (ID: b658c637-ca64-4543-b1fd-0e5f8e964efe, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "The structure every proposing agent must answer with.", "properties": {"steps": {"items": {"description": "One step of a proposed plan. Dependencies are step_ids of the same proposal.", "properties": {"step_id": {"title": "Step Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "dependencies": {"items": {"type": "string"}, "title": "Dependencies", "type": "array"}}, "required": ["step_id", "title", "description", "dependencies"], "title": "Step", "type": "object", "additionalProperties": false}, "title": "Steps", "type": "array"}, "estimated_complexity": {"title": "Estimated Complexity", "type": "string"}, "success_metrics": {"title": "Success Metrics", "type": "string"}}, "required": ["steps", "estimated_complexity", "success_metrics"], "title": "ProposalContent", "type": "object", "additionalProperties": false}
{"steps": [{"step_id": "S1", "title": "Programme governance, peak-protection calendar, and team capacity", "description": "Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.\n\n- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.\n- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.\n- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.\n- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.\n- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data, traffic, and business invariants", "description": "Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.\n\n- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.\n- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.\n- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.\n- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.\n- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Target architecture, bounded contexts, and honest 12-month scope", "description": "Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.\n\n- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.\n- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.\n- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.\n- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.\n- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.\n- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Observability, SLOs, and business-failure alerting", "description": "Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.\n\n- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.\n- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.\n- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.\n- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.\n- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.\n- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "CI/CD, feature flags, progressive delivery, and secure runtime", "description": "Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.\n\n- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.\n- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.\n- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.\n- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.\n- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Strangler gateway and route-based rollback", "description": "Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.\n\n- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.\n- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.\n- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.\n- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.\n- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Monolith modularisation and test hardening", "description": "Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.\n\n- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.\n- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Wrap high-risk database access behind repository/application interfaces.\n- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.\n- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.\n- Raise characterisation coverage on critical journeys before touching them.", "dependencies": ["S2", "S3", "S4", "S5"]}, {"step_id": "S8", "title": "Event backbone, outbox, CDC, and reconciliation", "description": "Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.\n\n- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.\n- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.\n- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.\n- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.\n- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S9", "title": "Characterisation, contract tests, and 12x load harness", "description": "Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.\n- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.\n- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.\n- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.\n- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S10", "title": "Pricing archaeology and golden-master corpus", "description": "Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.\n\n- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.\n- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.\n- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.\n- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.\n- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.\n- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.", "dependencies": ["S2", "S7", "S9"]}, {"step_id": "S11", "title": "Modernise warehouse integration without changing contract", "description": "Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.\n- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.\n- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.\n- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.\n- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.", "dependencies": ["S3", "S8", "S9"]}, {"step_id": "S12", "title": "Wave 1: Extract catalogue read service and modern search", "description": "Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.\n\n- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.\n- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.\n- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.\n- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.\n- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S13", "title": "Wave 2: Extract customer accounts, identity, and loyalty", "description": "Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.\n\n- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.\n- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.\n- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.\n- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.\n- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.", "dependencies": ["S6", "S8", "S9", "S12"]}, {"step_id": "S14", "title": "Wave 2: Extract inventory availability reads", "description": "Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.\n\n- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.\n- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.\n- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.\n- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.\n- Prove no oversell increase before any sale.", "dependencies": ["S6", "S8", "S9", "S11"]}, {"step_id": "S15", "title": "Peak readiness gate 1: certify hybrid estate before first sale", "description": "Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.\n\n- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.\n- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.\n- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.\n- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.\n- Pre-scale, warm caches, agree provider rate limits, and staff a war room.\n- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.", "dependencies": ["S9", "S11", "S12", "S13", "S14"]}, {"step_id": "S16", "title": "Wave 3: Extract pricing and promotions service behind the façade", "description": "Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.\n\n- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.\n- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.\n- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.\n- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.\n- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.\n- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.", "dependencies": ["S10", "S12", "S13", "S14", "S15"]}, {"step_id": "S17", "title": "Wave 4: Payment provider adapters and financial reconciliation", "description": "Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.\n\n- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.\n- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.\n- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.\n- Preserve country and payment-method routing plus customer-facing response semantics during adoption.\n- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.", "dependencies": ["S6", "S8", "S9", "S15"]}, {"step_id": "S18", "title": "Wave 5: Cart/checkout façade and progressive orchestration", "description": "Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.\n\n- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.\n- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.\n- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.\n- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.\n- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.\n- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.", "dependencies": ["S12", "S13", "S14", "S16", "S17"]}, {"step_id": "S19", "title": "Wave 5: Extract order management, notifications, and returns", "description": "Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.\n\n- Publish reliable order lifecycle events from the current command owner using the outbox pattern.\n- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.\n- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.\n- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.\n- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.", "dependencies": ["S8", "S13", "S14", "S17", "S18"]}, {"step_id": "S20", "title": "Peak readiness gate 2: certify before second sale", "description": "Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.\n\n- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.\n- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.\n- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.\n- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.\n- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.", "dependencies": ["S15", "S16", "S17", "S18", "S19"]}, {"step_id": "S21", "title": "Migrate back-office by workflow and refactor storefront to services", "description": "Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.\n\n- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.\n- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.\n- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.\n- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.", "dependencies": ["S13", "S16", "S17", "S18", "S19", "S20"]}, {"step_id": "S22", "title": "Transfer data ownership through reversible single-writer cutovers", "description": "Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.\n\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.\n- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.\n- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.\n- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.\n- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.", "dependencies": ["S8", "S12", "S13", "S14", "S16", "S17", "S18", "S19", "S21"]}, {"step_id": "S23", "title": "Decommission legacy paths and establish steady-state governance", "description": "Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.\n\n- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.\n- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.\n- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.\n- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.\n- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.", "dependencies": ["S20", "S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.\n- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.\n- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.\n- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.\n- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.\n- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.\n- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.\n- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.\n- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.\n- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.\n- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.\n- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.\n- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration."}Proposal 5 undergoes the most substantial restructuring, moving from a grok-4.6-influenced seasonal structure to a comprehensive 23-step programme that integrates ideas from all four other proposals. It adds a dedicated extraction playbook step (S10), explicit static-analysis tooling (jQAssistant, ArchUnit), mutation testing, and a Postgres connection budget. The result is the most detailed and cross-referenced proposal, though at the cost of length.
- Step 10 codifies a single extraction playbook with quantitative promotion criteria, automatic stop on reconciliation breach, and explicit write-rollback semantics, adopted from Proposal 3
- Step 2 adds specific static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) and identifies tables with more than two writers as highest-risk
- Step 6 adds mutation testing to identify highest-risk untested paths, prioritising checkout, payment, and inventory
- Step 8 specifies gateway latency overhead must be less than 50 ms p99, a concrete measurable constraint
- Step 1 adds a conditional throttle: if the first sale is fewer than 14 weeks from programme start, restrict the first wave to search, warehouse adapter, and observability only
- At 23 steps with dense bullet lists, the proposal is the longest and hardest to schedule; some steps (S22, S23) combine multiple substantial workstreams
- The success metric 'monolith codebase reduced by at least 60%' conflicts with the honest year-one scope stated in step 3, which explicitly lists monolith decommission as a non-goal
- Step 11 (pricing archaeology) depends on steps 2 and 7, but step 7 (monolith modularisation) depends on steps 3, 5, and 6, creating a longer critical path before pricing work can start compared to Proposal 3 where pricing starts at step 11 depending only on steps 2, 6, 7
- The previous version's explicit 'Keep five domain teams and a thin paved-road platform' step is compressed into a clause in S1, losing emphasis on team stability
- Proposal 3 : The overall seasonal structure, extraction playbook, pricing-façade-first approach, warehouse adapter separation, customer-slice extraction, and the principle that the façade is success if full extraction is unsafe.
- Proposal 2 : The merged observability-and-testing step, the explicit write-rollback semantics, the payment-adapter isolation pattern, and the back-office-by-workflow migration.
- Proposal 1 : The baseline step structure with coupling heat map and extraction scorecard, the testing step with mutation testing, and the warehouse adapter as a prerequisite for inventory extraction.
- Proposal 1 : A formal post-peak strategic review with a 20% slip threshold triggering programme re-forecast.
- Proposal 4 : The aggressive target of monolith codebase reduction by at least 60% as a hard success metric.
+ Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard+ Define target architecture, domain boundaries, ownership model, and honest year-one scope+ Instrument the estate and establish operational control+ Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime+ Peak readiness gate 1: certify the hybrid estate before the first sale+ Wave 2: Isolate payment providers and create financial reconciliation+ Wave 2: Deliver order-query slices, notifications, and bounded returns+ Consolidate proven services, retire obsolete paths, and hand over steady-state governanceBaseline the live system and freeze business invariantsSet honest year-one boundaries and non-goalsKeep five domain teams and a thin paved-road platformInstrument the monolith and define journey SLOsCertify the first peak on the real hybrid estateSeason 2: order-query slices and payment-provider adaptersShrink residual coupling and hand over a durable operating model
The plan produced
1. Charter the programme: governance, peak calendar, team model, and non-negotiables from P4 step 1
Establish the revenue-protection delivery model before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
-
Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
-
Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
-
Publish the 12-month calendar in week one. Mark hard protection windows: six weeks before through two weeks after each January and July sale, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
-
Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
-
Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
-
Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
-
Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
-
If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
-
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (after 1) from P1 step 2
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every migration wave.
-
Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
-
Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
-
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
-
Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
-
Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
-
Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
-
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (after 2)
Agree a pragmatic target architecture based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
-
Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
-
Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
-
Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
-
Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
-
Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
-
Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
-
Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
-
Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
-
4. Instrument the estate and establish operational control (after 2) from P2 step 4
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
-
Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
-
Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
-
Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
-
Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
-
Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
-
Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
-
Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
-
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (after 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
-
Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
-
Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
-
Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
-
Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
-
Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
-
Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
-
Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
-
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (after 4, 5) from P1 step 9
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
-
Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
-
Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
-
Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
-
Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
-
Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
-
Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
-
Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
-
7. Modularise the live monolith without stopping features (after 3, 5, 6) from P3 step 7
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
-
Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
-
Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
-
Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
-
Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
-
Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
-
Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
-
Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
-
8. Deploy the strangler gateway with minute-scale rollback (after 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
-
Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
-
Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
-
Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
-
Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
-
Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
-
Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
-
Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
-
9. Stand up the event backbone, outbox, CDC, and reconciliation product (after 3, 5, 7) from P3 step 9
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
-
Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
-
Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
-
Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
-
Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
-
Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
-
Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
-
10. Codify one extraction playbook every team must use (after 6, 8, 9) from P3 step 10
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
-
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
-
Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
-
Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
-
Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
-
High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
-
Stored procedures leave only when the characterisation harness has an equivalent in service code.
-
Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
-
Document rollback authority, hypercare staffing, and exception handling for every stage.
-
11. Start pricing archaeology and put a façade in front of the legacy engine (after 2, 7) from P3 step 11
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
-
Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
-
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
-
Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
-
Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
-
Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
-
Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
-
Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
-
12. Wave 1: Extract search as the first independently deployable service (after 9, 10) from P3 step 12
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
-
Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
-
Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
-
Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
-
Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
-
Keep the old Lucene index warm as a cold standby through the next relevant sale.
-
Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
-
Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
-
13. Wave 1: Extract catalogue read models (after 12) from P3 step 13
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
-
Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
-
Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
-
Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
-
Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
-
Do not move authoring tools until reads are operationally boring.
-
Retain the monolith catalogue route through at least one relevant sale as fallback.
-
Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
-
14. Wave 1: Wrap warehouse files and extract inventory availability reads (after 9, 10) from P3 step 14
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
-
Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
-
Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
-
Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
-
Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
-
Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
-
Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
-
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (after 9, 10) from P3 step 15
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
-
Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
-
Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
-
Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
-
Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
-
Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
-
Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
-
16. Peak readiness gate 1: certify the hybrid estate before the first sale (after 6, 8, 12, 13, 14, 15) from P1 step 15
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
-
Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
-
Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
-
Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
-
Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
-
Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
-
Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
-
Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
-
If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
-
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (after 11, 13, 14, 16) from P3 step 17
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
-
Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
-
Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
-
Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
-
Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
-
Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
-
Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
-
If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
-
18. Wave 2: Isolate payment providers and create financial reconciliation (after 6, 9, 10) from P2 step 15
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
-
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
-
Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
-
Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
-
Preserve country and payment-method routing plus customer-facing response semantics during adoption.
-
Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
-
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
-
Keep PCI and provider contracts stable. Wrap, do not rewrite.
-
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (after 9, 14, 15) from P2 step 14
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
-
Publish reliable order lifecycle events from the current command owner through the outbox pattern.
-
Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
-
Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
-
Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
-
Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
-
Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
-
Keep legacy query and workflow routes available for immediate fallback during the observation period.
-
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (after 14, 15, 17, 18) from P2 step 17
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
-
Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
-
Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
-
Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
-
Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
-
Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
-
Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
-
Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
-
If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
-
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (after 16, 17, 18, 19, 20) from P3 step 20
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
-
Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
-
Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
-
Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
-
Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
-
Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
-
Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
-
After the sale, compare actuals to forecasts and freeze lessons into the final wave.
-
Obtain formal written sign-off from all stakeholders before entering the protection window.
-
22. Migrate back-office workflows by role and transfer proven write ownership (after 13, 14, 15, 19, 21) from P2 step 19
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
-
Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
-
Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
-
Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
-
For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
-
Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
-
Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
-
Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
-
Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
-
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (after 21, 22) from P4 step 21
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
-
Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
-
Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
-
Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
-
Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
-
Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
-
Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
-
Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
-
Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
-
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: fcda7308-45cd-41e0-bd70-0eb1f922bdde, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
Previous Proposal 2 (ID: 8acc83c9-8c26-4ca9-bcf9-6e34ebc47a34, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
Previous Proposal 3 (ID: 967b6acc-d50a-47de-93dd-75d8f3da72d4, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Previous Proposal 4 (ID: 8151bd29-0f0f-4347-b6b7-9fa374191c2c, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
Previous Proposal 5 (ID: b658c637-ca64-4543-b1fd-0e5f8e964efe, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter the programme: governance, peak calendar, team model, and non-negotiables", "description": "Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.\n\n- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.\n\n- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.\n\n- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.\n\n- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.\n\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.\n\n- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.\n\n- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.\n\n- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard", "description": "Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.\n\n- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.\n\n- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.\n\n- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.\n\n- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.\n\n- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.\n\n- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture, domain boundaries, ownership model, and honest year-one scope", "description": "Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.\n\n- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n\n- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.\n\n- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.\n\n- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.\n\n- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.\n\n- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.\n\n- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.\n\n- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument the estate and establish operational control", "description": "Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.\n\n- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.\n\n- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.\n\n- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.\n\n- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.\n\n- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.\n\n- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.\n\n- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime", "description": "Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.\n\n- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.\n\n- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.\n\n- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.\n\n- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.\n\n- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.\n\n- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.\n\n- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Create the behavioural safety net: characterisation, contracts, and 12x load harness", "description": "Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.\n\n- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.\n\n- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.\n\n- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.\n\n- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.\n\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.\n\n- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Modularise the live monolith without stopping features", "description": "The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.\n\n- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.\n\n- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.\n\n- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.\n\n- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.\n\n- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.\n\n- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.\n\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Deploy the strangler gateway with minute-scale rollback", "description": "Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.\n\n- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.\n\n- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.\n\n- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.\n\n- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.\n\n- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.\n\n- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.\n\n- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.", "dependencies": ["S4", "S5", "S6"]}, {"step_id": "S9", "title": "Stand up the event backbone, outbox, CDC, and reconciliation product", "description": "Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.\n\n- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.\n\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.\n\n- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.\n\n- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.\n\n- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.\n\n- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S10", "title": "Codify one extraction playbook every team must use", "description": "Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.\n\n- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.\n\n- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n\n- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.\n\n- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.\n\n- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.\n\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.\n\n- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.\n\n- Document rollback authority, hypercare staffing, and exception handling for every stage.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Start pricing archaeology and put a façade in front of the legacy engine", "description": "Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.\n\n- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.\n\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.\n\n- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.\n\n- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.\n\n- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.\n\n- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.\n\n- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.", "dependencies": ["S2", "S7"]}, {"step_id": "S12", "title": "Wave 1: Extract search as the first independently deployable service", "description": "Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.\n\n- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.\n\n- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.\n\n- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.\n\n- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.\n\n- Keep the old Lucene index warm as a cold standby through the next relevant sale.\n\n- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.\n\n- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.", "dependencies": ["S9", "S10"]}, {"step_id": "S13", "title": "Wave 1: Extract catalogue read models", "description": "Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.\n\n- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.\n\n- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.\n\n- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.\n\n- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.\n\n- Do not move authoring tools until reads are operationally boring.\n\n- Retain the monolith catalogue route through at least one relevant sale as fallback.\n\n- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.", "dependencies": ["S12"]}, {"step_id": "S14", "title": "Wave 1: Wrap warehouse files and extract inventory availability reads", "description": "Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.\n\n- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.\n\n- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.\n\n- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.\n\n- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.", "dependencies": ["S9", "S10"]}, {"step_id": "S15", "title": "Wave 1: Extract customer reads and bounded loyalty with GDPR compliance", "description": "Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.\n\n- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.\n\n- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.\n\n- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.\n\n- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.\n\n- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.\n\n- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.", "dependencies": ["S9", "S10"]}, {"step_id": "S16", "title": "Peak readiness gate 1: certify the hybrid estate before the first sale", "description": "Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.\n\n- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.\n\n- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.\n\n- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.\n\n- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.\n\n- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.\n\n- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.\n\n- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.", "dependencies": ["S6", "S8", "S12", "S13", "S14", "S15"]}, {"step_id": "S17", "title": "Wave 2: Dual-run and prove pricing rule slices behind the façade", "description": "Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.\n\n- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.\n\n- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.\n\n- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.\n\n- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.\n\n- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.\n\n- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.\n\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S11", "S13", "S14", "S16"]}, {"step_id": "S18", "title": "Wave 2: Isolate payment providers and create financial reconciliation", "description": "Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.\n\n- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.\n\n- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.\n\n- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.\n\n- Preserve country and payment-method routing plus customer-facing response semantics during adoption.\n\n- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.\n\n- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.\n\n- Keep PCI and provider contracts stable. Wrap, do not rewrite.", "dependencies": ["S6", "S9", "S10"]}, {"step_id": "S19", "title": "Wave 2: Deliver order-query slices, notifications, and bounded returns", "description": "Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox pattern.\n\n- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.\n\n- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.\n\n- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.\n\n- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.\n\n- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.\n\n- Keep legacy query and workflow routes available for immediate fallback during the observation period.", "dependencies": ["S9", "S14", "S15"]}, {"step_id": "S20", "title": "Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration", "description": "Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.\n\n- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.\n\n- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.\n\n- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.\n\n- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.\n\n- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.\n\n- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n\n- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.", "dependencies": ["S14", "S15", "S17", "S18"]}, {"step_id": "S21", "title": "Peak readiness gate 2: certify before the second sale and rehearse full-load reversion", "description": "Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.\n\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.\n\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n\n- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.\n\n- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.\n\n- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.\n\n- After the sale, compare actuals to forecasts and freeze lessons into the final wave.\n\n- Obtain formal written sign-off from all stakeholders before entering the protection window.", "dependencies": ["S16", "S17", "S18", "S19", "S20"]}, {"step_id": "S22", "title": "Migrate back-office workflows by role and transfer proven write ownership", "description": "Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.\n\n- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.\n\n- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.\n\n- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.\n\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.\n\n- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.\n\n- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.\n\n- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.\n\n- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.", "dependencies": ["S13", "S14", "S15", "S19", "S21"]}, {"step_id": "S23", "title": "Consolidate proven services, retire obsolete paths, and hand over steady-state governance", "description": "Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.\n\n- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.\n\n- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.\n\n- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.\n\n- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.\n\n- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.\n\n- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.\n\n- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.\n\n- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.", "dependencies": ["S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.\n- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.\n- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.\n- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.\n- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.\n- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.\n- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.\n- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.\n- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.\n- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.\n- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.\n- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.\n- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.\n- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.\n- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.\n- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.\n- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales."}Round 4 — refinement 4 of 4
All five proposals converged further on the same structural spine: charter, baseline, observability, platform, gateway, events, pricing archaeology, two peak gates, and a closing consolidation step. The most notable change is the formal extraction playbook (adopted from Proposals 3 and 5) now appearing explicitly in Proposal 2, while most agents refined wording, tightened dependencies, and added operational details such as Postgres connection budgets and SSR cache handling. Proposals are now very close in substance; the main remaining differentiators are granularity (23 steps vs.
20), the explicitness of the reforecast checkpoint, and how teams are mapped to deployable units.
The calls of this round
Influences: who took what from whom
| Round 4 ↓ · round 3 → | Proposal 1 | Proposal 2 | Proposal 3 | Proposal 4 | Proposal 5 | New steps |
|---|---|---|---|---|---|---|
| Proposal 1 |
kept11 | same titles0 analyst sees+0 / −0 | same titles2 analyst sees+1 / −0 | same titles5 analyst sees+1 / −0 | same titles4 analyst sees+2 / −0 | new1 |
| Proposal 2 |
same titles0 analyst sees+0 / −0 | kept10 | same titles1 analyst sees+1 / −0 | same titles3 analyst sees+1 / −0 | same titles2 analyst sees+2 / −0 | new4 |
| Proposal 3 |
same titles1 analyst sees+1 / −0 | same titles1 analyst sees+1 / −0 | kept15 | same titles1 analyst sees+1 / −0 | same titles1 analyst sees+1 / −0 | new3 |
| Proposal 4 |
same titles3 analyst sees+1 / −0 | same titles1 analyst sees+1 / −0 | same titles0 analyst sees+0 / −1 | kept16 | same titles2 analyst sees+1 / −0 | new1 |
| Proposal 5 |
same titles0 analyst sees+0 / −0 | same titles1 analyst sees+0 / −0 | same titles0 analyst sees+0 / −0 | same titles2 analyst sees+0 / −0 | kept20 | new0 |
Proposal 1 restructured from 23 to 23 steps but reorganised waves and added a post-peak-1 reforecast checkpoint (S16) that was absent in its round-3 version. It adopted the explicit extraction-playbook concept from Proposals 3 and 5, tightened success metrics with latency thresholds and deployment-frequency targets, and merged pricing dual-run with payment isolation into a single wave step for tighter sequencing. The rewrite also adds a gateway latency overhead cap (<50 ms p99) and a monolith-codebase-reduction metric (≥60%), both new measurable commitments.
- Added a dedicated post-peak-1 reforecast step (S16) with a >20% slippage trigger, borrowing the adaptive-roadmap idea from Proposal 3's S17.
- Added explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms peak-latency targets and a ≥60% monolith-codebase-reduction metric, making success more measurable.
- Merged pricing dual-run and payment isolation into a single wave step (S17) with clear sequencing and dependency on the peak gate, reducing inter-step ambiguity.
- Added gateway latency overhead cap (<50 ms p99) in S8, a concrete operational guardrail absent in the round-3 version.
- Added mutation-testing guidance in S6 to prioritise highest-risk untested paths.
- Removed the explicit 'warehouse adapter must prove stability for ≥4 months before inventory extraction' gate as a standalone metric; it is now embedded in S11 prose but no longer a numbered success criterion.
- Dropped the explicit 'Post-peak strategic review formally reforecasts if migration slips exceed 20%' success-metric line that was present in the round-3 version's metrics list; the trigger now lives only in S16 body text.
- Proposal 3 : Post-peak reforecast step that compares planned vs. actual progress and can shrink later waves.
- Proposal 5 : Codified extraction playbook with quantitative promotion gates and automatic stop on SLO or reconciliation breach.
- Proposal 4 : Peak readiness gates with explicit game-day scenarios and written go/no-go sign-off.
- Proposal 5 : Gateway p99 overhead cap of <50 ms as a measurable deployment criterion.
+ Charter programme with revenue-protection governance model+ Instrument estate and establish SLOs before moving traffic+ Build delivery platform: CI/CD, flags, canary, and secure runtime+ Modularise live monolith without stopping feature delivery+ Launch parallel pricing archaeology and place façade over legacy engine+ Post-peak 1 review and roadmap adjustment (Month 3)+ Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9)+ Wave 2: Extract order-query, returns slices, and notifications (Months 5–8)Programme governance, peak-protection calendar, and team capacityObservability, SLOs, and business-failure alertingCI/CD, feature flags, progressive delivery, and secure runtimeMonolith modularisation and test hardeningPricing archaeology and golden-master corpusWave 3: Extract pricing and promotions service behind the façadeWave 4: Payment provider adapters and financial reconciliationWave 5: Extract order management, notifications, and returns
The plan produced
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (after 1) from P3 step 2
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (after 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (after 2) from P5 step 4
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (after 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (after 4, 5) from P5 step 6
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (after 3, 5, 6) from P3 step 7
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (after 4, 5, 6, 7) from P5 step 8
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (after 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (after 2, 7) from P5 step 11
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (after 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (after 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (after 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (after 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (after 6, 12, 13, 14) from P4 step 15
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (after 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (after 10, 12, 13, 14, 15) new
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (after 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (after 15, 16, 17, 18) from P4 step 20
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (after 13, 14, 17, 18) from P4 step 18
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (after 12, 14, 17, 18, 19, 20) from P4 step 21
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (after 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (after 19, 21, 22) from P4 step 23
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 1816d107-043e-40fb-ae7a-5c486b542c2f, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
Previous Proposal 2 (ID: 389833c3-fdb0-4d23-951f-7570721a5e24, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
Previous Proposal 3 (ID: 2c552711-1681-4f9a-a904-7044d9b68d18, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
Previous Proposal 4 (ID: ecf6b2c1-5422-4b45-9a6d-2739355e4d7f, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
Previous Proposal 5 (ID: c4741457-2580-4338-b27f-a8973f412cda, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter programme with revenue-protection governance model", "description": "Establish accountable leadership and protect January and July peaks before any technical work begins.\n\n- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.\n- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.\n- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.\n- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.\n- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.\n- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.", "dependencies": []}, {"step_id": "S2", "title": "Baseline live system: measure capacity, dependencies, and business invariants", "description": "Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.\n\n- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.\n- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.\n- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.\n- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.\n- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture, bounded contexts, and year-one scope", "description": "Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.\n\n- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.\n- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.\n- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.\n- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument estate and establish SLOs before moving traffic", "description": "Make the monolith and all future services observable. You cannot extract what you cannot see or measure.\n\n- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.\n- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.\n- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.\n- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.\n- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build delivery platform: CI/CD, flags, canary, and secure runtime", "description": "Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.\n\n- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.\n- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.\n- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.\n- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.\n- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.\n- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Create behavioural safety net: characterisation, contracts, and 12x harness", "description": "Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.\n\n- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.\n- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.\n- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.\n- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.\n- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Modularise live monolith without stopping feature delivery", "description": "Create internal seams before extracting. The monolith remains the primary production system for most of the year.\n\n- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.\n- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.\n- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.\n- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.\n- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Place strangler gateway with minute-scale rollback", "description": "Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.\n\n- Place API gateway in front of existing endpoints without changing initial behaviour.\n- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.\n- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.\n- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.\n- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).", "dependencies": ["S4", "S5", "S6", "S7"]}, {"step_id": "S9", "title": "Deploy event backbone, outbox, and reconciliation framework", "description": "Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.\n\n- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.\n- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.\n- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.\n- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.\n- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.\n- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S10", "title": "Launch parallel pricing archaeology and place façade over legacy engine", "description": "Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.\n\n- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.\n- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).\n- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.\n- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.\n- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.", "dependencies": ["S2", "S7"]}, {"step_id": "S11", "title": "Modernise warehouse integration without changing contract", "description": "Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.\n\n- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.\n- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.\n- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.", "dependencies": ["S3", "S9"]}, {"step_id": "S12", "title": "Wave 1: Extract search and catalogue read services (post-January)", "description": "Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.\n\n- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.\n- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.\n- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.\n- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.\n- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.", "dependencies": ["S8", "S9", "S11"]}, {"step_id": "S13", "title": "Wave 1: Extract inventory availability reads (Months 3–5)", "description": "Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.\n\n- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.\n- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.\n- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.\n- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.", "dependencies": ["S8", "S9", "S11", "S12"]}, {"step_id": "S14", "title": "Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5)", "description": "Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.\n\n- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.\n- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.\n- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.\n- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.\n- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.", "dependencies": ["S8", "S9", "S12"]}, {"step_id": "S15", "title": "Peak readiness gate 1: certify hybrid estate before first sale", "description": "Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.\n- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.\n- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.\n- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.\n- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.", "dependencies": ["S6", "S12", "S13", "S14"]}, {"step_id": "S16", "title": "Post-peak 1 review and roadmap adjustment (Month 3)", "description": "Evaluate progress against plan and adjust remaining waves if significant slippage occurred.\n\n- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?\n- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.\n- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.\n- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.\n- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.", "dependencies": ["S15"]}, {"step_id": "S17", "title": "Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9)", "description": "Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.\n\n- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.\n- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.\n- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.\n- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.\n- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.\n- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.", "dependencies": ["S10", "S12", "S13", "S14", "S15"]}, {"step_id": "S18", "title": "Wave 2: Extract order-query, returns slices, and notifications (Months 5–8)", "description": "Create independently deployable post-order value without splitting revenue-critical order-creation transaction.\n\n- Publish reliable order lifecycle events from current command owner through outbox pattern.\n- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.\n- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.\n- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.", "dependencies": ["S9", "S14"]}, {"step_id": "S19", "title": "Peak readiness gate 2: certify before second sale with full topology", "description": "Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.\n\n- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.\n- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.\n- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.\n- Obtain written go/no-go from all stakeholders before entering protection window.", "dependencies": ["S15", "S16", "S17", "S18"]}, {"step_id": "S20", "title": "Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11)", "description": "Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.\n\n- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.\n- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.\n- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.\n- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.", "dependencies": ["S13", "S14", "S17", "S18"]}, {"step_id": "S21", "title": "Migrate back-office workflows and refactor storefront to services (Months 9–12)", "description": "Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.\n\n- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.\n- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.\n- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.\n- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.", "dependencies": ["S12", "S14", "S17", "S18", "S19", "S20"]}, {"step_id": "S22", "title": "Transfer data ownership through reversible single-writer cutovers (Months 11–12)", "description": "Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.\n\n- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.\n- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.\n- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.\n- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.\n- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.", "dependencies": ["S9", "S12", "S13", "S14", "S17", "S18", "S19", "S20", "S21"]}, {"step_id": "S23", "title": "Consolidate sustainable hybrid and establish steady-state governance", "description": "Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.\n\n- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.\n- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.\n- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.\n- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.\n- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.\n- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.", "dependencies": ["S19", "S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.\n- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.\n- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.\n- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.\n- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.\n- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.\n- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.\n- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.\n- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.\n- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.\n- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.\n- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.\n- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.\n- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.\n- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales."}Proposal 2 restructured from 18 to 20 steps, adding a dedicated extraction playbook (S9), a separate warehouse-adapter step (S11), and splitting the first-sale gate from the second more cleanly. It also added an explicit 'executable safety net' step (S6) with a 15-minute regression-suite target and a command-rollback semantics definition in S7. The rewrite is tighter on in-flight financial-command treatment and adds a PostgreSQL connection-budget reservation for full monolith fallback in S5.
- Added a mandatory extraction and cutover playbook (S9) with a cutover dossier requirement, quantitative gates, and explicit statement that service deployment can succeed without write ownership.
- Added explicit command-rollback semantics in S7: accepted commands stay on their original state machine; only new commands route back.
- Added PostgreSQL connection and CPU capacity reservation for full monolith fallback in S5, a concrete capacity guardrail.
- Added a 15-minute critical-regression-suite target in S6, making test-cycle time measurable.
- Split warehouse adapter (S11) from inventory availability reads (S14) for clearer sequencing and a two-cycle stability proof before serving reads.
- Removed the explicit 'monolith codebase reduced ≥60%' success metric that appeared in the round-3 version's metrics list.
- Removed the explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms latency targets from the success-metrics block; they now appear only inside SLO definitions in S4.
- Proposal 3 : One extraction playbook with quantitative promotion criteria, automatic stop on breach, and explicit write-vs-route rollback distinction.
- Proposal 5 : Playbook requirement that stored procedures leave only when the characterisation harness has an equivalent in service code.
- Proposal 4 : Peak readiness gate with explicit game-day scenarios including CDC lag, flag rollback, and warehouse file delay.
- Proposal 5 : Back-office migration by workflow with 30-day parallel run and one-click fallback.
+ Instrument journeys and establish operational control+ Create the executable safety net+ Adopt a mandatory extraction and cutover playbook+ Wrap warehouse exchange without changing its contract+ First-sale readiness gate+ Extract inventory availability reads and customer read slices+ Deliver order-query, bounded returns, and payment adapters+ Second-sale readiness gate+ Migrate back-office workflows by roleBuild operational control and the behavioural safety netJanuary peak gate: freeze risk and certify the initial hybrid estateWrap warehouse exchange and extract inventory availability readsExtract customer, consent, and low-risk loyalty slicesDeliver order queries, notifications, and bounded returnsIsolate payment providers and introduce financial controlsJuly peak gate: certify the expanded hybrid topology
The plan produced
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (after 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (after 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (after 2) from P5 step 4
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (after 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (after 2, 4, 5) new
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (after 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (after 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (after 7, 8) new
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (after 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (after 8, 9) from P4 step 11
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (after 7, 8, 10, 11) new
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (after 9, 12) from P4 step 12
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (after 11, 12, 13) from P4 step 14
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (after 8, 9, 12, 14) from P3 step 17
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (after 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (after 13, 14, 15, 16) new
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (after 13, 14, 15, 17) from P5 step 22
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (after 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (after 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 1816d107-043e-40fb-ae7a-5c486b542c2f, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
Previous Proposal 2 (ID: 389833c3-fdb0-4d23-951f-7570721a5e24, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
Previous Proposal 3 (ID: 2c552711-1681-4f9a-a904-7044d9b68d18, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
Previous Proposal 4 (ID: ecf6b2c1-5422-4b45-9a6d-2739355e4d7f, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
Previous Proposal 5 (ID: c4741457-2580-4338-b27f-a8973f412cda, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter the programme and protect trading peaks", "description": "Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.\n\n- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.\n- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.\n- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.\n- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.\n- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.\n- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.", "dependencies": []}, {"step_id": "S2", "title": "Baseline behaviour, coupling, data, and peak capacity", "description": "Create the factual baseline used to select extraction candidates and prove that a new path is safe.\n\n- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.\n- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.\n- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.\n- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.\n- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.\n- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.\n- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set boundaries, ownership, and realistic year-one scope", "description": "Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.\n\n- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.\n- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.\n- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.\n- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.\n- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.\n- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.\n- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument journeys and establish operational control", "description": "Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.\n\n- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.\n- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.\n- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.\n- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.\n- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.\n- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build the paved road and harden monolith seams", "description": "Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.\n\n- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.\n- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.\n- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.\n- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.\n- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.\n- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.\n- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.\n- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Create the executable safety net", "description": "Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.\n\n- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.\n- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.\n- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.\n- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.\n- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.\n- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.\n- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Install the strangler edge and rollback semantics", "description": "Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.\n\n- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.\n- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.\n- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.\n- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.\n- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.\n- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.", "dependencies": ["S4", "S5", "S6"]}, {"step_id": "S8", "title": "Establish events, replication, and reconciliation as shared products", "description": "Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.\n\n- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.\n- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.\n- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.\n- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.\n- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.\n- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S9", "title": "Adopt a mandatory extraction and cutover playbook", "description": "Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.\n\n- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.\n- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.\n- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.\n- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.\n- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.\n- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.", "dependencies": ["S7", "S8"]}, {"step_id": "S10", "title": "Run pricing archaeology and deploy a legacy pricing façade", "description": "Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.\n\n- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.\n- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.\n- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.\n- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.\n- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.\n- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.\n- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.", "dependencies": ["S3", "S6", "S8"]}, {"step_id": "S11", "title": "Wrap warehouse exchange without changing its contract", "description": "Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.\n- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.\n- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.\n- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.\n- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.\n- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.", "dependencies": ["S8", "S9"]}, {"step_id": "S12", "title": "First-sale readiness gate", "description": "Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.\n\n- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.\n- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.\n- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.\n- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.\n- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.\n- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.", "dependencies": ["S7", "S8", "S10", "S11"]}, {"step_id": "S13", "title": "Extract catalogue reads and modern search", "description": "Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.\n\n- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.\n- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.\n- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.\n- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.\n- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.\n- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.", "dependencies": ["S9", "S12"]}, {"step_id": "S14", "title": "Extract inventory availability reads and customer read slices", "description": "Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.\n\n- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.\n- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.\n- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.\n- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.\n- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.\n- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.", "dependencies": ["S11", "S12", "S13"]}, {"step_id": "S15", "title": "Deliver order-query, bounded returns, and payment adapters", "description": "Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.\n\n- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.\n- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.\n- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.\n- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.\n- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.\n- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.\n- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.", "dependencies": ["S8", "S9", "S12", "S14"]}, {"step_id": "S16", "title": "Prove pricing slices and introduce cart and checkout façades", "description": "Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.\n\n- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.\n- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.\n- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.\n- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.\n- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.\n- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.", "dependencies": ["S10", "S14", "S15"]}, {"step_id": "S17", "title": "Second-sale readiness gate", "description": "Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.\n\n- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.\n- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.\n- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.\n- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.\n- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.\n- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.", "dependencies": ["S13", "S14", "S15", "S16"]}, {"step_id": "S18", "title": "Migrate back-office workflows by role", "description": "Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.\n\n- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.\n- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.\n- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.\n- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.\n- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.\n- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.", "dependencies": ["S13", "S14", "S15", "S17"]}, {"step_id": "S19", "title": "Transfer only evidence-backed write ownership", "description": "After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.\n\n- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.\n- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.\n- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.\n- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.\n- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.\n- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.", "dependencies": ["S9", "S16", "S17", "S18"]}, {"step_id": "S20", "title": "Consolidate the sustainable hybrid estate and fund follow-on work", "description": "End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.\n\n- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.\n- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.\n- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.\n- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.\n- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.\n- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.", "dependencies": ["S18", "S19"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.\n- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.\n- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.\n- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.\n- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.\n- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.\n- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.\n- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.\n- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.\n- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.\n- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.\n- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.\n- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.\n- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.\n- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition."}Proposal 3 restructured from 20 to 22 steps, splitting the warehouse adapter from inventory reads (S12, S15), adding a dedicated reforecast step (S17), and merging order-query with cart/checkout façades into a single step (S19). It added a Postgres connection-budget metric, an explicit ban on new CDC load during protection windows, and a five-team operability constraint on the number of independently deployable units. The rewrite is more operationally grounded, explicitly staffing hypercare from existing teams and banning assumptions about extra headcount.
- Added explicit five-team operability constraint: independently deployable unit count must not exceed what five teams can operate and on-call (S1, S3, success metrics).
- Added Postgres connection budget as a success metric and a ban on new CDC or non-essential consumers during protection windows (S5, S13).
- Added a dedicated reforecast step (S17) with a >30% capacity or <80% feature-throughput trigger to shrink Season 2.
- Split warehouse adapter (S12) from inventory availability reads (S15) with an explicit two-cycle stability proof.
- Added SSR cache correctness to gateway testing (S8), addressing the server-rendered storefront specifically.
- Added edge caching for catalogue and search in S14 to protect origin during 12x peaks.
- Removed the explicit '≥1,000 real orders per country' golden-master corpus size from S11; it now says 'at least 1,000 real orders per country' but only in the pricing step, not as a success metric.
- Removed the explicit 'warehouse adapter proves stability for ≥4 months' gate; replaced with 'two complete inventory cycles at peak-like load' in S12, which is less specific in calendar time.
- Proposal 1 : Warehouse adapter must prove stability for a defined period before inventory read extraction.
- Proposal 2 : Back-office migration by workflow with role-based access, segregation of duties, and 30-day parallel run.
- Proposal 4 : Customer extraction with canonical identity, session compatibility, consent, and loyalty-balance reads before writes.
- Proposal 5 : Pricing dual-run with 99.99% parity over two full weeks including a weekend, per-slice route-back, and façade-as-success fallback.
+ Build a thin paved road and remove the maintenance window+ Wrap warehouse files without changing the warehouse+ Extract inventory availability reads+ Reforecast after the first peak+ Dual-run proven pricing slices and isolate payment providers+ Deliver order-query slices and cart/checkout façades+ Hand over a durable hybrid and a funded follow-onBuild a thin paved road for independent deploymentSeason 1: wrap warehouse files and extract availability readsSeason 2: dual-run only proven pricing slicesSeason 2: order-query slices and payment-provider adaptersSeason 2: cart and checkout façades, then only proven orchestration
The plan produced
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as 50% roadmap, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (after 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (after 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (after 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (after 3, 4) new
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (after 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (after 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (after 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a route change, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (after 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (after 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (after 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (after 6, 9) from P1 step 11
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (after 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (after 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (after 10, 12) from P4 step 14
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (after 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (after 13) new
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (after 11, 13, 17) from P5 step 17
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (after 15, 16, 18) from P2 step 15
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (after 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (after 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (after 21) new
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 1816d107-043e-40fb-ae7a-5c486b542c2f, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
Previous Proposal 2 (ID: 389833c3-fdb0-4d23-951f-7570721a5e24, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
Previous Proposal 3 (ID: 2c552711-1681-4f9a-a904-7044d9b68d18, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
Previous Proposal 4 (ID: ecf6b2c1-5422-4b45-9a6d-2739355e4d7f, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
Previous Proposal 5 (ID: c4741457-2580-4338-b27f-a8973f412cda, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter around peaks, money, rollback, and five-team operability", "description": "Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.\n\n- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.\n- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.\n- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.\n- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.\n- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.\n- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.\n- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.\n- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.", "dependencies": []}, {"step_id": "S2", "title": "Baseline the live estate and freeze business invariants", "description": "Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.\n\n- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.\n- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.\n- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.\n- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.\n- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.\n- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Set honest year-one boundaries mapped to five teams", "description": "Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.\n\n- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.\n- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.\n- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.\n- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.\n- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.\n- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument journeys and define error budgets", "description": "Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.\n\n- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.\n- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.\n- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.\n- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.\n- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.\n- Target five-minute detection for critical journey failure.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build a thin paved road and remove the maintenance window", "description": "Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.\n\n- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.\n- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.\n- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.\n- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.\n- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.\n- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.\n- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.\n- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Build the behavioural safety net and 12x harness", "description": "Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.\n- Add characterisation tests around stored procedures and pricing before modifying them.\n- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.\n- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.\n- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.", "dependencies": ["S2", "S4", "S5"]}, {"step_id": "S7", "title": "Modularise the live monolith without stopping features", "description": "Create seams before you create processes. The monolith remains the primary system for most of the year.\n\n- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.\n- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.\n- Wrap high-risk access behind façades even while it still runs in-process.\n- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.\n- Add kill switches to every new monolith-to-service integration.\n- New features still ship, but they must use the new seams.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Place a strangler edge with minute-scale rollback", "description": "Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.\n\nThe storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.\n\n- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.\n- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.\n- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.\n- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.\n- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.\n- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.\n- Gateway p99 overhead must stay under 50 ms.", "dependencies": ["S5", "S6", "S7"]}, {"step_id": "S9", "title": "Stand up events, outbox, and a reconciliation product", "description": "Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.\n\n- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.\n- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.\n- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.\n- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.\n- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.\n- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S10", "title": "Codify one extraction playbook every team must use", "description": "Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.\n\nEvery extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.\n\n- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n- Shadow never duplicates payments or other customer-visible commands.\n- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.\n- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.\n- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Start pricing archaeology and façade the legacy engine", "description": "Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.\n\nStart this in parallel with platform work from month one.\n\n- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.\n- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.\n- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.\n- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.\n- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.\n- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.", "dependencies": ["S2", "S6", "S7"]}, {"step_id": "S12", "title": "Wrap warehouse files without changing the warehouse", "description": "The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.\n- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.\n- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.\n- Keep reservation, allocation, and warehouse-export command authority in the monolith.\n- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.", "dependencies": ["S6", "S9"]}, {"step_id": "S13", "title": "Certify the first peak on the real hybrid estate", "description": "Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers in the protection window. Feature work may continue behind flags.\n- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.\n- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.\n- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.\n- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.\n- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.\n- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.", "dependencies": ["S5", "S6", "S8", "S9"]}, {"step_id": "S14", "title": "Extract search and catalogue read models", "description": "Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.\n\nIf the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.\n\n- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.\n- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.\n- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.\n- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.\n- Search and catalogue reads must not become authoritative for price or stock.\n- Keep the old Lucene index warm through the next sale as standby.\n- Add edge caching for catalogue and search responses to protect origin during 12x peaks.", "dependencies": ["S10"]}, {"step_id": "S15", "title": "Extract inventory availability reads", "description": "Separate customer-facing availability from reservation authority after the warehouse adapter is proven.\n\n- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.\n- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.\n- Prove no extra oversell versus today's lag before a sale.\n- Provide immediate fallback to monolith availability and a replayable file-recovery process.", "dependencies": ["S10", "S12"]}, {"step_id": "S16", "title": "Extract customer reads and bounded loyalty with GDPR", "description": "Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.\n\n- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.\n- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.\n- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.\n- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.\n- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.", "dependencies": ["S10"]}, {"step_id": "S17", "title": "Reforecast after the first peak", "description": "Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.\n\n- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.\n- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.\n- Formalise which capabilities will remain façades that delegate to the monolith through month 12.\n- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.\n- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.", "dependencies": ["S13"]}, {"step_id": "S18", "title": "Dual-run proven pricing slices and isolate payment providers", "description": "Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.\n\n- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.\n- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.\n- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.\n- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.\n- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.\n- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.", "dependencies": ["S11", "S13", "S17"]}, {"step_id": "S19", "title": "Deliver order-query slices and cart/checkout façades", "description": "Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox.\n- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.\n- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.\n- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.\n- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.\n- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.\n- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.", "dependencies": ["S15", "S16", "S18"]}, {"step_id": "S20", "title": "Certify the second peak and rehearse full-load reversion", "description": "Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same protection window. No first-time cutovers or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.\n- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.\n- After the sale, compare actuals to forecasts and freeze lessons into the final wave.", "dependencies": ["S13", "S18", "S19"]}, {"step_id": "S21", "title": "Move back-office by workflow and transfer writes only where proven", "description": "Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.\n\n- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.\n- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.\n- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.\n- Remove direct SQL reporting access to migrated data. Replace with governed read models.", "dependencies": ["S19", "S20"]}, {"step_id": "S22", "title": "Hand over a durable hybrid and a funded follow-on", "description": "Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.\n\n- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.\n- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.\n- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.\n- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.\n- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.\n- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.", "dependencies": ["S21"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.\n- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.\n- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.\n- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.\n- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.\n- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.\n- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.\n- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.\n- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.\n- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.\n- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.\n- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.\n- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.\n- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.\n- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.\n- Mean time to detect critical customer-journey failures is under 5 minutes.\n- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.\n- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.\n- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.\n- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith."}Proposal 4 restructured from 23 to 23 steps but reorganised waves, adding a dedicated order-query step (S18) and splitting pricing dual-run from payment isolation into separate steps (S16, S17). It tightened the charter step with operations veto language, added a gateway overhead cap, and made the warehouse adapter stability gate explicit (≥4 months). The rewrite also adds a 'raise regression coverage on touched code to at least 60%' threshold in S7, a new quantitative gate for monolith preparation.
- Added operations veto on search, stock, checkout, and payments in S1, making the rollback authority explicit at charter level.
- Added gateway p99 overhead <50 ms as a measurable gate in S6 before any endpoint migration.
- Added explicit '≥4 months adapter stability' gate in S11 before inventory read extraction, the most specific calendar commitment across all proposals.
- Added 'raise regression coverage on touched code to at least 60%' in S7, a new quantitative monolith-preparation gate.
- Split pricing dual-run (S16) from payment isolation (S17) for clearer dependency management and separate sign-off gates.
- Removed the explicit 'monolith codebase reduced ≥60%' success metric present in the round-3 version.
- Removed the explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms latency targets from the success-metrics block; they appear only in SLO definitions in S4.
- Removed the post-peak-1 reforecast step that was present in the round-3 version (S15); no adaptive checkpoint exists between the two peak gates.
- Proposal 1 : Target architecture, observability, and delivery platform structured as three consecutive foundation steps with the same dependency chain.
- Proposal 2 : Charter step with operations authority to stop a rollout and named rollback authority per domain.
- Proposal 5 : Pricing dual-run with 99.99% parity, per-slice route-back, and legacy evaluator retained through next sale; order-query with 60-day dual-run window.
- Proposal 3 : Dedicated post-peak-1 reforecast step that can shrink Season 2 scope based on evidence.
+ Charter the migration programme and protect peak trading windows+ Establish technical and business baseline with full dependency mapping+ Build observability, SLOs and error-budget controls+ Build delivery platform: CI/CD, feature flags, canary and runtime+ Wave 2 - Dual-run and prove pricing rule slices behind façade+ Wave 2 - Build order-query service and bounded returns workflowsProgramme governance, peak-protection calendar, and team capacityBaseline architecture, data, traffic, and business invariantsObservability, SLOs, and business-failure alertingCI/CD, feature flags, progressive delivery, and secure runtimeWave 3: Extract pricing and promotions service behind the façadeWave 5: Extract order management, notifications, and returns
The plan produced
1. Charter the migration programme and protect peak trading windows from P2 step 1
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (after 1) new
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (after 2) from P1 step 3
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (after 2) from P1 step 4
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (after 3, 4) from P1 step 5
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (after 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (after 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (after 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (after 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (after 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (after 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (after 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (after 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (after 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (after 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (after 10, 12, 13, 14, 15) from P5 step 17
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (after 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (after 8, 13, 14, 15) from P5 step 19
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (after 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (after 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (after 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (after 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (after 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
- Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 1816d107-043e-40fb-ae7a-5c486b542c2f, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
Previous Proposal 2 (ID: 389833c3-fdb0-4d23-951f-7570721a5e24, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
Previous Proposal 3 (ID: 2c552711-1681-4f9a-a904-7044d9b68d18, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
Previous Proposal 4 (ID: ecf6b2c1-5422-4b45-9a6d-2739355e4d7f, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
Previous Proposal 5 (ID: c4741457-2580-4338-b27f-a8973f412cda, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "The structure every proposing agent must answer with.", "properties": {"steps": {"items": {"description": "One step of a proposed plan. Dependencies are step_ids of the same proposal.", "properties": {"step_id": {"title": "Step Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "dependencies": {"items": {"type": "string"}, "title": "Dependencies", "type": "array"}}, "required": ["step_id", "title", "description", "dependencies"], "title": "Step", "type": "object", "additionalProperties": false}, "title": "Steps", "type": "array"}, "estimated_complexity": {"title": "Estimated Complexity", "type": "string"}, "success_metrics": {"title": "Success Metrics", "type": "string"}}, "required": ["steps", "estimated_complexity", "success_metrics"], "title": "ProposalContent", "type": "object", "additionalProperties": false}
{"steps": [{"step_id": "S1", "title": "Charter the migration programme and protect peak trading windows", "description": "Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.\n\n- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.\n- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.\n- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.\n- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.", "dependencies": []}, {"step_id": "S2", "title": "Establish technical and business baseline with full dependency mapping", "description": "Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.\n\n- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.\n- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.\n- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.\n- Produce anonymised production-shaped data and a repeatable 12x load profile.\n- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture, bounded contexts and data ownership rules", "description": "Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.\n\n- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.\n- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.\n- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.\n- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.\n- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Build observability, SLOs and error-budget controls", "description": "Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.\n\n- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.\n- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.\n- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.\n- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.\n- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.\n- Immutable audit events for pricing, payments, stock and order state changes.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build delivery platform: CI/CD, feature flags, canary and runtime", "description": "Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.\n\n- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.\n- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.\n- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.\n- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.\n- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.\n- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Deploy strangler gateway with instant route rollback", "description": "Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.\n\n- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.\n- Route by path, country, cohort, feature flag and percentage; default remains monolith.\n- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.\n- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.\n- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.\n- Measure gateway overhead < 50 ms p99 before moving endpoints.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Stabilize monolith through modularization and seams", "description": "Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.\n\n- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.\n- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.\n- Wrap high-risk database access behind repository or application interfaces.\n- Use expand-contract schema changes only; additive first, destructive only after all readers moved.\n- Add kill switches to every monolith-to-service integration; new features must use the new seams.\n- Raise regression coverage on touched code to at least 60% before extraction.", "dependencies": ["S2", "S3", "S4"]}, {"step_id": "S8", "title": "Establish event backbone, outbox, CDC and reconciliation framework", "description": "Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.\n\n- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.\n- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.\n- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.\n- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.\n- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.\n- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S9", "title": "Strengthen characterisation, contract and 12x load testing", "description": "Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.\n\n- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.\n- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.\n- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.\n- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.\n- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.\n- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.", "dependencies": ["S2", "S4", "S5", "S7"]}, {"step_id": "S10", "title": "Conduct pricing archaeology and build golden-master corpus", "description": "Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.\n\n- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.\n- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.\n- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.\n- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.\n- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.\n- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.", "dependencies": ["S2", "S7", "S9"]}, {"step_id": "S11", "title": "Modernise warehouse integration without changing warehouse contract", "description": "Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.\n\n- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.\n- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.\n- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.\n- Handle delayed, duplicate, malformed files and replay under peak load.\n- Keep monolith stock reservation and warehouse export authority; new service handles reads only.\n- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.", "dependencies": ["S3", "S8", "S9"]}, {"step_id": "S12", "title": "Wave 1 - Extract search and catalogue read services", "description": "Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.\n\n- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.\n- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.\n- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.\n- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.\n- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.\n- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S13", "title": "Wave 1 - Extract inventory availability reads", "description": "Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.\n\n- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.\n- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.\n- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.\n- Provide immediate fallback to monolith availability and replayable file recovery process.\n- Prove no extra oversell versus existing 15-minute lag before any sale.\n- Keep monolith read path live through next sale.", "dependencies": ["S6", "S8", "S9", "S11", "S12"]}, {"step_id": "S14", "title": "Wave 1 - Extract customer identity and loyalty balances", "description": "Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.\n\n- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.\n- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.\n- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.\n- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.\n- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.\n- Maintain staffed exception process for subject-access and loyalty mismatches.", "dependencies": ["S6", "S8", "S9", "S12"]}, {"step_id": "S15", "title": "Pre-sale readiness gate: certify hybrid estate before first peak", "description": "Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.\n- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.\n- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.\n- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.\n- Pre-scale, warm caches, agree provider rate limits, staff war room.\n- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.", "dependencies": ["S4", "S5", "S9", "S12", "S13", "S14"]}, {"step_id": "S16", "title": "Wave 2 - Dual-run and prove pricing rule slices behind façade", "description": "Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.\n\n- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.\n- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.\n- Alert on any mismatch; require business and finance sign-off before live routing.\n- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.\n- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.\n- If full engine extraction unsafe, the façade plus proven slices is success.", "dependencies": ["S10", "S12", "S13", "S14", "S15"]}, {"step_id": "S17", "title": "Wave 2 - Wrap payment providers and introduce financial reconciliation", "description": "Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.\n\n- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.\n- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.\n- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.\n- Preserve country and payment-method routing and customer-facing response semantics.\n- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.\n- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.", "dependencies": ["S6", "S8", "S9", "S15"]}, {"step_id": "S18", "title": "Wave 2 - Build order-query service and bounded returns workflows", "description": "Create independently deployable post-order value without splitting order creation transaction.\n\n- Publish reliable order lifecycle events from current command owner through outbox.\n- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.\n- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.\n- Reconcile order counts, state transitions, returns, refunds and event lag daily.\n- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.\n- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.", "dependencies": ["S8", "S13", "S14", "S15"]}, {"step_id": "S19", "title": "Wave 2 - Introduce cart and checkout façades with progressive orchestration", "description": "Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.\n\n- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.\n- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.\n- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.\n- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.\n- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.\n- If ownership transfer not safe before protected window, retain façade delegating to monolith.", "dependencies": ["S13", "S14", "S16", "S17", "S18"]}, {"step_id": "S20", "title": "Pre-sale readiness gate: certify expanded hybrid estate before second peak", "description": "Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.\n\n- Enforce same six-week freeze; no first cutovers or traffic experiments.\n- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.\n- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.\n- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.\n- Warm caches, pre-scale, agree provider limits, staff war room.\n- Obtain formal written sign-off from all stakeholders before entering protection window.", "dependencies": ["S15", "S16", "S17", "S18", "S19"]}, {"step_id": "S21", "title": "Wave 3 - Migrate back-office by workflow and refactor storefront to service layer", "description": "Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.\n\n- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.\n- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.\n- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.\n- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.\n- Implement edge caching/CDN for catalogue/search to protect services at 12x.\n- Remove direct SQL access to migrated data; replace with governed read models.", "dependencies": ["S12", "S13", "S14", "S16", "S18", "S19", "S20"]}, {"step_id": "S22", "title": "Wave 3 - Transfer write ownership through reversible single-writer cutovers", "description": "Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.\n\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.\n- Backfill with checksums, validate dual reads, then switch single command writer to service.\n- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.\n- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.\n- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.\n- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.", "dependencies": ["S8", "S12", "S13", "S14", "S16", "S17", "S18", "S19", "S21"]}, {"step_id": "S23", "title": "Decommission legacy paths and establish steady-state governance", "description": "Close the year by removing only provably obsolete paths and making hybrid estate sustainable.\n\n- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.\n- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.\n- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.\n- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.\n- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.\n- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.", "dependencies": ["S20", "S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.\n- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.\n- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.\n- Feature delivery remains at least 80% of baseline; no feature freeze.\n- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.\n- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.\n- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.\n- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.\n- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.\n- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.\n- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.\n- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route."}Proposal 5 is essentially identical to its round-3 version. The tool reports 23 steps kept, 0 added, 0 removed. Minor wording adjustments appear in S1 (added 'operations/SRE lead' title, added 'daily migration dependency board') and S2 (added 'connection usage' to baseline metrics), but no structural, sequencing, or metric changes occurred.
The proposal was already the most detailed in round 3 and the agent made no substantive revision in response to peer proposals.
- Minor: added 'connection usage' to baseline metrics in S2, making Postgres connection monitoring explicit from the start.
- Minor: added 'operations/SRE lead' title in S1, clarifying the operational accountability role.
The plan produced
1. Charter programme, define peak calendar, and lock team capacity from P4 step 1
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
-
Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
-
Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
-
Protect each sale with a hard window: no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after each January and July peak. Feature work continues behind dormant flags.
-
Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
-
Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
-
Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
-
Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
-
Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
-
2. Baseline architecture, data, traffic, and business invariants (after 1) from P4 step 2
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
-
Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
-
Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
-
Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
-
Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
-
Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
-
Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
-
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (after 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
-
Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
-
Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but must never write another service's database.
-
Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
-
Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
-
Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
-
Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
-
Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
-
Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
-
4. Instrument the estate and establish operational control (after 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
-
Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
-
Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
-
Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
-
Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
-
Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
-
Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
-
Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
-
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (after 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
-
Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
-
Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
-
Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
-
Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
-
Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
-
Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
-
Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
-
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (after 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
-
Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
-
Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
-
Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
-
Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
-
Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
-
Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
-
Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
-
7. Modularise the live monolith without stopping features (after 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
-
Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
-
Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
-
Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
-
Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
-
Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
-
Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
-
Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
-
8. Deploy the strangler gateway with minute-scale rollback (after 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
-
Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
-
Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
-
Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
-
Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
-
Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
-
Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
-
Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
-
9. Stand up the event backbone, outbox, CDC, and reconciliation product (after 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
-
Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
-
Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
-
Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
-
Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
-
Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
-
Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
-
10. Codify one extraction playbook every team must use (after 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
-
Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
-
Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
-
Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
-
Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
-
High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
-
Stored procedures leave only when the characterisation harness has an equivalent in service code.
-
Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
-
Document rollback authority, hypercare staffing, and exception handling for every stage.
-
11. Start pricing archaeology and deploy a legacy pricing façade (after 2, 7) from P2 step 8
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
-
Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
-
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
-
Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
-
Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
-
Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
-
Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
-
Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
-
12. Wave 1: Extract search as the first independently deployable service (after 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
-
Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
-
Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
-
Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
-
Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
-
Keep the old Lucene index warm as a cold standby through the next relevant sale.
-
Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
-
Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
-
13. Wave 1: Extract catalogue read models (after 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
-
Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
-
Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
-
Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
-
Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
-
Do not move authoring tools until reads are operationally boring.
-
Retain the monolith catalogue route through at least one relevant sale as fallback.
-
Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
-
14. Wave 1: Wrap warehouse files and extract inventory availability reads (after 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
-
Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
-
Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
-
Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
-
Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
-
Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
-
Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
-
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (after 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
-
Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
-
Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
-
Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
-
Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
-
Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
-
Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
-
16. Peak readiness gate 1: certify the hybrid estate before the first sale (after 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
-
Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
-
Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
-
Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
-
Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
-
Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
-
Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
-
Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
-
If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
-
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (after 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
-
Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
-
Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
-
Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
-
Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
-
Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
-
Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
-
If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
-
18. Wave 2: Isolate payment providers and create financial reconciliation (after 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
-
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
-
Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
-
Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
-
Preserve country and payment-method routing plus customer-facing response semantics during adoption.
-
Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
-
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
-
Keep PCI and provider contracts stable. Wrap, do not rewrite.
-
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (after 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
-
Publish reliable order lifecycle events from the current command owner through the outbox pattern.
-
Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
-
Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
-
Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
-
Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
-
Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
-
Keep legacy query and workflow routes available for immediate fallback during the observation period.
-
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (after 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
-
Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
-
Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
-
Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
-
Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
-
Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
-
Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
-
Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
-
If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
-
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (after 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
-
Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
-
Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
-
Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
-
Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
-
Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
-
Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
-
After the sale, compare actuals to forecasts and freeze lessons into the final wave.
-
Obtain formal written sign-off from all stakeholders before entering the protection window.
-
22. Migrate back-office workflows by role and transfer proven write ownership (after 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
-
Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
-
Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
-
For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
-
Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
-
Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
-
Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
-
Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
-
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (after 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
-
Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
-
Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
-
Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
-
Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
-
Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
-
Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
-
Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
-
Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
-
- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
[SYSTEM]
You are an expert assistant in complex project planning.
Your task is to generate a detailed and structured action plan to reach the main objective in the most professional and most detailed way, no matter how much work or steps will be needed to perform.
Use your internal reasoning processes to think deeply about the problem and create the most comprehensive plan possible.
Take as much time and space as you need to think through all aspects of the problem.
After your thorough analysis, answer with the plan in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
For your consideration and refinement, here are proposals from the previous round:
Previous Proposal 1 (ID: 1816d107-043e-40fb-ae7a-5c486b542c2f, Agent: claudeHaiku4.5_refine_1, LLM: anthropic/claude-haiku-4-5):
Estimated Complexity: high
Success Metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
Previous Proposal 2 (ID: 389833c3-fdb0-4d23-951f-7570721a5e24, Agent: gpt-5.6-terra_refine_2, LLM: openai/gpt-5.6-terra):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
Previous Proposal 3 (ID: 2c552711-1681-4f9a-a904-7044d9b68d18, Agent: grok-4.6_refine_3, LLM: xai/grok-4.6):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
Previous Proposal 4 (ID: ecf6b2c1-5422-4b45-9a6d-2739355e4d7f, Agent: deepseek-v4-pro_refine_4, LLM: deepseek/deepseek-v4-pro):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
Previous Proposal 5 (ID: c4741457-2580-4338-b27f-a8973f412cda, Agent: qwen3.8-max_refine_5, LLM: alibaba/qwen3.8-max):
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Please, considering the previous proposals as ideas that could be considered, focus on the main objective and generate an IMPROVED proposal or a completely DIFFERENT perspective if you deem it appropriate. Only if you consider any of them is amazing and impossible to improve, answer with the same proposal.
The plan has these parts:
- "steps": the list of steps, each with "step_id" (a short label unique within this proposal, such as S1, S2, S3), "title" (a short, descriptive title), "description" (what the step does and how, in Markdown: a short opening paragraph and then, if there are several concrete things to say, a bullet list) and "dependencies" (the step_ids of the other steps of THIS proposal that must be completed first; empty if none).
- "estimated_complexity": "low", "medium" or "high".
- "success_metrics": clear and measurable success metrics, one per line as a bullet list.
Think deeply about the problem, considering all aspects and implications. Develop a comprehensive understanding of what needs to be done to achieve the objective, then produce the plan.
{"steps": [{"step_id": "S1", "title": "Charter programme, define peak calendar, and lock team capacity", "description": "Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.\n\n- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.\n\n- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.\n\n- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.\n\n- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.\n\n- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.\n\n- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.\n\n- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.\n\n- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.", "dependencies": []}, {"step_id": "S2", "title": "Baseline architecture, data, traffic, and business invariants", "description": "Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.\n\n- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.\n\n- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.\n\n- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.\n\n- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.\n\n- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.\n\n- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.", "dependencies": ["S1"]}, {"step_id": "S3", "title": "Define target architecture, domain boundaries, ownership model, and honest year-one scope", "description": "Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.\n\n- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.\n\n- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.\n\n- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.\n\n- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.\n\n- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.\n\n- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.\n\n- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.\n\n- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.", "dependencies": ["S2"]}, {"step_id": "S4", "title": "Instrument the estate and establish operational control", "description": "Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.\n\n- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.\n\n- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.\n\n- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.\n\n- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.\n\n- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.\n\n- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.\n\n- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.", "dependencies": ["S2"]}, {"step_id": "S5", "title": "Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime", "description": "Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.\n\n- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.\n\n- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.\n\n- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.\n\n- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.\n\n- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.\n\n- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.\n\n- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.", "dependencies": ["S3", "S4"]}, {"step_id": "S6", "title": "Create the behavioural safety net: characterisation, contracts, and 12x load harness", "description": "Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.\n\n- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.\n\n- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.\n\n- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.\n\n- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.\n\n- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.\n\n- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.\n\n- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.", "dependencies": ["S4", "S5"]}, {"step_id": "S7", "title": "Modularise the live monolith without stopping features", "description": "The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.\n\n- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.\n\n- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.\n\n- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.\n\n- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.\n\n- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.\n\n- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.\n\n- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.", "dependencies": ["S3", "S5", "S6"]}, {"step_id": "S8", "title": "Deploy the strangler gateway with minute-scale rollback", "description": "Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.\n\n- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.\n\n- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.\n\n- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.\n\n- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.\n\n- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.\n\n- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.\n\n- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.", "dependencies": ["S4", "S5", "S6"]}, {"step_id": "S9", "title": "Stand up the event backbone, outbox, CDC, and reconciliation product", "description": "Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.\n\n- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.\n\n- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.\n\n- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.\n\n- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.\n\n- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.\n\n- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.", "dependencies": ["S3", "S5", "S7"]}, {"step_id": "S10", "title": "Codify one extraction playbook every team must use", "description": "Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.\n\n- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.\n\n- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.\n\n- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.\n\n- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.\n\n- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.\n\n- Stored procedures leave only when the characterisation harness has an equivalent in service code.\n\n- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.\n\n- Document rollback authority, hypercare staffing, and exception handling for every stage.", "dependencies": ["S6", "S8", "S9"]}, {"step_id": "S11", "title": "Start pricing archaeology and deploy a legacy pricing façade", "description": "Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.\n\n- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.\n\n- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.\n\n- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.\n\n- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.\n\n- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.\n\n- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.\n\n- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.", "dependencies": ["S2", "S7"]}, {"step_id": "S12", "title": "Wave 1: Extract search as the first independently deployable service", "description": "Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.\n\n- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.\n\n- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.\n\n- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.\n\n- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.\n\n- Keep the old Lucene index warm as a cold standby through the next relevant sale.\n\n- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.\n\n- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.", "dependencies": ["S9", "S10"]}, {"step_id": "S13", "title": "Wave 1: Extract catalogue read models", "description": "Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.\n\n- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.\n\n- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.\n\n- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.\n\n- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.\n\n- Do not move authoring tools until reads are operationally boring.\n\n- Retain the monolith catalogue route through at least one relevant sale as fallback.\n\n- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.", "dependencies": ["S12"]}, {"step_id": "S14", "title": "Wave 1: Wrap warehouse files and extract inventory availability reads", "description": "Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.\n\n- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.\n\n- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.\n\n- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.\n\n- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.\n\n- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.\n\n- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.", "dependencies": ["S9", "S10"]}, {"step_id": "S15", "title": "Wave 1: Extract customer reads and bounded loyalty with GDPR compliance", "description": "Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.\n\n- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.\n\n- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.\n\n- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.\n\n- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.\n\n- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.\n\n- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.", "dependencies": ["S9", "S10"]}, {"step_id": "S16", "title": "Peak readiness gate 1: certify the hybrid estate before the first sale", "description": "Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.\n\n- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.\n\n- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.\n\n- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.\n\n- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.\n\n- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.\n\n- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.\n\n- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.\n\n- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.", "dependencies": ["S6", "S8", "S12", "S13", "S14", "S15"]}, {"step_id": "S17", "title": "Wave 2: Dual-run and prove pricing rule slices behind the façade", "description": "Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.\n\n- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.\n\n- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.\n\n- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.\n\n- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.\n\n- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.\n\n- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.\n\n- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.", "dependencies": ["S11", "S13", "S14", "S16"]}, {"step_id": "S18", "title": "Wave 2: Isolate payment providers and create financial reconciliation", "description": "Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.\n\n- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.\n\n- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.\n\n- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.\n\n- Preserve country and payment-method routing plus customer-facing response semantics during adoption.\n\n- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.\n\n- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.\n\n- Keep PCI and provider contracts stable. Wrap, do not rewrite.", "dependencies": ["S6", "S9", "S10"]}, {"step_id": "S19", "title": "Wave 2: Deliver order-query slices, notifications, and bounded returns", "description": "Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.\n\n- Publish reliable order lifecycle events from the current command owner through the outbox pattern.\n\n- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.\n\n- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.\n\n- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.\n\n- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.\n\n- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.\n\n- Keep legacy query and workflow routes available for immediate fallback during the observation period.", "dependencies": ["S9", "S14", "S15"]}, {"step_id": "S20", "title": "Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration", "description": "Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.\n\n- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.\n\n- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.\n\n- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.\n\n- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.\n\n- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.\n\n- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.\n\n- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.\n\n- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.", "dependencies": ["S14", "S15", "S17", "S18"]}, {"step_id": "S21", "title": "Peak readiness gate 2: certify before the second sale and rehearse full-load reversion", "description": "Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.\n\n- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.\n\n- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.\n\n- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.\n\n- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.\n\n- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.\n\n- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.\n\n- After the sale, compare actuals to forecasts and freeze lessons into the final wave.\n\n- Obtain formal written sign-off from all stakeholders before entering the protection window.", "dependencies": ["S16", "S17", "S18", "S19", "S20"]}, {"step_id": "S22", "title": "Migrate back-office workflows by role and transfer proven write ownership", "description": "Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.\n\n- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.\n\n- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.\n\n- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.\n\n- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.\n\n- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.\n\n- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.\n\n- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.", "dependencies": ["S13", "S14", "S15", "S19", "S21"]}, {"step_id": "S23", "title": "Consolidate proven services, retire obsolete paths, and hand over steady-state governance", "description": "Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.\n\n- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.\n\n- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.\n\n- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.\n\n- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.\n\n- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.\n\n- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.\n\n- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.\n\n- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.", "dependencies": ["S21", "S22"]}], "estimated_complexity": "high", "success_metrics": "- Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.\n- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.\n- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.\n- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.\n- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.\n- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.\n- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.\n- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.\n- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.\n- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.\n- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.\n- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.\n- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.\n- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.\n- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.\n- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.\n- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.\n- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.\n- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales."}Votes
The calls of the vote
The votes
| Voter | Model | Voted for | Justification | Usage | Raw |
|---|---|---|---|---|---|
| claudeHaiku4.5_voter_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 |
Proposal C · grok-4.6_refine_3 winner | Proposal 3 most directly addresses the hard constraint of the five existing teams by explicitly capping independently deployable unit count to what those teams can operationally support and including a reforecasting step (S17) to shrink scope if migration capacity exceeds 30% or feature delivery drops below 80%, making it the most realistic and achievable plan for this complex migration while maintaining all safety and rollback requirements. |
34.4k in · 3.6k out · 59 s | show[SYSTEM]
You are an expert and objective evaluator of project plan proposals.
Your task is to select the BEST proposal based on criteria of completeness, clarity, and alignment with the main objective.
Use your internal reasoning processes to thoroughly analyze each proposal, considering all aspects and implications.
Take as much time and space as you need to evaluate each proposal in depth before making your decision.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Proposals to Evaluate:
--- PROPOSAL 1 ---
Proposal ID: a7cc4038-08e6-4aca-8b7e-bdcad0d0c148
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 ---
Proposal ID: c03e95c4-e898-415f-9405-f16728cd2973
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 ---
Proposal ID: ddf59c45-b82e-45c1-893d-14c3e17e4255
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 ---
Proposal ID: 157bbb38-f09a-4aae-8b94-9c539d3eb2ef
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 ---
Proposal ID: ff53d367-6253-49c9-9299-399ed3c47dcb
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Instructions:
1. Carefully evaluate each proposal considering:
- Clarity and detail of the proposed steps.
- Overall alignment with the Main Objective.
- Quality and relevance of the proposed success metrics.
- Coherence of dependencies between steps (if any).
2. Think deeply about each proposal, analyzing its strengths and weaknesses. Consider how well each proposal addresses the main objective and which one would be most effective.
After your thorough analysis, give the Proposal ID of the selected proposal and a one- or two-sentence justification of your choice.
{"selected_proposal_id": "ddf59c45-b82e-45c1-893d-14c3e17e4255", "justification": "Proposal 3 most directly addresses the hard constraint of the five existing teams by explicitly capping independently deployable unit count to what those teams can operationally support and including a reforecasting step (S17) to shrink scope if migration capacity exceeds 30% or feature delivery drops below 80%, making it the most realistic and achievable plan for this complex migration while maintaining all safety and rollback requirements."} |
| gpt-5.6-terra_voter_2 | gpt-5.6-terra · openai/gpt-5.6-terra |
Proposal E · qwen3.8-max_refine_5 | Proposal 5 is the most complete and coherent staged strangler plan. It combines explicit peak-window protection, reversible routing and single-writer controls, quantified parity and reconciliation gates, realistic façade-first treatment of pricing and checkout, and concrete readiness gates before both sales while preserving feature delivery. |
29.7k in · 364 out · 7 s | show[SYSTEM]
You are an expert and objective evaluator of project plan proposals.
Your task is to select the BEST proposal based on criteria of completeness, clarity, and alignment with the main objective.
Use your internal reasoning processes to thoroughly analyze each proposal, considering all aspects and implications.
Take as much time and space as you need to evaluate each proposal in depth before making your decision.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Proposals to Evaluate:
--- PROPOSAL 1 ---
Proposal ID: a7cc4038-08e6-4aca-8b7e-bdcad0d0c148
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 ---
Proposal ID: c03e95c4-e898-415f-9405-f16728cd2973
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 ---
Proposal ID: ddf59c45-b82e-45c1-893d-14c3e17e4255
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 ---
Proposal ID: 157bbb38-f09a-4aae-8b94-9c539d3eb2ef
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 ---
Proposal ID: ff53d367-6253-49c9-9299-399ed3c47dcb
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Instructions:
1. Carefully evaluate each proposal considering:
- Clarity and detail of the proposed steps.
- Overall alignment with the Main Objective.
- Quality and relevance of the proposed success metrics.
- Coherence of dependencies between steps (if any).
2. Think deeply about each proposal, analyzing its strengths and weaknesses. Consider how well each proposal addresses the main objective and which one would be most effective.
After your thorough analysis, give the Proposal ID of the selected proposal and a one- or two-sentence justification of your choice.
{"selected_proposal_id": "ff53d367-6253-49c9-9299-399ed3c47dcb", "justification": "Proposal 5 is the most complete and coherent staged strangler plan. It combines explicit peak-window protection, reversible routing and single-writer controls, quantified parity and reconciliation gates, realistic façade-first treatment of pricing and checkout, and concrete readiness gates before both sales while preserving feature delivery."} |
| grok-4.6_voter_3 | grok-4.6 · xai/grok-4.6 |
Proposal C · grok-4.6_refine_3 winner | It is the plan that best matches the real constraints: five teams, a 1.2 TB Postgres monolith that must not be split, and January/July peaks that cannot take first-time risk. It keeps independent deployability without forcing write-ownership, throttles Season 1 if a sale is inside 16 weeks, caps on-call and connection use, and reforecasts after the first peak before touching pricing or checkout. |
30.9k in · 127 out · 1 min 22 s | show[SYSTEM]
You are an expert and objective evaluator of project plan proposals.
Your task is to select the BEST proposal based on criteria of completeness, clarity, and alignment with the main objective.
Use your internal reasoning processes to thoroughly analyze each proposal, considering all aspects and implications.
Take as much time and space as you need to evaluate each proposal in depth before making your decision.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Proposals to Evaluate:
--- PROPOSAL 1 ---
Proposal ID: a7cc4038-08e6-4aca-8b7e-bdcad0d0c148
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 ---
Proposal ID: c03e95c4-e898-415f-9405-f16728cd2973
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 ---
Proposal ID: ddf59c45-b82e-45c1-893d-14c3e17e4255
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 ---
Proposal ID: 157bbb38-f09a-4aae-8b94-9c539d3eb2ef
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 ---
Proposal ID: ff53d367-6253-49c9-9299-399ed3c47dcb
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Instructions:
1. Carefully evaluate each proposal considering:
- Clarity and detail of the proposed steps.
- Overall alignment with the Main Objective.
- Quality and relevance of the proposed success metrics.
- Coherence of dependencies between steps (if any).
2. Think deeply about each proposal, analyzing its strengths and weaknesses. Consider how well each proposal addresses the main objective and which one would be most effective.
After your thorough analysis, give the Proposal ID of the selected proposal and a one- or two-sentence justification of your choice.
{"selected_proposal_id": "ddf59c45-b82e-45c1-893d-14c3e17e4255", "justification": "It is the plan that best matches the real constraints: five teams, a 1.2 TB Postgres monolith that must not be split, and January/July peaks that cannot take first-time risk. It keeps independent deployability without forcing write-ownership, throttles Season 1 if a sale is inside 16 weeks, caps on-call and connection use, and reforecasts after the first peak before touching pricing or checkout."} |
| deepseek-v4-pro_voter_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro |
Proposal C · grok-4.6_refine_3 winner | Proposal 3 best balances safety and progress by explicitly protecting the first peak with a throttle mechanism, mapping services to the existing five teams to avoid operational overload, inserting a data-driven reforecast after the first peak, and using guarded façades and reversible write transfers with reconciliation and rollback throughout. |
30.6k in · 7.7k out · 1 min 14 s | show[SYSTEM]
You are an expert and objective evaluator of project plan proposals.
Your task is to select the BEST proposal based on criteria of completeness, clarity, and alignment with the main objective.
Use your internal reasoning processes to thoroughly analyze each proposal, considering all aspects and implications.
Take as much time and space as you need to evaluate each proposal in depth before making your decision.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Proposals to Evaluate:
--- PROPOSAL 1 ---
Proposal ID: a7cc4038-08e6-4aca-8b7e-bdcad0d0c148
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 ---
Proposal ID: c03e95c4-e898-415f-9405-f16728cd2973
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 ---
Proposal ID: ddf59c45-b82e-45c1-893d-14c3e17e4255
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 ---
Proposal ID: 157bbb38-f09a-4aae-8b94-9c539d3eb2ef
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 ---
Proposal ID: ff53d367-6253-49c9-9299-399ed3c47dcb
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Instructions:
1. Carefully evaluate each proposal considering:
- Clarity and detail of the proposed steps.
- Overall alignment with the Main Objective.
- Quality and relevance of the proposed success metrics.
- Coherence of dependencies between steps (if any).
2. Think deeply about each proposal, analyzing its strengths and weaknesses. Consider how well each proposal addresses the main objective and which one would be most effective.
After your thorough analysis, give the Proposal ID of the selected proposal and a one- or two-sentence justification of your choice.
Answer with a single JSON object, and nothing else, that conforms to this JSON schema:
{"description": "What a voting agent must answer with.", "properties": {"selected_proposal_id": {"title": "Selected Proposal Id", "type": "string", "enum": ["a7cc4038-08e6-4aca-8b7e-bdcad0d0c148", "c03e95c4-e898-415f-9405-f16728cd2973", "ddf59c45-b82e-45c1-893d-14c3e17e4255", "157bbb38-f09a-4aae-8b94-9c539d3eb2ef", "ff53d367-6253-49c9-9299-399ed3c47dcb"]}, "justification": {"title": "Justification", "type": "string"}}, "required": ["selected_proposal_id", "justification"], "title": "VoteAnswer", "type": "object", "additionalProperties": false}
{"selected_proposal_id": "ddf59c45-b82e-45c1-893d-14c3e17e4255", "justification": "Proposal 3 best balances safety and progress by explicitly protecting the first peak with a throttle mechanism, mapping services to the existing five teams to avoid operational overload, inserting a data-driven reforecast after the first peak, and using guarded façades and reversible write transfers with reconciliation and rollback throughout."} |
| qwen3.8-max_voter_5 | qwen3.8-max · alibaba/qwen3.8-max |
Proposal C · grok-4.6_refine_3 winner | Proposal 3 best balances completeness with operability: it explicitly acknowledges the 1.2 TB Postgres connection-budget constraint, keeps all independently deployable units within the existing five-team on-call capacity, and includes a formal post-peak reforecast step that protects against overcommitment in Season 2. Its success metrics are the most thorough—covering peak latency, inventory oversell, PCI scope stability, and a funded follow-on roadmap—while its step dependencies and extraction playbook remain coherent and realistic for a no-freeze, rollback-safe 12-month programme. |
31.7k in · 3.2k out · 1 min 22 s | show[SYSTEM]
You are an expert and objective evaluator of project plan proposals.
Your task is to select the BEST proposal based on criteria of completeness, clarity, and alignment with the main objective.
Use your internal reasoning processes to thoroughly analyze each proposal, considering all aspects and implications.
Take as much time and space as you need to evaluate each proposal in depth before making your decision.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Main Objective: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
Proposals to Evaluate:
--- PROPOSAL 1 ---
Proposal ID: a7cc4038-08e6-4aca-8b7e-bdcad0d0c148
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 ---
Proposal ID: c03e95c4-e898-415f-9405-f16728cd2973
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 ---
Proposal ID: ddf59c45-b82e-45c1-893d-14c3e17e4255
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 ---
Proposal ID: 157bbb38-f09a-4aae-8b94-9c539d3eb2ef
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 ---
Proposal ID: ff53d367-6253-49c9-9299-399ed3c47dcb
Content:
Estimated Complexity: high
Success Metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Instructions:
1. Carefully evaluate each proposal considering:
- Clarity and detail of the proposed steps.
- Overall alignment with the Main Objective.
- Quality and relevance of the proposed success metrics.
- Coherence of dependencies between steps (if any).
2. Think deeply about each proposal, analyzing its strengths and weaknesses. Consider how well each proposal addresses the main objective and which one would be most effective.
After your thorough analysis, give the Proposal ID of the selected proposal and a one- or two-sentence justification of your choice.
{"selected_proposal_id": "ddf59c45-b82e-45c1-893d-14c3e17e4255", "justification": "Proposal 3 best balances completeness with operability: it explicitly acknowledges the 1.2 TB Postgres connection-budget constraint, keeps all independently deployable units within the existing five-team on-call capacity, and includes a formal post-peak reforecast step that protects against overcommitment in Season 2. Its success metrics are the most thorough—covering peak latency, inventory oversell, PCI scope stability, and a funded follow-on roadmap—while its step dependencies and extraction playbook remain coherent and realistic for a no-freeze, rollback-safe 12-month programme."} |
Selected plan
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as 50% roadmap, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (after 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (after 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (after 2) from P2 · round 0 step 2
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (after 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (after 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (after 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (after 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a route change, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (after 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (after 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (after 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (after 6, 9) from P2 · round 0 step 12
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (after 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (after 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (after 10, 12) from P1 · round 2 step 14
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (after 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (after 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (after 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (after 15, 16, 18) from P2 · round 3 step 15
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (after 13, 18, 19) from P2 · round 1 step 21
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (after 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (after 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
- Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Evolution analysis
The analysis in brief
At a glance
- Analyst's first choice, blind to the vote: proposal 3 · grok-4.6_refine_3
- The vote: proposal 3 · grok-4.6_refine_3 — the analyst agrees
- Against the initial proposals: better than every initial proposal
- Rounds: round 1 converging · round 2 converging · round 3 converging · round 4 converging
- The process: 8 problems observed, 8 suggestions
The final round, in the analyst's words
All five final-round proposals have converged on the same architecture: a strangler gateway, event backbone with outbox/CDC, pricing archaeology behind a façade, two explicit peak-readiness gates, a unified extraction playbook, and an honest year-one scope that accepts independently deployable façades as success even when write ownership stays in the monolith. The differentiation that remains is granularity (20–23 steps), the sharpness of reforecast mechanisms, explicit five-team operability constraints, and a few unique operational details like Postgres connection budgets, SSR cache handling, and command-rollback semantics.
Raw prompts and responses of every analysis call
[ROUND 0]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
This is round 0: every agent wrote its plan independently, without seeing the others.
--- PROPOSAL 1 (agent claudeHaiku4.5_initial_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
--- PROPOSAL 2 (agent gpt-5.6-terra_initial_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
--- PROPOSAL 3 (agent grok-4.6_initial_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
--- PROPOSAL 4 (agent deepseek-v4-pro_initial_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
--- PROPOSAL 5 (agent qwen3.8-max_initial_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Your answer has these parts:
- "round_summary": two or three sentences on the round as a whole (approaches taken, how different the proposals are).
- "proposals": one entry per proposal, each with "proposal" (its number), "summary" (a very concise summary of what the agent proposes: three or four sentences at most) and "approach" (the angle it takes, in a few words).
[ROUND 1]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
This is round 1, a refinement round: every agent received ALL the proposals of round 0 and wrote a new plan, improving on them or taking a different approach. By convention, the previous version of proposal N is proposal N of round 0, written by the same model.
PROPOSALS OF ROUND 0 (the previous versions):
--- PROPOSAL 1 (agent claudeHaiku4.5_initial_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
--- PROPOSAL 2 (agent gpt-5.6-terra_initial_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
--- PROPOSAL 3 (agent grok-4.6_initial_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
--- PROPOSAL 4 (agent deepseek-v4-pro_initial_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
--- PROPOSAL 5 (agent qwen3.8-max_initial_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
Step-level differences computed by the tool:
Proposal 1 vs the previous-round proposal it resembles most (qwen3.8-max_initial_5): 8 steps kept, added ['Migration charter, governance, and peak-season blackout protocol', 'Baseline the monolith: architecture, data, and operational risk', 'Define target bounded contexts and data ownership model', 'Build CI/CD, feature flags, and progressive-delivery platform', 'Stabilise and modularise the monolith in place', 'Deploy event-driven backbone: Kafka, outbox pattern, and CDC', 'Deploy API gateway and traffic-routing layer with instant rollback', 'Discover, document, and freeze pricing and promotions rules (parallel workstream)', 'Modernise warehouse integration: adapter for existing file exchange', 'Wave 1: Extract search service (read-only, nightly-batch replacement)', 'Peak readiness gate 1: before January/July peak (if in window)', 'Wave 2: Extract inventory service with warehouse adapter', 'Peak readiness gate 2: before second major peak (July if first was January)', 'Final peak readiness validation and chaos engineering', 'Retire legacy paths, decommission monolith, and establish steady-state governance'], removed ['Full-Scope Discovery and Dependency Mapping', 'Build CI/CD Pipelines and Feature-Flag Platform', 'Team Topology Realignment and Governance Model', 'Strangler-Fig Gateway and Anti-Corruption Layer', 'Database Decomposition Strategy and Shared-Data Refactor', 'Event-Driven Backbone and Async Messaging Layer', 'Containerisation and Kubernetes Platform Readiness', 'Extract Inventory and Warehouse Sync Service (Wave 3)', 'Deep Analysis and Rule Documentation for Pricing & Promotions', 'Storefront Modernisation and Mobile-App API Alignment', 'Peak-Season Load Testing and Resilience Validation', 'Monolith Decommission and Final Data Migration']
Proposal 2 vs the previous-round proposal it resembles most (gpt-5.6-terra_initial_2): 6 steps kept, added ['Launch the migration programme and protect revenue', 'Establish the factual baseline and critical invariants', 'Set target boundaries and realistic 12-month scope', 'Create the peak calendar and release-control policy', 'Build the paved road for independently deployable services', 'Stabilise and modularise the live monolith', 'Implement governed events, replication, and reconciliation', 'Build risk-weighted quality and capacity assurance', 'Contain pricing and promotions through archaeology and a façade', 'Introduce payment-provider adapters and financial reconciliation', 'Move proven pricing slices and prepare cart and checkout façades', 'Progressively migrate cart and checkout orchestration', 'Transfer data ownership one entity group at a time', 'Migrate back-office workflows incrementally', 'Certify hybrid peak readiness and rehearse reversions', 'Consolidate proven services and hand over sustainable operations'], removed ['Establish migration governance and delivery model', 'Define target architecture and domain boundaries', 'Create production safety foundations', 'Build secure delivery and runtime platform', 'Improve monolith safety while it remains live', 'Implement integration, event, and data-transition patterns', 'Create quality, performance, and release assurance', 'Select and sequence extraction waves', 'Discover and contain pricing and promotions', 'Create cart, checkout, and payment transition architecture', 'Transfer ownership through controlled data cutovers', 'Execute progressive traffic migration and rollback drills', 'Prepare peak-season resilience and capacity certification', 'Retire legacy paths and establish steady-state service governance']
Proposal 3 vs the previous-round proposal it resembles most (grok-4.6_initial_3): 10 steps kept, added ['Baseline the live system and business invariants', 'Target architecture and honest 12-month scope', 'Team model that keeps features flowing', 'Inventory adapter and availability reads', 'Customer, session and loyalty with GDPR', 'Dual-run only proven pricing slices', 'Order query, notifications and returns slices', 'Checkout façade and payment adapters', 'Independent pipelines after the first service is real', 'Single-writer ownership cutovers', 'First peak-season certification', 'Second peak-season certification', 'Shrink the monolith and hand over governance'], removed ['Peak calendar and freeze protocol', 'Baseline architecture, data and SLOs', 'Bounded contexts and extraction backlog', 'Team operating model without a freeze', 'Data-change playbook: dual-write, reconcile, roll back', 'Extract identity, accounts and session', 'Extract inventory and warehouse sync', 'Extract pricing and promotions behind dual-run', 'Extract cart', 'Extract checkout and payment orchestration', 'Extract order management', 'Extract returns, loyalty and remaining back-office', 'Split data ownership and retire stored procedures', 'Independent deploy pipelines and repository split', 'Peak rehearsals, chaos and residual shrink']
Proposal 4 vs the previous-round proposal it resembles most (deepseek-v4-pro_initial_4): 11 steps kept, added ['Migration charter, governance, and peak calendar', 'Baseline architecture, data, traffic, and operational risk', 'Build progressive delivery platform and CI/CD', 'API gateway and strangler façade', 'Event backbone, outbox, and CDC', 'Data transition and reconciliation playbook', 'Modularize monolith and enforce seams', 'Build production-like staging and load test harness', 'Pricing and promotions discovery and golden-master harness', 'Pre-January peak readiness and freeze', 'Pre-July peak readiness and freeze', 'Final ownership cutovers and monolith decommission'], removed ['Baseline and decompose the monolith into bounded contexts', 'Build zero-downtime CI/CD and database migration automation', 'Introduce traffic routing and feature flag platform', 'Peak readiness gate before first sales peak', 'Extract back-office capabilities', 'Peak readiness gate before second sales peak', 'Decommission monolith code and data ownership for migrated modules', 'Final cutover, contract freeze and monolith retirement']
Proposal 5 vs the previous-round proposal it resembles most (gpt-5.6-terra_initial_2): 12 steps kept, added ['Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes', 'Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback', 'Stabilise and Modularise the Monolith In Place', 'Build Inter-Service Communication Framework and Resilience Patterns', 'Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams', 'Extract Customer Accounts, Identity, and Loyalty Service (Wave 1)', 'Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness', 'Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4)', 'Extract Back-Office Capabilities and Storefront Modernisation (Wave 7)', 'Monolith Decommission, Final Data Migration, and Steady-State Governance'], removed ['Build secure delivery and runtime platform', 'Improve monolith safety while it remains live', 'Create quality, performance, and release assurance', 'Select and sequence extraction waves', 'Introduce edge routing and façade interfaces', 'Discover and contain pricing and promotions', 'Extract customer and loyalty capabilities safely', 'Retire legacy paths and establish steady-state service governance']
Origin of the steps of the new proposals, matched by title by the tool (evidence for "taken"; ideas can also travel without a matching title):
Proposal 1: 4 of its 23 steps match its own previous version, 8 are new; steps 2, 23 resemble steps 2, 20 of proposal 2; steps 7, 19 resemble steps 9, 20 of proposal 3; steps 6, 14, 16, 18 resemble steps 5, 16, 10, 16 of proposal 4; steps 17, 20, 21 resemble steps 14, 16, 17 of proposal 5
Proposal 2: 6 of its 22 steps match its own previous version, 12 are new; step 8 resembles step 15 of proposal 1; steps 4, 7 resemble steps 2, 9 of proposal 3; step 18 resembles step 11 of proposal 4
Proposal 3: 10 of its 23 steps match its own previous version, 9 are new; steps 3, 13, 21, 22 resemble steps 3, 12, 19, 19 of proposal 2
Proposal 4: 8 of its 23 steps match its own previous version, 9 are new; steps 2, 18 resemble steps 2, 15 of proposal 2; steps 1, 9, 17 resemble steps 1, 9, 20 of proposal 3; step 16 resembles step 14 of proposal 5
Proposal 5: 8 of its 22 steps match its own previous version, 0 are new; step 9 resembles step 8 of proposal 1; steps 1, 2, 8, 13, 19, 20, 21 resemble steps 1, 2, 7, 12, 17, 18, 19 of proposal 2; steps 5, 7, 14 resemble steps 4, 9, 17 of proposal 3; steps 3, 4, 10 resemble steps 2, 3, 5 of proposal 4
PROPOSALS OF ROUND 1 (to assess):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Your answer has these parts:
- "round_summary": two or three sentences on how the round went as a whole.
- "converging": true if the proposals of this round are more similar to each other than those of the previous round, false otherwise.
- "proposals": one entry per proposal of round 1, each with:
- "proposal": its number,
- "assessment": "improved", "worsened", "mixed" or "unchanged" with respect to its previous version ("no_previous_version" if that agent produced nothing in the previous round),
- "what_changed": a concise account of how it improved or worsened and why (three or four sentences at most),
- "improvements": a list of concrete gains (specific steps, metrics, structure),
- "regressions": a list of concrete losses (dropped steps, vaguer metrics, broken dependencies...),
- "taken": the ideas this proposal visibly adopted from the OTHER proposals of round 0 (not from its own previous version): one entry per idea with "from_proposal" (the number of the proposal it came from), "steps" (the numbers of the steps of that proposal where the idea lives, as listed above; empty if it is not tied to specific steps), "what" (the idea, one sentence) and "why" (how it was used or adapted, one sentence),
- "rejected": the ideas of the OTHER proposals of round 0 that this proposal visibly declined: an explicit contradiction, or a prominent idea it saw and left out while taking the opposite approach. Same fields; "why" gives the evidence (what the proposal does instead). Do not list mere omissions without evidence; an empty list is a valid answer.
[ROUND 2]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
This is round 2, a refinement round: every agent received ALL the proposals of round 1 and wrote a new plan, improving on them or taking a different approach. By convention, the previous version of proposal N is proposal N of round 1, written by the same model.
PROPOSALS OF ROUND 1 (the previous versions):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- **Zero unplanned downtime** attributed to migration work across all 12 months; all maintenance performed via feature flags or progressive routing.
- **Every extraction step is reversible within 5 minutes** via flag rollback or route change, validated at least once in production before full cutover.
- **Peak-season capacity guaranteed**: January and July sales complete with baseline performance plus 12× headroom; zero capacity-related errors; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
- **By end of month 12**: at least 8 core services independently deployable (search, catalogue, customer, inventory, pricing, cart, checkout, orders) from separate repositories with independent data ownership and daily deployment cadence.
- **Database decomposition complete**: All 350 tables owned by exactly one service; zero cross-service direct database joins remain; shared Postgres deprecated in favour of per-service or per-bounded-context schemas.
- **Monolith code reduced** from 2 million lines to <100k lines (legacy orchestration and audit-only components); all migrated code lives in services.
- **Test coverage on migrated code paths** reaches ≥ 80%; contract tests exist for every inter-service API boundary and event stream.
- **Deployment velocity transformed**: Frequency increases from bi-weekly to daily per service; lead time for changes decreases from weeks to hours.
- **Pricing and promotions parity** maintained at ≥ 99.99% against approved golden-master cases; shadow-run discrepancies logged and resolved before traffic cutover.
- **Payment processing resilience**: All three providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- **Data consistency and reconciliation**: Automatic nightly checks confirm service data matches source-of-truth; unresolved discrepancies < 0.01% of records; zero unresolved financial discrepancies.
- **Feature delivery continues uninterrupted**: Business roadmap throughput maintained at ≥ 80% of baseline; feature work and migration work coexist in same delivery pipeline via feature flags.
- **Back-office continuity**: 300 staff experience zero disruption during migration; new portal deployed in parallel with legacy; training delivered per user cohort.
- **Mean time to recover (MTTR)** for any service incident ≤ 10 minutes via circuit breakers, fallbacks, and practised runbooks.
- **Warehouse integration modernised**: Event-driven inventory updates coexist with file-based exchange; 15-minute batch sync is eliminated without warehouse-system changes.
Steps (23):
1. Migration charter, governance, and peak-season blackout protocol
Establish the decision-making structure and non-negotiable constraints that protect revenue and enable long-term delivery.
2. Baseline the monolith: architecture, data, and operational risk (depends on: 1)
Map the entire system before making changes. Document current state to become the rollback reference for every step.
3. Define target bounded contexts and data ownership model (depends on: 2)
Agree which service will own which tables and business entities. Plan database decomposition strategy: which domains get their own database, which share a schema within a single PostgreSQL instance, and how CDC or replication will work.
4. Build CI/CD, feature flags, and progressive-delivery platform (depends on: 1)
Deploy the infrastructure that allows every team to ship independently. Feature flags decouple code deployment from customer release; canary and blue-green deployments enable rollback in minutes.
5. Establish observability: structured logs, metrics, tracing, and SLOs (depends on: 4)
Instrument the monolith so every extraction is measurable. Define SLOs per domain (storefront latency, checkout latency, search quality, payment success rate). Alert on error-budget burn, not CPU. Without observability, you cannot tell if an extraction succeeded.
6. Strengthen tests and establish contract-testing foundation (depends on: 2, 5)
Raise coverage from 25% to at least 60% on paths that will be extracted first. Introduce characterization tests around stored procedures and pricing rules before moving them. Build consumer-driven contract tests between modules that will become services.
7. Stabilise and modularise the monolith in place (depends on: 6)
Create seams before you create processes. Enforce module boundaries using architecture tests and code-ownership rules. Wrap high-risk database access (especially pricing and checkout) behind application interfaces. Ban new cross-module joins. This makes the monolith safer while it is still primary.
8. Deploy event-driven backbone: Kafka, outbox pattern, and CDC (depends on: 3, 4)
Stand up Kafka with topics per bounded context. Implement transactional outbox publishing in the monolith: every state change publishes an event atomically with the database write. Set up CDC (Debezium) from PostgreSQL to Kafka for tables not yet owned by services. This is the reversible integration spine that allows services to coexist with the monolith without dual-write corruption.
9. Deploy API gateway and traffic-routing layer with instant rollback (depends on: 4, 7)
Place a reverse proxy (Kong, Envoy, or AWS ALB) in front of the monolith. Configure routing by path, header, feature flag, and traffic percentage. Implement traffic mirroring (shadow mode) so new services validate against live production requests before receiving real traffic. Default route always returns to monolith; rollback is a route change, not a redeploy.
10. Discover, document, and freeze pricing and promotions rules (parallel workstream) (depends on: 2)
Form a task force with architects, original pricing team, and business analysts. Read the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies. Extract real production decision traces from logs; build a test corpus with 1,000+ real orders per country. Produce a signed-off rule specification document that represents current behaviour. This workstream runs in parallel with infrastructure build so that by month 4–5, pricing extraction can begin.
11. Modernise warehouse integration: adapter for existing file exchange (depends on: 8)
Build an adapter that wraps the existing 15-minute file exchange. Instead of the monolith polling files, the adapter consumes files and publishes `inventory-updated` events to Kafka. The warehouse contract stays unchanged (files), but inventory changes flow through events. This enables the inventory service to be extracted later without changing warehouse systems.
12. Wave 1: Extract search service (read-only, nightly-batch replacement) (depends on: 8, 9, 10)
Carve out the simplest, lowest-risk extraction. Replace the nightly Lucene rebuild with a real-time search service. Move search index to Elasticsearch or OpenSearch; feed it via Kafka events from catalogue changes in the monolith. Run shadow queries against both Lucene and the new service; compare results. Route 1% → 10% → 50% → 100% of storefront search traffic over two weeks.
13. Wave 1: Extract catalogue read service (depends on: 12)
Build a catalogue service owning product data, media, categories, and localisation. Feed data from the monolith via CDC during transition. Run shadow reads comparing product availability and locale content. Route read traffic gradually by country and language. Keep the monolith as fallback for the full testing period. This validates the extraction pattern on a second service.
14. Peak readiness gate 1: before January/July peak (if in window) (depends on: 13)
If a major sales peak falls during months 1–4, freeze further extractions. Run production-like load tests at 12× baseline with current routing mix. Rehearse rollback for all extracted services. Certify that the monolith fallback can absorb full traffic. Obtain formal sign-off before peak season. If no peak in this window, this is a placeholder.
15. Wave 2: Extract customer and identity service (depends on: 13, 14)
Move customer profile, addresses, sessions, and login behind a dedicated service. Use CDC to sync customer tables from the monolith during transition. Implement session migration without forced logouts. Dual-read loyalty points until the loyalty module is extracted. Route authentication and profile reads via feature flags starting at 1%. Rollback returns to monolith auth with no password resets.
16. Wave 2: Extract inventory service with warehouse adapter (depends on: 15, 11)
Build an inventory service owning ATP (available-to-promise), reservations, and warehouse sync. Integrate the warehouse adapter (from S11) so the service consumes inventory files or API updates and publishes events. Expose inventory availability and reservation APIs to cart and checkout. Run reconciliation between old batch and new event flow for all SKUs. Route inventory reads gradually; keep monolith fallback. The monolith remains the reservation authority until order and inventory ownership are fully designed.
17. Wave 2: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 13, 16)
Build a pricing service using the rule catalogue from S10. Externalise country-specific rules as configuration, not hard-coded logic. Deploy the service in shadow mode: every pricing call is sent to both monolith and new service. A comparator logs every discrepancy. Only after discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin canary traffic shifting (1% → 5% → 25% → 100%) by country. Keep monolith pricing available as rollback for 90 days post-cutover.
18. Peak readiness gate 2: before second major peak (July if first was January) (depends on: 17)
Freeze new extractions 6 weeks before peak. Run full load test at 12× baseline with current service routing (search, catalogue, customer, inventory at various percentages). Rehearse rollback for all services. Validate capacity headroom. Certify the platform and monolith fallback for peak load. If this peak has already passed, skip.
19. Wave 3: Extract cart and checkout (with payment provider integration) (depends on: 18)
Build a checkout service owning cart state and checkout orchestration. Cart state moves to a dedicated data store (Redis transient, PostgreSQL persistent) using CDC from the monolith during transition. Wrap the three payment providers in adapters with circuit breakers and idempotency keys. Implement orchestration (cart → pricing API → inventory API → payment adapter → order creation). Run extensive chaos tests (payment timeouts, provider failures, network partitions). Route by country and payment method starting at 1%. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
20. Wave 3: Extract order management and returns (depends on: 19)
Build an order service consuming `order-placed` events from checkout. Own order lifecycle, fulfilment tracking, and returns workflow. Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Back-office order views call the new service API through the gateway. Validate that returns process (including cross-border returns) works identically. Rollback re-routes order queries to monolith; event replay ensures no order is lost.
21. Extract back-office and modernise staff portal (300 users, 8 countries) (depends on: 20)
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services. Migrate back-office routes incrementally via the gateway. Run parallel operation for 4 weeks: staff use new portal with feedback channel; legacy portal stays accessible. Decommission legacy admin screens only after 30 days of zero critical issues. Provide training for all 300 back-office users.
22. Final peak readiness validation and chaos engineering (depends on: 21)
Run full-stack load tests at 12× peak (480,000 orders/day equivalent) including all services, gateway, databases, Kafka, search, payment provider adapters, and warehouse integration. Inject failures: kill pods, introduce latency, take providers offline, simulate Kafka broker loss. Validate autoscaling, fallback paths, and MTTR. Produce capacity report. Confirm all SLOs are met under peak stress. Obtain formal sign-off from engineering, operations, and business. This is the final gate before monolith decommission.
23. Retire legacy paths, decommission monolith, and establish steady-state governance (depends on: 22)
After 30 days of zero unplanned downtime with 100% traffic on services, begin decommission. Remove feature flags and dark-launch paths for all extracted modules. Verify no production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service databases. Archive monolith codebase and database (retain read-only for 12 months for audit). Update runbooks, on-call rotations, and disaster-recovery plans. Establish service ownership, SLOs, and quarterly architecture reviews. Conduct retrospective documenting lessons learned and future roadmap.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - No unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; routing rollback completes within 5 minutes and migration-related severity-one recovery completes within 30 minutes.
- January and July sales achieve at least the pre-programme availability, conversion rate, payment approval rate, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined sales-protection windows.
- Critical journeys have 100% automated coverage of defined price, payment, order, refund, stock reservation, and loyalty-ledger scenarios; all changed migration paths have contract, integration, and reconciliation tests.
- Search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, and pricing façade are independently deployable with named ownership and operational readiness by month 12.
- Cart and checkout are independently deployable façades by month 12; transactional command ownership transfers only where stated parity, reconciliation, failure-mode, and peak-capacity gates pass.
- Pricing rule slices receive live traffic only after at least 99.99% exact parity on approved golden-master and production-shadow cases, with every accepted difference approved by business and finance.
- Every extracted service has zero direct writes to another service database; cross-service state propagation uses versioned APIs or events with idempotency and monitored replay.
- For each ownership cutover, unresolved record discrepancies remain below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period.
- Routine compatible service releases can be deployed at least weekly without the monolith maintenance window, while roadmap delivery remains at least 80% of the agreed pre-programme baseline.
Steps (22):
1. Launch the migration programme and protect revenue
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable constraints.
- Appoint an accountable programme lead, chief architect, domain owners, operations lead, security/privacy lead, and business owners for pricing, finance, warehouse, and country operations.
- Reserve team capacity: 50% roadmap delivery, 30% migration, and 20% quality, operational resilience, and unplanned work. Reprioritisation requires steering approval.
- Publish decision rights, architecture principles, risk register, dependency board, escalation process, and a weekly engineering-business steering cadence.
- Define sales-protection windows: no first production cutover, ownership transfer, destructive schema change, payment change, or traffic increase in the six weeks before, during, and two weeks after each January and July sale period.
- Feature work continues throughout. New capabilities use flags and compatible interfaces so deployment is separated from customer release.
2. Establish the factual baseline and critical invariants (depends on: 1)
Measure current behaviour before changing it. The baseline is the comparison point for every migration decision and rollback.
- Trace storefront, mobile, back-office, warehouse, payment, scheduled-job, and support journeys through code, endpoints, tables, stored procedures, and external integrations.
- Inventory all 350 tables, stored procedures, triggers, files, writers, readers, cross-module joins, data classifications, retention rules, and GDPR obligations.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, errors, conversion, approval rate, database saturation, and recovery time.
- Define non-negotiable business invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
- Produce an extraction scorecard using coupling, change rate, business risk, data ownership feasibility, rollback quality, and value.
3. Set target boundaries and realistic 12-month scope (depends on: 2)
Define bounded contexts and data ownership without committing to a risky monolith retirement date. The target is independently deployable capabilities, not a big-bang rewrite.
- Define initial domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable owner and one system of record for every entity group. A service may hold a replicated read model but may never write another service's database.
- Set transition states: monolith-owned, replicated read model, shadow-validated, service command owner with legacy adapter, and legacy-retired.
- Prohibit distributed transactions and uncontrolled dual writes. Use one command owner, transactional outbox, idempotency, compensations, reconciliation, and business exception queues.
- Set the year-one exit scope: independently deployable edge, search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and returns slices, payment adapters, pricing façade and proven rule slices, plus a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Create the peak calendar and release-control policy (depends on: 1, 2)
Turn the January and July constraint into an executable calendar and change policy.
- Map the 12 months against the actual sale dates, country-specific campaigns, warehouse stocktakes, payment-provider freezes, and mobile release schedules.
- Schedule capacity rehearsals at least six weeks before each peak and freeze traffic expansion before the protection window begins.
- Define permitted work in protection windows: monitoring, capacity changes, reversible defect fixes, rehearsed rollback exercises, and business features already proven behind dormant flags.
- Require a formal go/no-go review for every material migration, with operations holding veto authority for checkout, payment, search, and inventory changes.
- Maintain a change ledger showing route, flag, schema version, source of truth, rollback action, responsible on-call team, and customer impact.
5. Instrument the monolith and define operational objectives (depends on: 2, 3)
Make the existing estate observable before any production traffic is moved.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetic transactions, and real-user monitoring to the monolith and its external boundaries.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, back-office, and warehouse exchange.
- Alert on customer and financial outcomes, including price mismatches, payment/order mismatch, inventory discrepancies, event lag, search zero-result changes, and failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths. Include country, currency, language, payment provider, and traffic cohort dimensions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the paved road for independently deployable services (depends on: 3, 5)
Deliver a small, standard platform that lowers operational risk rather than introducing unnecessary infrastructure complexity.
- Provide templates for Java services with health and readiness checks, graceful shutdown, OpenTelemetry, authentication, configuration, secrets, database migrations, API documentation, outbox publishing, and idempotent consumers.
- Create CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, performance, and deployment checks.
- Provision isolated integration, staging, performance, and production environments through infrastructure as code. Use managed or highly available runtime, database, cache, and messaging services appropriate to the retailer's operating model.
- Implement progressive delivery with flags, canary or blue/green deployment, automated SLO-based rollback, deployment freeze controls, and auditable approvals for financial changes.
- Establish least-privilege service identities, secret rotation, encryption, vulnerability management, audit logging, PCI scope assessment, and GDPR controls.
7. Stabilise and modularise the live monolith (depends on: 2, 5, 6)
Make the monolith safer to coexist with services while preserving feature delivery.
- Establish code ownership and architecture tests for domain package boundaries. Prevent new cross-domain table access, joins, and stored-procedure dependencies.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Apply expand-contract rules for all schema changes. Additive changes precede code changes; destructive changes require a consumer inventory and completed observation period.
- Add kill switches to every new monolith-to-service integration. Prove online deployment, connection draining, and backward-compatible schema releases to reduce reliance on the 30-minute maintenance window.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
8. Implement governed events, replication, and reconciliation (depends on: 3, 6, 7)
Build reusable coexistence patterns before moving any data or command responsibility.
- Deploy an event backbone with schema governance, compatibility checks, retention, replay, dead-letter handling, consumer ownership, and throughput sized beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be introduced, with a documented retirement plan.
- Build a replication framework for initial backfill, checkpoints, replay, lag monitoring, checksums, record-level comparisons, financial totals, stock totals, and exception workflows.
- Standardise anti-corruption adapters and versioned API/event contracts. Include timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define the rollback rule: route writes to one compatible command owner. A route rollback must preserve writes already accepted by the new path through events or compatibility adapters; it must never discard or blindly reverse financial records.
9. Build risk-weighted quality and capacity assurance (depends on: 2, 5, 6, 8)
Replace confidence based on a fortnightly release with automated evidence for customer and financial journeys.
- Create anonymised, production-shaped fixtures covering eight countries, three currencies, four languages, tax, promotions, guest and registered customers, warehouse states, and all payment-provider outcomes.
- Automate characterization, API, contract, integration, end-to-end, data-reconciliation, load, soak, spike, failover, and chaos tests. Prioritise affected paths over a blanket line-coverage target.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Establish a production-like performance environment and provider and warehouse simulators. Test the hybrid path, not services in isolation.
- Make release gates explicit: observability, rollback rehearsal, compatible contracts, reconciliation, security, and capacity evidence are required before traffic expansion.
10. Introduce edge routing and stable channel façades (depends on: 5, 6, 7, 9)
Decouple web, mobile, and back-office clients from monolith implementation paths while keeping their current contracts intact.
- Place an API gateway and, where needed, backend-for-frontend façade in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default all routes to the monolith until promotion criteria are met.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add traffic mirroring only for safe, read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Test instant route rollback, cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith.
11. Extract catalogue reads and modernise search (depends on: 4, 8, 9, 10)
Use read-heavy, reversible customer-facing capabilities as the first full production migration pattern.
- Build a catalogue read service fed from monolith-owned data through controlled replication and events. Keep content and product command ownership in the monolith initially.
- Build an independently operated search service with incremental indexing, aliases, blue/green indexes, locale-aware analysis, cache controls, and rapid fallback to the existing Lucene index.
- Shadow-compare product content, availability display, localization, ranking, facets, price display version, zero-result rate, latency, and conversion against the legacy path.
- Progress through employee traffic, low-risk cohorts, country-by-country rollout, and percentage expansion. Maintain the legacy route and warm index through at least one peak period after full traffic migration.
- Do not make search authoritative for stock or price. It consumes explicitly versioned read models from their command owners.
12. Modernise warehouse integration and inventory availability reads (depends on: 4, 8, 9, 10)
Separate warehouse file handling and customer availability reads without prematurely moving stock reservation ownership.
- Build a warehouse adapter that validates, journals, deduplicates, acknowledges, and replays current inbound and outbound file exchanges without requiring warehouse-side change.
- Publish inventory changes and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state, and route operational exceptions to trained teams.
- Move storefront and search availability reads progressively. Retain monolith reservation, allocation, and warehouse-export authority until checkout transition design is proven.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
13. Contain pricing and promotions through archaeology and a façade (depends on: 2, 7, 8, 9, 10)
Treat pricing as a behaviour-preservation programme before it becomes a service extraction programme.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs for all price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces and build a golden-master corpus across countries, currencies, dates, customer segments, baskets, stacking, tax, inventory conditions, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Build a candidate evaluator only for understood slices, shadow-compare exact amount, currency, tax, explanation, eligibility, and latency, and require business sign-off for every accepted difference.
14. Extract customer, consent, and bounded loyalty capabilities (depends on: 8, 9, 10)
Move identity-adjacent capabilities in carefully bounded slices, starting with reads and avoiding inconsistent account state.
- Define canonical customer identity, authentication/session compatibility, consent, retention, subject access, deletion, address, and access-control rules.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent service command path only after daily reconciliation is clean.
- Represent loyalty accrual and redemption as an auditable ledger. Migrate balance inquiry before financial-impacting redemption or accrual.
- Retain compatibility adapters for monolith and legacy back-office functions. Support web and mobile clients without forced logout or password reset.
- Reconcile customer records, consent, addresses, and loyalty balances daily. Keep a staffed exception process and explicit data-subject request procedures during transition.
15. Extract order views and bounded post-order workflows (depends on: 8, 9, 10, 12, 14)
Create order-domain value without splitting the revenue-critical order-creation transaction too early.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order query service for customer self-service, support, notifications, and selected back-office reads. Display freshness and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Keep order creation, cancellation, payment capture coordination, financial refund authority, and warehouse order export under the current owner until checkout cutover gates are passed.
16. Introduce payment-provider adapters and financial reconciliation (depends on: 8, 9, 10, 15)
Isolate provider-specific complexity before changing checkout orchestration or payment ownership.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
17. Move proven pricing slices and prepare cart and checkout façades (depends on: 11, 12, 13, 14, 15, 16)
Use pricing parity evidence to move only safe rule slices, then establish compatible façades for cart and checkout.
- Run the candidate pricing service in shadow for all applicable quotes. Investigate every mismatch and quantify financial impact before any live traffic.
- Migrate rules by bounded slice, country, and promotion type. Keep a per-slice route-back switch to the legacy engine and retain legacy execution through at least the next relevant sale period.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry rules.
- Introduce cart and checkout façades that initially delegate to legacy commands. This creates a stable integration seam without changing transaction authority.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and customer-support procedures for ambiguous payment, stock, and order outcomes.
18. Progressively migrate cart and checkout orchestration (depends on: 4, 9, 12, 16, 17)
Transfer only the proven portions of the transactional path, country and payment method by country and payment method, with the legacy path retained as a compatible recovery route.
- Start with cart reads and writes, using one command owner at each stage and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
19. Transfer data ownership one entity group at a time (depends on: 8, 11, 12, 14, 15, 17, 18)
Perform write cutovers as controlled state transitions, not as a one-time database split.
- For each entity group, document source of truth, writers, readers, stored procedures, consumers, migration checkpoint, backfill method, replication direction, retention requirements, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums and resumable batches. Validate dual reads before changing a command route, then transfer one writer path through a compatible API or adapter.
- Stop traffic expansion automatically if reconciliation thresholds are breached. Financial discrepancies require immediate investigation and no unresolved discrepancy is accepted.
- Retain legacy read access, compatibility APIs, and replay capability for an agreed observation period. Do not delete data, tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates and outside sales windows.
20. Migrate back-office workflows incrementally (depends on: 11, 12, 14, 15, 19)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
21. Certify hybrid peak readiness and rehearse reversions (depends on: 4, 5, 9, 11, 12, 16, 18)
Certify the actual mixed estate before each January and July peak. Every fallback must handle the traffic it may receive after a rollback.
- Load, soak, spike, and failover test at least 12x observed normal demand plus agreed headroom across gateway, CDN/cache, monolith, databases, services, search, event platform, warehouse adapter, and payment adapters.
- Test reversion of each live route to the monolith or compatible predecessor at full expected load. Confirm capacity reservations, cache warming, database connection limits, autoscaling limits, and provider rate limits.
- Run game days for service loss, database failover, event delay or duplication, cache failure, search fallback, warehouse-file delay, payment-provider outage, and flag or route rollback.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, contacts, communications, dashboards, and business exception queues.
- Require written sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering each protection window.
22. Consolidate proven services and hand over sustainable operations (depends on: 19, 20, 21)
Complete the year by removing only obsolete paths and establishing durable ownership. Retain legacy components where their removal would weaken safety.
- Confirm each independently deployable service has a named team, on-call coverage, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, and tested rollback or recovery route.
- Retire temporary replication, legacy endpoints, stored procedures, batch jobs, tables, and flags only after all consumers have moved, reconciliations are clean, and the agreed rollback-retention period has passed.
- Measure residual monolith coupling, direct database access, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Archive required legacy data for audit and GDPR obligations. Keep a documented compatibility and read-only access strategy where business or regulatory retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith because its safety gates were not met within the year.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributed to migration work in the 12 months.
- Every production step has a rehearsed rollback that restores the previous path in minutes without breaking payments, orders or stock integrity.
- January and July sales complete at or above pre-migration peak availability, conversion, payment approval and order throughput, including 12x headroom plus agreed reserve.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- Search, catalogue reads, inventory availability, customer/loyalty slices, order query/returns slices, pricing façade (and any proven rule slices), and checkout/payment façade are independently deployable with owners, SLOs, dashboards and on-call.
- Dual-run mismatch on price and stock is below the agreed threshold before each traffic shift, with a target of zero unresolved differences on money paths.
- For each migrated entity group, unresolved record discrepancies stay under 0.01% and unresolved financial discrepancies stay at zero at cutover completion.
- No new cross-context joins. Extracted domains make zero stored-procedure calls after ownership transfer. No service writes another service’s database.
- Mean time to revert a bad service release is under 10 minutes via flags or routing. Critical journey detect time is under 5 minutes.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid until the warehouse side can change.
- Deployment frequency for extracted services reaches at least weekly, with no mandatory 30-minute maintenance window for routine compatible releases.
Steps (23):
1. Charter, peak calendar and non-negotiables
Write a short **migration charter** that product, ops, finance, warehouse, payments and all five teams sign. Feature work never stops. Only production risk is constrained.
- Name one accountable programme lead, a chief architect, and a weekly steering forum with a recorded risk register.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Require a rehearsed rollback for every production step, with named rollback authority.
- Publish the 12-month calendar in week one. Protect January and July with a freeze on first-time cutovers, schema splits, payment changes and traffic experiments for four weeks before each sale and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Ops has veto on search, stock, checkout and payments.
2. Baseline the live system and business invariants (depends on: 1)
Measure the current estate before changing it. The baseline is the capacity, correctness and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks and batch jobs onto modules, the 350 tables, stored procedures and external systems.
- Record p50/p95/p99, error rates, conversion, payment approval, Lucene rebuild time, 15-minute inventory lag and 12x peak headroom.
- Classify tables and procedures by writer, readers, sensitivity, retention and cross-module coupling.
- Capture invariants: stock reservation, price and tax, promotion stacking, payment-to-order match, refunds, loyalty and GDPR deletion.
- Produce a coupling heat map and an extraction scorecard. Keep a production-like anonymised dataset for repeatable tests.
3. Target architecture and honest 12-month scope (depends on: 2)
Agree a pragmatic target. Independently deployable services are the goal. Full monolith retirement is not a 12-month promise.
- Bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office.
- One system of record per entity. Consumers may replicate data. They must not write another service’s database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- 12-month done means named services can deploy alone, with SLOs and rollback. Pricing engine, checkout write path and core OMS may still delegate to the monolith if parity is not proven.
4. Team model that keeps features flowing (depends on: 1, 3)
Keep five domain teams. Stop treating the repository as one ownership blob. Migration is a percentage of each sprint, not a freeze.
- Reserve capacity per team: about 50% business delivery, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Assign one future service owner per team plus a thin platform pair for gateway, flags, events, CI and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Product still plans features. New behaviour ships behind flags so deploy is decoupled from release.
5. Observability and error budgets on the monolith (depends on: 2)
Instrument the monolith as if it were already many services. You cannot extract what you cannot see.
- Add structured logs, RED metrics, distributed tracing and correlation IDs across web, mobile and back-office calls.
- Define SLOs for search, PDP, cart, checkout, payments, order create, warehouse export and back-office.
- Page on **error-budget burn** and business failures, not only on CPU.
- Build side-by-side dashboards for monolith versus candidate service on every cutover.
- Add immutable audit events for price changes, payments, stock adjustments and admin actions.
6. Flags, CI and progressive delivery paved road (depends on: 3, 4)
Give every team a safe way to ship without the 30-minute maintenance window. New work deploys behind flags. Old work stays on the two-week train until extracted.
- Standard service template: health, readiness, graceful shutdown, telemetry, auth, config, migrations and outbox.
- Feature flags, weighted routing, country/cohort targeting and instant revert at the edge.
- CI with contract, characterisation and smoke tests, image scanning and automated rollback on SLO breach.
- Preview environments that replay production-like traffic. Secrets, identities and GDPR controls are central.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need a maintenance window.
7. Safety net: journeys, contracts and 12x load (depends on: 2, 5, 6)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty and back-office.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile app release to extract a backend.
- Capture characterisation tests around stored procedures and pricing before moving them.
- Automate load, soak, spike and failover tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
8. Modularise the monolith in place (depends on: 3, 7)
Create seams before you create processes. New features may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time architecture tests.
- Replace in-process calls at boundaries with interfaces. Branch by abstraction.
- Wrap pricing, checkout and inventory access behind facades even while they still run in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Raise regression coverage on any module before it is touched.
9. Strangler edge with instant traffic rollback (depends on: 5, 6, 7)
Put a reverse proxy in front of every public and mobile endpoint. Clients keep the same URLs. You choose monolith or service per route and percentage.
- Preserve headers, sessions, cookies, the four languages, three currencies and eight countries.
- Route by path, country, cohort, flag and percentage. Default remains the monolith.
- Shadow traffic before any live percentage. Measure equivalence and gateway latency overhead first.
- Rollback is a **route change**, not a redeploy, and must complete in minutes including in-flight requests.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
10. Events, outbox, CDC and reconciliation spine (depends on: 5, 8)
Give the monolith a reversible integration spine. Services subscribe to facts. They do not call each other’s databases.
- Transactional outbox in the same Postgres transaction as business writes. CDC only where an outbox cannot yet be added, with a time-bound replacement plan.
- Versioned events for product, price, stock, customer, order and return. Schema registry, idempotent consumers, dead letters and replay.
- A reconciliation product: counts, hashes, money totals, stock totals, lag and exception queues.
- Entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
11. Extract search as the first service (depends on: 9, 10)
Replace the nightly Lucene rebuild with an independently deployed search service. This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases and blue/green indexes.
- Shadow queries against current Lucene until precision, recall, facets, zero-results and latency match.
- Shift traffic 1% → country cohort → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as standby. Search must not become authoritative for price or stock.
12. Extract catalogue read models (depends on: 11)
Serve product, media and localisation from a catalogue service. Writes can stay in the monolith until merchandising has a new path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Cut storefront and mobile read traffic via the strangler after shadow comparison.
- Cache with explicit stale limits and a bypass control. Do not move authoring tools until reads are boring.
13. Inventory adapter and availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability. Keep the warehouse contract unchanged.
- Adapter validates, deduplicates and acknowledges inbound and outbound files. Publish inventory-change events from that adapter.
- Availability read model for storefront and search, with freshness targets and oversell tolerance made explicit.
- Shadow-compare every SKU and warehouse against the monolith. Reconcile before any traffic shift.
- Leave reservation and allocation authority in the monolith until order ownership is designed.
- Immediate fallback to monolith availability and a replayable file-recovery path. Prove no extra oversell versus today’s 15-minute lag before a sale.
14. Customer, session and loyalty with GDPR (depends on: 9, 10)
Move identity-adjacent data only after consent, retention and deletion are clear. Avoid inconsistent account state across countries and channels.
- Start with a replicated profile read service. Then migrate bounded profile writes through a façade with idempotency and audit.
- Migrate sessions without forced logouts. Web and mobile keep current cookies or tokens during the switch.
- Loyalty in slices: balance inquiry before accrual or redemption, with a ledger and daily reconciliation.
- Subject-access and deletion must work in both systems. Rollback restores monolith auth with no password resets.
15. Pricing archaeology, golden masters and façade (depends on: 2, 7, 8)
Do not rewrite the 200,000-line pricing module from tribal knowledge. Tests become the spec.
- Cross-functional squad: engineers, merchandising, finance, country ops and QA.
- Inventory rules, stored procedures, config tables, overrides, jobs and manual back-office actions.
- Capture production decision traces for eight countries and three currencies into a privacy-safe golden-master corpus.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
16. Dual-run only proven pricing slices (depends on: 10, 12, 15)
Run a candidate pricing service in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood rule slices. Compare exact price, tax, discount, explanation and latency.
- Alert on any mismatch. Require business sign-off and financial-impact classification before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Order query, notifications and returns slices (depends on: 10, 14)
Create independently deployable order value without splitting the transactional checkout path yet.
- Publish reliable order lifecycle events from the monolith outbox.
- Order query service for self-service, customer service and selected back-office views, with freshness labels and monolith fallback.
- Extract bounded workflows such as notifications, return initiation and return-status tracking where ownership is explicit.
- Preserve order creation, capture, cancel, refund authority and warehouse export in the monolith until S20.
- Reconcile counts, states, refunds, returns and event lag continuously.
18. Checkout façade and payment adapters (depends on: 12, 13, 16, 17)
Strangle checkout without rewriting the three payment providers. A thin orchestration layer talks to existing integrations first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks and checkout idempotency keys.
- Checkout façade initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Isolate each provider behind versioned adapters: tokens, webhook verification, idempotent auth/capture, retries, ledger and settlement reconciliation.
- Canary by country and payment method. In-flight payments complete on the old path if you roll back.
- Do not split final order-creation until failure modes, compensation, support procedures and 12x tests show acceptable risk.
19. Independent pipelines after the first service is real (depends on: 6, 11)
When a service is independently releasable, stop bundling it into the fortnightly artefact. The remaining monolith keeps the old train until it is small.
- One pipeline per service: test, canary, promote, revert. Contract tests gate consumer and provider deploys.
- Split repos only after module walls and CI already work in the monorepo.
- Target at least weekly independent releases, then daily where risk is low.
- Each service has named owners, on-call, runbooks, SLOs and a practised rollback.
20. Single-writer ownership cutovers (depends on: 10, 11, 12, 13, 14, 16, 17, 18)
Move write ownership one entity group at a time after read parity and operations are boring. Each cutover is a reversible state transition, not a one-time database move.
- Document source of truth, writer sequence, replication direction, consumers, retention, reconciliation and rollback point.
- Backfill with checksums. Dual-read validate. Then switch the single writer. Avoid unrestricted dual-writes.
- Halt traffic expansion automatically on reconciliation or SLO thresholds.
- Schedule high-risk ownership moves outside sales protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
21. First peak-season certification (depends on: 7, 9, 11, 13)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing ratio at least 12x observed baseline plus headroom, including gateway, caches, monolith, services, events, search, payments and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Game days: provider timeout, CDC lag, flag revert, search fallback, stock file delay.
- Formal go/no-go from engineering, ops, commerce, finance, warehouse and support.
22. Second peak-season certification (depends on: 16, 18, 21)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Confirm price-parity, payment approval, order throughput and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits and staff a war room.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
23. Shrink the monolith and hand over governance (depends on: 19, 20, 22)
Remove only proven-obsolete paths. Retain legacy where removal creates unjustified commercial risk.
- Decommission endpoints, jobs, Lucene, tables and procedures only after consumer inventory, archival, reconciliation and rollback-retention periods.
- Measure residual coupling, direct DB access and operational toil. Fund leftover pricing, checkout or OMS decomposition as a follow-on roadmap.
- Quarterly architecture review, API and event lifecycle, service scorecards and DR exercises.
- End state of this year: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme, and a smaller but still honest monolith if that is what risk demanded.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales complete with at least pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x normal load.
- The hybrid platform sustains 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- At least eight core capabilities are independently deployable by month 12: catalogue/search, inventory, customer/loyalty, pricing, cart/checkout, payments, orders, and returns.
- Deployment frequency reaches at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- Test coverage on changed code reaches at least 80%, and critical checkout, payment, pricing, stock, refund, and search scenarios have 100% contract and parity coverage.
- Pricing and promotion parity for any migrated rule slice is at least 99.99% against the golden-master corpus, with all remaining differences explicitly approved by business owners.
- Reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial or stock discrepancies at each cutover.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (23):
1. Migration charter, governance, and peak calendar
Set up a migration programme that protects revenue, peak periods, and ongoing feature delivery. Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives, plus one accountable programme lead and chief architect.
- Publish a 12-month calendar with a six-week engineering blackout before and two weeks after the January and July sales for first-time cutovers, schema splits, payment changes, or major traffic experiments.
- Allocate team capacity: 50% business delivery, 30% migration work, and 20% quality and operational hardening, rebalanced only through the steering group.
- Define non-negotiables: no feature freeze, no big-bang rewrites, no unrehearsed rollback, and one tested rollback for every production step.
- Set decision rights, risk register, stop/go criteria, rollback authority, and weekly cadence.
2. Baseline architecture, data, traffic, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before changing it. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, Lucene rebuild duration, warehouse file lag, payment approval rates, and recovery time.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty, and country tax rules.
- Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target architecture and migration sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not redesign every business process or split every table.
- Define bounded contexts: storefront edge, catalogue/search, pricing/promotions, cart, checkout/payments, orders, inventory, customer/loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity; services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency, correlation IDs, and error-handling conventions.
- Select the strangler pattern: the monolith remains source of truth until ownership is deliberately transferred, and new services are introduced behind stable interfaces.
- Sequence extraction by risk and coupling: read-heavy and low-coupling seams before the first sale; pricing and checkout only after strong dual-run and reconciliation evidence.
4. Establish observability, SLOs, and synthetic monitoring (depends on: 2)
Make every current and future component observable, operable, and auditable before material traffic moves.
- Add structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs to both the monolith and new services.
- Define SLOs per critical journey: storefront, search, product page, cart, checkout, payment, order, inventory, and back-office.
- Alert on error-budget burn and business failures as well as infrastructure failures, with severity, ownership, and escalation paths.
- Build dashboards that show monolith and new service side by side for every cutover.
- Implement immutable audit events for pricing, promotions, payments, order state, stock adjustments, and administrative actions.
5. Build progressive delivery platform and CI/CD (depends on: 1, 4)
Provide a paved road for independently deployable services and reduce deployment risk.
- Build per-service CI/CD pipelines with build provenance, dependency and container scanning, unit/integration/contract/smoke tests, environment promotion, and approval controls for high-risk releases.
- Introduce a feature flag platform with per-user, per-country, per-percentage, and per-header routing, plus dark launch and instant kill switches.
- Implement canary and blue-green deployments with automated rollback when SLOs or error budgets are breached.
- Provision Kubernetes or managed runtime with namespaces, autoscaling, resource quotas, mTLS, and infrastructure as code.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. API gateway and strangler façade (depends on: 3, 4, 5)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients use stable, versioned interfaces.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic; default route remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Enable shadow traffic mirroring to new services while the monolith remains source of truth.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
7. Event backbone, outbox, and CDC (depends on: 3, 4, 5)
Create a reversible integration spine so services can communicate without direct database access.
- Deploy Kafka or equivalent with topics per bounded context and a schema registry for versioned events.
- Implement transactional outbox publishing in the monolith and each service; events are committed with source data and delivered asynchronously with deduplication.
- Use Debezium CDC only where an outbox cannot initially be added, with a time-bound plan to replace it.
- Standardise idempotent consumers, dead-letter queues, replay procedures, and consumer ownership.
- Validate that the backbone can sustain 12x peak event volume with headroom.
8. Data transition and reconciliation playbook (depends on: 7)
Treat every data move as a campaign with an abort switch. The 1.2 TB PostgreSQL database stays system of record until a service proves otherwise.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned, and legacy-retired.
- Use expand-contract schemas, backfills with checksums, dual writes with a single command owner, and CDC replication.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions; define thresholds that automatically halt traffic expansion.
- Rehearse rollback: stop writes to the new store, re-point reads to the original PostgreSQL, and verify no data loss or duplicate operations.
- Retain legacy read access and compatibility APIs until all consumers are migrated and observation periods have passed.
9. Modularize monolith and enforce seams (depends on: 3, 4)
Create seams inside the monolith before creating separate processes.
- Introduce package boundaries and architecture tests with ArchUnit; enforce code ownership and mandatory review for cross-module changes.
- Ban new cross-module joins and new stored-procedure coupling; route access through repository or application interfaces.
- Wrap high-risk pricing and checkout internals behind interfaces to prepare for extraction.
- Use expand-contract database migrations for shared tables; additive, backward-compatible changes deploy first.
- Add feature flags around all new monolith-to-service integrations.
10. Strengthen automated testing and contract tests (depends on: 4, 5)
Raise confidence in behaviour without freezing features, focusing on the seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Record golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate them as end-to-end regression tests.
- Add consumer-driven contract tests between monolith and new services.
- Enforce at least 80% coverage on changed code, with mutation testing on pricing and checkout paths.
- Add performance regression gates to CI/CD.
11. Build production-like staging and load test harness (depends on: 4, 5, 10)
Create a production-like test environment and load profiles for continuous validation.
- Provision staging with anonymized production-scale data and simulators for payment providers, warehouse files, and external services.
- Build repeatable fixtures for countries, currencies, languages, tax, promotions, and product catalogues.
- Define load profiles: baseline 40k orders/day and 12x peak 480k orders/day, including promo-heavy and mobile scenarios.
- Run chaos tests that kill pods, add latency, drop messages, and simulate provider outages.
- Use this environment for every pre-cutover and pre-peak gate.
12. Extract catalogue and search read service (depends on: 6, 7, 8, 9, 10, 11)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, and blue/green indexes.
- Run catalogue and search in shadow mode; compare product availability, locale content, ranking, facets, and latency against current behaviour.
- Shift traffic gradually by country and cohort, keeping the monolith/Lucene route live until parity and peak tests pass.
- Keep the old Lucene index warm as a cold standby through the next sale.
13. Extract customer accounts and loyalty service (depends on: 6, 7, 8, 9, 10, 11, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear.
- Define canonical customer identifier, consent/GDPR model, data-retention rules, subject-access and deletion workflows, and access control.
- Build a customer service owning profile, authentication, and loyalty data; expose REST/gRPC APIs behind the gateway.
- Start with replicated profile reads, then migrate bounded writes through a façade with idempotency and audit trails.
- Reconcile customer records, consent states, and loyalty balances daily during migration; route exceptions to trained operations staff.
- Rollback restores monolith authentication without password resets or forced logouts.
14. Extract inventory read model and warehouse adapter (depends on: 6, 7, 8, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and warehouse correctness.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound/outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Shadow-compare new availability results with the monolith for all products and warehouses; reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide immediate fallback to monolith availability reads and a replayable file-processing recovery process.
15. Pricing and promotions discovery and golden-master harness (depends on: 2, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite.
- Form a dedicated squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, manual actions, campaigns, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares new candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
16. Extract pricing and promotions service behind façade (depends on: 15, 6, 7, 8, 11, 12, 14, 20)
Rebuild pricing and promotions only through verified, bounded slices behind the façade.
- Build a pricing service with a rules engine or versioned configuration; encode the documented rule set as configuration, not hardcoded strings.
- Implement country-specific rules slice by slice; run shadow evaluation against both the golden corpus and live production requests.
- Promote a slice only after 100% parity on sampled and historical scenarios for at least two full weeks, including a weekend.
- Shift live traffic by country and promotion type, keeping the monolith engine deployable as rollback through the next two sales.
- Require financial-impact analysis and business sign-off for each activated slice.
17. Extract cart, checkout, and payment orchestration (depends on: 16, 13, 14, 6, 7, 8, 11, 20)
Prepare the revenue-critical transactional path through façade-first migration, provider adapters, and progressive traffic control.
- Define cart identity, guest/account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith; route web/mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retry policy, reconciliation, and fallback behaviour.
- Shadow-run checkout orchestration and payment-adapter decisions; use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
18. Extract order management and post-order workflows (depends on: 17, 7, 8, 14)
Move post-purchase order state once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office views; validate against monolith order history.
- Extract bounded post-order workflows such as notifications, return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith authority for order creation, payment capture coordination, cancellation, refund, and warehouse order export until their transition design is approved.
- Reconcile order counts, states, refunds, returns, notification delivery, and event lag continuously.
19. Extract returns and back-office services (depends on: 18, 13, 16, 6, 8)
Move returns and selected back-office capabilities after order and customer services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status; integrate with order, inventory, and payment services via APIs and events.
- Migrate returns business rules country-by-country with dual-run comparison.
- Build a back-office BFF or modular UI per domain for the 300 staff; route functions incrementally and keep legacy screens one click away.
- Train staff per screen group, run parallel operation for at least four weeks, and decommission legacy screens only after stable operation.
- Rollback re-routes returns and back-office screens to monolith paths.
20. Pre-January peak readiness and freeze (depends on: 1, 4, 5, 11, 12, 13, 14, 15)
Protect the January sale by freezing risky cutovers and proving the hybrid platform can sustain peak load.
- Enforce the six-week engineering blackout before January: no first-time domain cutovers, schema splits, payment changes, or major traffic experiments.
- Run a full 12x load test of the hybrid path, including gateway, monolith, live services, caches, databases, search, payment adapters, and warehouse integration.
- Rehearse traffic reversion from each service to the monolith and confirm the monolith and legacy search can absorb reverted load.
- Pre-scale infrastructure at least 30% above expected peak; staff war rooms, confirm runbooks, and conduct an incident command exercise.
- Hold a go/no-go review with engineering, operations, commerce, finance, warehouse, and support.
21. Pre-July peak readiness and freeze (depends on: 20, 16, 17, 18, 19)
Protect the July sale after more services are live by repeating and extending the capacity certification.
- Enforce the same six-week blackout before July.
- Load-test the full hybrid path at 12x with pricing, checkout, order, inventory, customer, returns, and back-office services live.
- Rehearse rollback for cart, checkout, payment, order, returns, pricing, inventory, and search; confirm fallback paths absorb full reverted load.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- Obtain formal peak-readiness sign-off from all stakeholders.
22. Final ownership cutovers and monolith decommission (depends on: 21, 18, 19)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity.
- Verify zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform final reconciliation: row counts, checksums, financial totals, stock totals, and business state comparisons.
- Remove dual-write/CDC/compatibility adapters and feature flags in controlled releases.
- Archive the monolith codebase and database with read-only audit access for 12 months.
- Decommission monolith infrastructure; update runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
23. Continuous improvement and service governance (depends on: 22)
Make service ownership sustainable and continuously improve the new architecture.
- Conduct quarterly architecture reviews, API and event lifecycle governance, and service scorecards.
- Measure residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Review post-migration business outcomes, incident history, lead time, cost, and peak performance; tune autoscaling and caching.
- Prioritize remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback or recovery procedures.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (≈ 480,000 orders/day).
- At least 8 core business capabilities (catalogue, search, pricing, inventory, cart, checkout/payments, orders, customers/loyalty, returns) are deployed as independently deployable services with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01 % unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99 % against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80 % of the agreed baseline; no programme-wide feature freeze.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Monolith codebase reduced by at least 60 %; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities.
- Peak-load capacity sustained at 12x normal traffic with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy ≥ 99.9 % at all points during the migration; zero oversell incidents attributable to migration changes.
Steps (22):
1. Establish Migration Governance, Peak Protection Calendar, and Team Operating Model
Create the **organisational scaffolding** that protects revenue, prevents coordination failures, and keeps feature delivery alive. One accountable programme lead, one chief architect, and named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives; meet weekly.
- Publish a 12-month calendar with hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after January and July sales.
- Reserve team capacity: 50 % business features, 30 % migration, 20 % quality and operational debt. Rebalance only through the steering committee.
- Define stop/go criteria for every production cutover, a formal rollback authority, and an escalation path.
- Keep five domain teams; assign each a bounded context to own. A shared platform guild (2–3 senior engineers) owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline; feature flags decouple code deployment from customer release.
2. Baseline Architecture, Data Model, Traffic, and Operational Risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 user journeys and map them to modules, tables, stored procedures, queues, and external dependencies.
- Record p50 / p95 / p99 latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling.
- Identify critical business invariants: stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define Target Service Architecture, Domain Boundaries, and Migration Sequence (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process.
- Define bounded contexts: edge / storefront experience, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, back-office workflow.
- Assign a single system of record and owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
- Choose an incremental strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Define the extraction sequence: read-heavy and already-async seams first (search, catalogue, inventory file sync); pricing and checkout delayed until dual-run and reconciliation exist.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
4. Build Observability, SLOs, and Production Safety Foundations (depends on: 1, 3)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation. Alert on business failures as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Create a shared operations readiness review required before any service receives production traffic.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
5. Build Delivery Platform: CI/CD, Feature Flags, Progressive Delivery, and Kubernetes (depends on: 3, 4)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD (GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform (Unleash, LaunchDarkly, or Flagsmith) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade Kubernetes cluster with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Set up a container image registry with retention policies and security scanning.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Target: reduce the two-week release cycle to daily deployable per service by end of this step.
6. Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback.
- Deploy an API gateway or service mesh (Kong, Envoy via Istio, or cloud-native equivalent) in front of the existing load balancer.
- Route by path, tenant / country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Implement an Anti-Corruption Layer that translates between the monolith's internal models and new service APIs.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
7. Stabilise and Modularise the Monolith In Place (depends on: 2, 4, 5)
The monolith remains a **production dependency** for most of the programme. Stabilise it and create internal seams before extracting.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests.
- Ban new features from reaching into another team's tables or adding cross-module joins.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
8. Build Event Backbone, Outbox, CDC, and Data-Transition Patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: catalogue-events, order-events, inventory-events, pricing-events, customer-events.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium → Kafka Connect) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
9. Build Inter-Service Communication Framework and Resilience Patterns (depends on: 5, 8)
Establish **libraries and standards** for how services talk to each other synchronously and asynchronously, with resilience against cascading failures.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing / consuming with idempotency and dead-letter handling.
- Document timeout and retry policies to prevent cascading failures.
- Install circuit breaker library (Resilience4j) in each service; define circuit breaker policies per dependency.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfilment delay.
- Set timeouts on all cross-service calls with bulkhead pattern to prevent resource exhaustion.
- Provide templates and SDKs to development teams so they do not reimplement these patterns.
- Test with chaos toolkit: kill pods, add latency, inject network partitions, and verify fallbacks work.
10. Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams (depends on: 2, 4, 5, 8)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60 % on touched paths, 80 % on changed code).
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
11. Extract Catalogue Read API and Modern Search Service (Wave 1) (depends on: 6, 8, 9, 10)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Build country and language-specific read models for eight markets. Keep one product identity so pricing, stock, and search stay aligned.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort (1 % → 10 % → 50 % → 100 %). Keep the monolith catalogue / search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
12. Extract Customer Accounts, Identity, and Loyalty Service (Wave 1) (depends on: 6, 8, 9, 10)
Move customer-facing identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer-service owning customer, address, and loyalty data; expose REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 %. The monolith continues as fallback; a single flag flip routes 100 % back.
- This extraction serves as the reference implementation for all subsequent waves.
13. Modernise Inventory Integration and Extract Availability Service (Wave 2) (depends on: 6, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Build an inventory-service owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes inventory-updated events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Prove no extra oversell versus today's 15-minute lag before a sale.
14. Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness (depends on: 2, 7, 8, 10)
Do not extract the **200 K-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Classify rules into universal, country-specific, and campaign / temporary.
- Define the target architecture: a pricing-service with a rules engine externalised from application code.
- Build a harness that replays promotions, baskets, and edge SKUs. Freeze behavioural snapshots; new promo features implement twice until cutover.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
15. Extract Pricing and Promotions Service Behind Dual-Run Comparison (Wave 4) (depends on: 11, 13, 14)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven.
- Build a pricing-service with a pluggable rules engine; encode the rule catalogue from S14 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart / checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
- Implement event-driven pricing and cart synchronisation: publish events when promotions are created / updated / ended; cart service subscribes and recalculates totals.
16. Extract Cart, Checkout, and Payment Orchestration Service (Wave 5) (depends on: 12, 13, 15)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. A thin orchestration service talks to existing provider integrations first.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout-service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Canary by country and by payment method. Rollback is route-plus-flag; in-flight payments complete on the old path.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Extract Order Management, Returns, and Post-Order Workflows (Wave 6) (depends on: 16)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Publish reliable order lifecycle events from the monolith / checkout using the outbox pattern.
- Build an order-service consuming order-placed events; it owns order state machine, fulfilment tracking, and returns workflow.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Backfill historical orders into the service and run reconciliation.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
18. Extract Back-Office Capabilities and Storefront Modernisation (Wave 7) (depends on: 17)
Deliver a **modern back-office** for the 300 staff users and update the customer-facing storefront to consume the new service layer.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Train staff per screen group; keep old screens until the new ones match.
- Rollback: gateway routes storefront and back-office traffic back to the monolith rendering path.
19. Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures (depends on: 11, 12, 13, 15, 16, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
20. Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing (depends on: 6, 10, 11, 12, 13, 15, 16, 17, 19)
Move production traffic only through **measured, reversible increments**. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1 %, 5 %, 25 %, 50 %, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
- Mean time to revert a bad service release must be under 10 minutes via flags or routing.
21. Peak-Season Resilience Certification and Capacity Validation (depends on: 5, 10, 11, 13, 15, 16, 20)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before each peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Monolith Decommission, Final Data Migration, and Steady-State Governance (depends on: 19, 20, 21)
Retire the legacy monolith only after all traffic is served by the new services. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Step-level differences computed by the tool:
Proposal 1 vs the previous-round proposal it resembles most (claudeHaiku4.5_refine_1): 14 steps kept, added ['Build observability, SLOs and error-budget infrastructure', 'Strengthen testing: characterisation, contracts, and 12x load validation', 'Parallel workstream: price and promotion archaeology and golden-master corpus', 'Modernise warehouse integration without changing warehouse contract', 'Wave 2: Extract inventory availability reads and reservation logic', 'Peak readiness gate 1: certify hybrid estate before first peak (January or July)', 'Migrate back-office and refactor storefront to consume service layer', 'Transfer data ownership one entity at a time through reversible cutovers', 'Execute progressive traffic migration with measured increments and automated rollback'], removed ['Establish observability: structured logs, metrics, tracing, and SLOs', 'Strengthen tests and establish contract-testing foundation', 'Discover, document, and freeze pricing and promotions rules (parallel workstream)', 'Modernise warehouse integration: adapter for existing file exchange', 'Wave 1: Extract search service (read-only, nightly-batch replacement)', 'Peak readiness gate 1: before January/July peak (if in window)', 'Wave 2: Extract inventory service with warehouse adapter', 'Extract back-office and modernise staff portal (300 users, 8 countries)', 'Final peak readiness validation and chaos engineering']
Proposal 2 vs the previous-round proposal it resembles most (gpt-5.6-terra_refine_2): 13 steps kept, added ['Baseline behaviour, dependencies, data, and invariants', 'Build the delivery, security, and progressive-release paved road', 'Create test, contract, and capacity evidence', 'Modularise the monolith and create stable seams', 'Run pricing archaeology and establish the legacy pricing façade', 'Deliver order views, notifications, and bounded returns', 'Move only proven pricing rule slices', 'Introduce cart and checkout façades, then migrate safe orchestration'], removed ['Establish the factual baseline and critical invariants', 'Create the peak calendar and release-control policy', 'Build the paved road for independently deployable services', 'Stabilise and modularise the live monolith', 'Build risk-weighted quality and capacity assurance', 'Contain pricing and promotions through archaeology and a façade', 'Extract order views and bounded post-order workflows', 'Move proven pricing slices and prepare cart and checkout façades', 'Progressively migrate cart and checkout orchestration']
Proposal 3 vs the previous-round proposal it resembles most (grok-4.6_refine_3): 8 steps kept, added ['Charter the programme around peaks, money, and rollback', 'Set honest year-one boundaries and non-goals', 'Keep five domain teams and a thin paved-road platform', 'Instrument the monolith and define journey SLOs', 'Build the behavioural safety net and 12x harness', 'Codify one extraction playbook every team must use', 'Start pricing archaeology and put a façade in front of the engine', 'Season 1: wrap warehouse files and extract availability reads', 'Certify the first peak on the real hybrid estate', 'Season 2: order-query slices and payment-provider adapters', 'Season 2: cart and checkout façades, then only proven orchestration', 'Certify the second peak and rehearse full-load reversion', 'Move back-office by workflow and transfer write ownership only where proven', 'Shrink residual coupling and hand over a durable operating model'], removed ['Charter, peak calendar and non-negotiables', 'Target architecture and honest 12-month scope', 'Team model that keeps features flowing', 'Observability and error budgets on the monolith', 'Flags, CI and progressive delivery paved road', 'Safety net: journeys, contracts and 12x load', 'Inventory adapter and availability reads', 'Pricing archaeology, golden masters and façade', 'Order query, notifications and returns slices', 'Checkout façade and payment adapters', 'Independent pipelines after the first service is real', 'Single-writer ownership cutovers', 'First peak-season certification', 'Second peak-season certification', 'Shrink the monolith and hand over governance']
Proposal 4 vs the previous-round proposal it resembles most (qwen3.8-max_refine_5): 12 steps kept, added ['Monolith modularization and test hardening', 'Strangler gateway and traffic routing', 'Extract search service', 'Build cart/checkout façade and payment provider adapters', 'Modernise back-office incrementally', 'Pre-peak readiness gate #1', 'Transfer data ownership one entity group at a time after the second peak', 'Pre-peak readiness gate #2', 'Retire obsolete paths and establish steady-state governance'], removed ['Deploy Strangler Gateway, Anti-Corruption Layer, and Instant Traffic Rollback', 'Stabilise and Modularise the Monolith In Place', 'Build Inter-Service Communication Framework and Resilience Patterns', 'Raise Test Coverage, Contract Tests, and Safety Net Before Cutting Seams', 'Extract Cart, Checkout, and Payment Orchestration Service (Wave 5)', 'Extract Back-Office Capabilities and Storefront Modernisation (Wave 7)', 'Transfer Data Ownership Through Controlled Cutovers and Retire Stored Procedures', 'Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing', 'Peak-Season Resilience Certification and Capacity Validation', 'Monolith Decommission, Final Data Migration, and Steady-State Governance']
Proposal 5 vs the previous-round proposal it resembles most (qwen3.8-max_refine_5): 19 steps kept, added ['Pricing archaeology, golden-master harness, and pricing façade', 'Extract order query, notifications, and returns slices (Wave 3)', 'Introduce payment-provider adapters and financial reconciliation (Wave 4)', 'Peak-season resilience certification and capacity validation (July)'], removed ['Build Inter-Service Communication Framework and Resilience Patterns', 'Deep Pricing Archaeology, Rule Documentation, and Dual-Run Harness', 'Execute Progressive Traffic Migration, Rollback Drills, and Chaos Testing']
Origin of the steps of the new proposals, matched by title by the tool (evidence for "taken"; ideas can also travel without a matching title):
Proposal 1: 12 of its 23 steps match its own previous version, 5 are new; steps 11, 21 resemble steps 12, 19 of proposal 2; steps 10, 17 resemble steps 15, 17 of proposal 4; steps 4, 18 resemble steps 4, 17 of proposal 5
Proposal 2: 13 of its 21 steps match its own previous version, 3 are new; steps 5, 14, 16 resemble steps 6, 17, 16 of proposal 3; steps 7, 17 resemble steps 9, 17 of proposal 4
Proposal 3: 8 of its 22 steps match its own previous version, 10 are new; steps 5, 14, 20 resemble steps 5, 12, 21 of proposal 2; step 19 resembles step 17 of proposal 4
Proposal 4: 11 of its 21 steps match its own previous version, 1 is new; steps 16, 21 resemble steps 20, 23 of proposal 1; steps 12, 17, 19 resemble steps 12, 20, 19 of proposal 2; steps 7, 15 resemble steps 9, 18 of proposal 3; steps 4, 5 resemble steps 4, 5 of proposal 5
Proposal 5: 19 of its 23 steps match its own previous version, 0 are new; steps 11, 16 resemble steps 12, 16 of proposal 2; steps 13, 15 resemble steps 15, 17 of proposal 3
PROPOSALS OF ROUND 2 (to assess):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Your answer has these parts:
- "round_summary": two or three sentences on how the round went as a whole.
- "converging": true if the proposals of this round are more similar to each other than those of the previous round, false otherwise.
- "proposals": one entry per proposal of round 2, each with:
- "proposal": its number,
- "assessment": "improved", "worsened", "mixed" or "unchanged" with respect to its previous version ("no_previous_version" if that agent produced nothing in the previous round),
- "what_changed": a concise account of how it improved or worsened and why (three or four sentences at most),
- "improvements": a list of concrete gains (specific steps, metrics, structure),
- "regressions": a list of concrete losses (dropped steps, vaguer metrics, broken dependencies...),
- "taken": the ideas this proposal visibly adopted from the OTHER proposals of round 1 (not from its own previous version): one entry per idea with "from_proposal" (the number of the proposal it came from), "steps" (the numbers of the steps of that proposal where the idea lives, as listed above; empty if it is not tied to specific steps), "what" (the idea, one sentence) and "why" (how it was used or adapted, one sentence),
- "rejected": the ideas of the OTHER proposals of round 1 that this proposal visibly declined: an explicit contradiction, or a prominent idea it saw and left out while taking the opposite approach. Same fields; "why" gives the evidence (what the proposal does instead). Do not list mere omissions without evidence; an empty list is a valid answer.
[ROUND 3]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
This is round 3, a refinement round: every agent received ALL the proposals of round 2 and wrote a new plan, improving on them or taking a different approach. By convention, the previous version of proposal N is proposal N of round 2, written by the same model.
PROPOSALS OF ROUND 2 (the previous versions):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- **Zero unplanned customer-facing downtime** attributed to migration work across all 12 months; all transitions performed via feature flags or route changes with ≤5-minute rollback.
- **Every production cutover has a rehearsed rollback** tested before execution; rollback restores previous path in ≤5 minutes and preserves financial, order, payment, and inventory integrity.
- **January and July sales complete with baseline or better availability, conversion rate, payment approval rate, and order throughput** at 12x normal load (≈480k orders/day) plus agreed headroom; zero capacity-related errors.
- **8+ independently deployable services** by month 12: catalogue, search, customer/loyalty, inventory, pricing façade (with proven slices), cart/checkout façade, orders, returns, each with named ownership, SLOs, dashboards, runbooks and on-call.
- **Deployment frequency increases from bi-weekly to ≥ daily per service**, with no mandatory monolith maintenance window for routine compatible releases.
- **Pricing and promotion parity ≥ 99.99%** against golden-master corpus for any traffic-receiving rule slice; all remaining differences explicitly approved by business owners.
- **Reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial discrepancies** at each cutover completion; inventory accuracy ≥ 99.9%.
- **All extracted services have zero direct writes to another service's database**; cross-service state propagation uses governed APIs or versioned events only.
- **Test coverage on all migrated code paths ≥ 80%**; contract tests exist for every inter-service boundary; critical pricing, checkout, payment, and stock paths have 100% parity and characterisation coverage.
- **Mean time to detect critical customer-journey failures < 5 minutes**; mean time to restore or roll back migration-related severity-one incidents < 15 minutes.
- **Feature delivery continues at ≥ 80% of agreed baseline throughput**; no programme-wide feature freeze; new capabilities ship behind flags decoupled from deployment.
- **Payment processing resilience: all three providers maintain ≥ 99.95% successful transaction rate** throughout migration; zero payment loss or duplication.
- **Back-office availability ≥ 99.9%** during business hours for 300 staff across all 8 countries; zero forced logouts or password resets during migration.
- **Monolith codebase reduced ≥ 60%**; remaining monolith owns no migrated data, executes no migrated stored procedures; no cross-service joins remain.
- **Peak-load capacity sustained at 12x during both January and July sales**; p99 checkout latency ≤ 1.2 s, p95 storefront latency ≤ 400 ms.
Steps (23):
1. Migration charter, governance and peak-protection freeze windows
Establish an accountable decision-making structure and lock down the non-negotiable constraints that protect revenue.
Appoint a programme lead, chief architect, and steering committee with engineering, product, operations, finance, warehouse, payments, and country representatives. Meet weekly.
Publish a 12-month calendar marking hard freeze windows: no first-time production cutovers, schema splits, payment changes, or major traffic experiments in the 6 weeks before each January and July sale, and 2 weeks after.
Define team capacity: 50% business delivery, 30% migration work, 20% quality and operational debt. Rebalance only through steering approval. Set decision rights, risk register, go/no-go criteria, and rollback authority. Feature work continues throughout—it ships behind flags, decoupled from deployment.
2. Baseline the live system: architecture, data, traffic and invariants (depends on: 1)
Measure the current estate before changing it. This baseline becomes the capacity, correctness, and rollback reference for every wave.
Trace the top 30 customer journeys (browse, price, cart, checkout, payment, order, return) through modules, tables, stored procedures, file exchanges, and external integrations across all 8 countries, 3 currencies, and 4 languages.
Record p50/p95/p99 latency, error rates, database load, Lucene rebuild time, 15-minute inventory sync lag, payment approval rates, and recovery times at normal and 12x peak load.
Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, and cross-module coupling. Document critical business invariants: stock reservation semantics, price and tax correctness, promotion eligibility, payment-to-order match, refunds, loyalty ledger, and country-specific GDPR obligations.
Capture production-like anonymised data and documented peak-load profiles for repeatable testing.
3. Define target bounded contexts, data ownership model, and extraction sequence (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts and clear ownership. Do not redesign every business process.
Define bounded contexts: storefront edge, catalogue, search, pricing & promotions, customer & loyalty, inventory, cart, checkout, payments, orders, returns, back-office.
Assign one system of record and owning team per business entity. Services may replicate data but must never directly write another service's database. Prohibit distributed transactions; use outbox, idempotent consumers, compensations, and reconciliation instead.
Sequence extraction by risk and coupling: read-heavy, already-async seams first (search, catalogue, inventory availability); pricing and checkout delayed until dual-run and reconciliation prove parity. Define per-wave entry criteria, exit criteria, and capacity allocation.
4. Build observability, SLOs and error-budget infrastructure (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions detected within minutes.
Deploy OpenTelemetry across all nodes; export traces, metrics, and structured logs to a central stack (Grafana + Prometheus or Datadog). Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s.
Build real-time dashboards with alerting on error-budget burn and business failures (price mismatches, payment/order lag, inventory discrepancies) not only CPU metrics. Implement synthetic transaction monitoring covering all countries, currencies and languages.
Create immutable audit events for pricing changes, payment attempts, order state, stock adjustments, and administrative actions. Establish an error-budget policy: any extraction step breaching its SLO is automatically rolled back.
5. Build CI/CD pipeline, feature flags, and progressive-delivery platform (depends on: 3, 4)
Provide a paved road for independently deployable services that reduces deployment risk rather than creating operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building, testing, and deploying modules independently with build provenance, dependency scanning, automated tests, and approval controls. Introduce feature-flag platform wired into monolith; every new code path ships behind a flag.
Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes cluster with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom.
Centralise secrets, certificate rotation, service identities, encryption, vulnerability management, and GDPR controls. Reduce deployment cycle from bi-weekly to daily per service by end of this step.
6. Place API gateway and strangler façade with instant rollback (depends on: 4, 5)
Decouple clients from monolith internals. Place a reverse proxy in front of all public, mobile, and back-office endpoints.
Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve headers, sessions, cookies, languages, currencies, and server-rendered storefront behaviour.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Implement instant route rollback—a configuration change, not a redeploy—completing in minutes.
Test route rollback, session continuity, in-flight request draining, and full-load reversion to monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4, 5)
The monolith remains the production dependency for most of the programme. Stabilise it and create internal seams before extracting.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Wrap high-risk database access behind repository and application interfaces, especially pricing, checkout, and inventory. Ban new cross-module joins and new stored-procedure coupling.
Introduce expand-contract database migrations: additive, backward-compatible changes deploy first; destructive changes require evidence all readers have moved. Raise automated regression coverage on critical journeys to baseline before touching them.
Add feature flags and kill switches around all new monolith-to-service integrations. Prove online deployment, connection draining, and zero-downtime schema releases to reduce the 30-minute maintenance window dependency.
8. Deploy event backbone: Kafka, outbox, CDC and reconciliation (depends on: 3, 5, 7)
Create the reversible integration spine that enables services to coexist with the monolith without dual-write corruption.
Deploy Kafka with topics per bounded context. Implement transactional outbox pattern in monolith: every state change publishes an event atomically with the database write. Use CDC (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Define versioned event schemas in a schema registry with backward-compatibility enforcement, dead-letter handling, replay procedures, and consumer ownership. Standardise idempotent consumers and anti-corruption adapters.
Build a replication and reconciliation framework that compares counts, hashes, financial totals, stock totals, lag, and exception records. Define transition states for each entity: monolith-owned → replicated read → dual-read → service-owned → legacy-retired.
9. Strengthen testing: characterisation, contracts, and 12x load validation (depends on: 2, 4, 5, 7)
Replace confidence based on fortnightly release with automated evidence for each independently deployed component.
Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every module pair that will become separate services.
Build golden journeys for browse, price, cart, checkout, payment, order, return, and loyalty; automate as regression tests runnable in < 15 minutes. Implement load, soak, spike, and failover tests using observed 12x sale profile.
Build production-like staging with anonymised data, provider simulators, warehouse-file simulators, and repeatable country/currency/language/tax fixtures. Define policy: no extraction proceeds unless affected module reaches ≥ 60% coverage on touched paths, 80% on changed code.
10. Parallel workstream: price and promotion archaeology and golden-master corpus (depends on: 2)
This workstream runs **in parallel** with infrastructure build (S4–S7). Pricing is the highest-risk, least-understood module; it must be deciphered before extraction is attempted.
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Inventory all 200k lines: rules, stored procedures, config tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
Capture real production decision inputs and outputs into a privacy-safe golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases. Produce a machine-readable rule catalogue (decision tables) representing all ≥200 identified rules. Classify rules into universal, country-specific, and campaign/temporary.
Build a shadow evaluation harness that replays real baskets and edge cases. Freeze current-behaviour snapshots; any new promo feature implements twice (against legacy and new) until cutover. Deliver a signed-off rule-specification document all teams agree represents current behaviour by month 4.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
Decouple the warehouse file exchange from the customer-facing inventory domain before extracting inventory.
Build an adapter that wraps the existing 15-minute file exchange: validates, deduplicates, journals, acknowledges inbound/outbound files, and publishes `inventory-updated` events to Kafka. The warehouse contract (SFTP files) remains unchanged; the monolith no longer polls files directly.
The adapter becomes the system-of-record for what the warehouse committed, and feeds all downstream inventory logic. This enables inventory services to be extracted later without warehouse-system changes.
Test delayed files, duplicate files, malformed files, and replay scenarios. Reconcile file-based inventory with event-driven view during transition.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model.
Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, aliases, and blue/green indexes.
Run both in shadow mode: compare product availability, locale content, ranking, facets, latency, and zero-result rates against current behaviour for at least one week. Shadow-query both indexes for comparison.
Shift traffic gradually: 1% → 10% → 50% → 100% by country and cohort. Keep monolith/Lucene live until parity tests and peak load tests pass. Keep old Lucene index warm as cold standby through next sale.
Rollback is a route change; latency overhead must be < 50 ms.
13. Wave 1: Extract customer accounts, identity and loyalty (depends on: 6, 8, 9, 12)
Move identity-adjacent data only after privacy, consent, and data ownership are clear. This validates the full extraction playbook on a well-bounded domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access/deletion workflows, and access-control model. Build a customer service owning profile, authentication, and loyalty data with REST/gRPC APIs.
Start with replicated profile reads, then migrate bounded profile writes through a façade with idempotency and audit trails. Migrate sessions without forced logouts: mobile and web keep same auth tokens/cookies during switch.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip with monolith auth restored without password resets.
This service becomes the reference implementation for all subsequent extraction waves.
14. Wave 2: Extract inventory availability reads and reservation logic (depends on: 6, 8, 9, 11, 12)
Separate warehouse file exchange from customer-facing inventory reads while preserving order and reservation correctness.
Build an inventory service owning stock levels, availability, and warehouse synchronisation. Consume inventory-change events from the warehouse adapter (S11); build an availability read model for storefront and search with explicit freshness semantics and oversell tolerance.
Shadow-compare every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before traffic expansion. Route reads gradually by country: 1% → 10% → 50% → 100%.
Preserve monolith stock reservation and allocation authority (the hard problem, tied to order-creation transaction) until order ownership is fully designed. Provide immediate fallback to monolith availability and a replayable file-recovery process.
Prove no extra oversell versus today's 15-minute lag before any peak season.
15. Peak readiness gate 1: certify hybrid estate before first peak (January or July) (depends on: 9, 12, 13, 14)
Certify the actual mixed estate—both the live services and all fallback paths—before the first major sales peak falls within the migration window.
Load-test the live routing topology at ≥ 12x observed baseline plus agreed headroom, including gateway, CDN/cache, monolith, live services, databases, event platform, search, warehouse adapter, and payment integrations.
Test traffic reversion from each live service (search, catalogue, customer) to the monolith and confirm monolith can absorb full reverted load. Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up, and provider rate-limit agreements.
Run chaos games: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files. Conduct incident-command exercises and stakeholder rehearsals.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, and support before entering freeze window. If a peak is not in this window, this gate is a placeholder.
16. Wave 3: Extract pricing and promotions service (shadow mode, months 4–8) (depends on: 10, 12, 14)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow for 6–8 weeks: every pricing request (real orders, quote requests) is sent to both monolith and new service. A comparator flags every discrepancy. Alert on any mismatch; classify discrepancies and require business sign-off.
Only after discrepancy rate < 0.01% for two full weeks (including weekend) begin traffic shifting via feature flags by country and promotion type. Require business sign-off and financial-impact analysis before moving each rule slice.
Keep monolith pricing logic compilable and deployable as rollback for 90 days post-cutover. Country-specific rules move last, one market at a time if needed. Assign dedicated on-call for first 30 days post-cutover.
17. Wave 3: Extract cart, checkout and payment orchestration (depends on: 6, 8, 9, 13, 14, 16)
Move the revenue-critical transaction path only after dependencies are available and proven. A thin orchestration service talks to existing integrations first.
Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout service owning cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with explicit fallbacks.
Cart state moves to a dedicated store (Redis transient, PostgreSQL persistent) using CDC from monolith during transition. Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent auth/capture, retry policy, reconciliation, and fallback behaviour.
Build a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and orders. Keep PCI and provider contracts stable; wrap, do not rewrite.
Canary by country and payment method. Run chaos tests (provider timeout, partial failure) on staging before enabling real traffic. Do not split the final order-creation transaction until failure-mode analysis, compensating actions, and sale-peak load tests prove acceptable risk. Rollback re-routes checkout to monolith; in-flight transactions complete on old path.
18. Wave 4: Extract order management, returns, and post-order workflows (depends on: 8, 13, 14, 17)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout emits reliable events.
Publish reliable order lifecycle events from checkout using the outbox pattern. Build an order service consuming `order-placed` events; it owns order state machine, fulfilment tracking, and returns workflow.
Build an order query service for customer self-service, support, and selected back-office views. Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events.
Migrate order and returns tables via CDC; reconcile daily during 60-day dual-run window. Backfill historical orders and run reconciliation. Back-office order views call the new service API through gateway; legacy views remain as fallback.
Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved. Validate that returns process (including cross-border returns across 8 countries) works identically. Rollback re-routes queries to monolith; event replay ensures no order is lost.
19. Peak readiness gate 2: certify before second peak (July if first was January) (depends on: 15, 16, 17)
Protect the second major sales peak by repeating and extending capacity certification with more services live.
Freeze new cutovers 6 weeks before the peak. Load-test the full hybrid path at ≥ 12x with pricing, checkout, orders, returns, inventory, customer, and search services live—routing at the then-current percentage mix.
Test traffic reversion for every live service and confirm fallback paths absorb full reverted load. Re-run chaos games: provider outage, event lag, database failover, search fallback. Run disaster-recovery drills and stakeholder rehearsals.
Validate price parity, payment approval rate, order throughput, and inventory discrepancy stay within agreed thresholds. Pre-scale infrastructure, warm caches, and agree provider rate limits.
Obtain formal go/no-go sign-off. If this peak has already passed, this gate is skipped.
20. Migrate back-office and refactor storefront to consume service layer (depends on: 13, 16, 17, 18)
Deliver a modern back-office for 300 staff and update storefront to call services instead of monolith.
Build a new back-office frontend (React/Vue SPA) backed by a thin BFF that aggregates calls to catalogue, pricing, order, inventory, and customer services with role-based access control and audit logging.
Migrate back-office routes incrementally via gateway; legacy server-rendered admin pages remain accessible. Run parallel operation for 4 weeks: staff use new portal with feedback channel; old portal stays one click away. Decommission legacy screens only after 30 days of stable operation and zero critical issues.
Refactor the server-rendered storefront to call service APIs via gateway instead of hitting monolith directly. Introduce Storefront BFF that aggregates catalogue, pricing, cart, and customer data. Ensure mobile app switches to new API version behind gateway; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through E2E tests. Train staff per screen group; keep old screens until new ones match parity. Rollback: gateway routes storefront and back-office to monolith.
21. Transfer data ownership one entity at a time through reversible cutovers (depends on: 8, 12, 13, 14, 16, 17, 18)
Move write ownership after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database move.
For each entity, document source of truth, writer sequence, replication direction, API consumers, data-retention rules, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents; avoid unrestricted dual writes. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Define thresholds that automatically halt traffic expansion if reconciliation fails.
Rewrite stored procedures into service code with characterization harness coverage; never cut stored procedures until logic has equivalent test harness. Shrink the 1.2 TB database as tables go dark. No cross-service joins remain for migrated capabilities.
Retain legacy read access and compatibility APIs until all consumers migrated and observation period passed. Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare.
22. Execute progressive traffic migration with measured increments and automated rollback (depends on: 5, 9, 12, 13, 14, 16, 17, 18, 20)
Move production traffic through measured, reversible stages. Every migration uses the same operational playbook regardless of domain.
Progress through stages: dark launch → shadow comparison → employee cohort → low-risk country/cohort → 1% → 5% → 25% → 50% → 100%, where appropriate. Define quantitative promotion criteria per stage: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts.
Automate route rollback; validate it with game days. Rollback must restore a known compatible route without data loss or duplicate operations. Run failure injection: dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover.
Maintain staffed hypercare after each material expansion with business, support, and engineering able to pause or reverse rollout. Freeze traffic increases before sales windows. Mean time to revert a bad service release must be < 10 minutes via flags or routing.
23. Retire legacy paths, decommission monolith and establish steady-state governance (depends on: 19, 21, 22)
After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission. Remove only proven-obsolete paths; retain legacy where removal creates unjustified commercial risk.
Verify zero production requests route to monolith for 30 consecutive days. Perform final data reconciliation: compare monolith DB checksums against service-owned databases. Remove feature flags and dark-launch paths for all migrated capabilities.
Drop or archive monolith tables and stored procedures for migrated modules after reconciliation. Decommission monolith deployments; maintain read-only archive for 12 months for audit and compliance. Remove temporary replication, CDC, and compatibility adapters in controlled releases.
Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises. Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback procedures.
Conduct post-migration review against business outcomes, incident history, delivery lead time, and peak performance. Prioritize any remaining pricing, checkout, order, or database decomposition as funded follow-on roadmap.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs during a defined January or July sales-protection window.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, runbooks, and on-call coverage.
- Core transactional ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes, and routine compatible releases for extracted services occur at least weekly without the monolith maintenance window.
Steps (21):
1. Launch governed migration programme and protect sales
Establish a revenue-protection programme before changing architecture. The 12-month goal is independently deployable domain capabilities, not an unsafe promise to fully retire every monolith transaction.
- Name an accountable programme lead, chief architect, operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and each country.
- Keep feature delivery funded: target 50% roadmap, 30% migration, and 20% quality, resilience, and operational work per team. Steering approval is required to change this allocation.
- Publish a risk register, dependency board, decision log, escalation path, and weekly engineering-business steering meeting.
- Define sales-protection windows around the actual January and July sales dates: no first-time cutovers, write-ownership transfer, destructive schema changes, payment changes, or traffic expansion for six weeks before through two weeks after each sale.
- Require a named command owner, measurable acceptance criteria, a tested rollback or recovery action, and operations approval for every production migration.
- Prohibit big-bang replacement, uncontrolled dual writes, new cross-domain joins, and direct access to another service's database.
2. Baseline behaviour, dependencies, data, and invariants (depends on: 1)
Create the factual baseline that every migration, capacity decision, and rollback will be compared against.
- Trace the top customer, mobile, back-office, warehouse, scheduled-job, payment-webhook, refund, and support journeys through Java modules, endpoints, tables, stored procedures, files, and external providers.
- Inventory all 350 tables, procedures, triggers, jobs, database writers, readers, cross-module joins, personal-data classes, retention obligations, and reporting consumers.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and page type. Capture latency, errors, conversion, approval rate, database saturation, batch duration, and recovery time.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility, no duplicate payment or order, reservation semantics, refund and loyalty ledger correctness, warehouse-file completeness, and GDPR workflows.
- Build an extraction scorecard using coupling, change rate, data ownership feasibility, business risk, operational maturity, and quality of rollback.
- Produce anonymised production-shaped fixtures and a representative 12x load profile.
3. Set boundaries, ownership, and a realistic year-one target (depends on: 2)
Define services and data ownership before building them. Make the target explicit enough to prevent a distributed monolith.
- Establish bounded contexts: edge/channel façades, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflow.
- Assign one accountable team and one current or future system of record for every entity group. A service may own a replicated read model but never write another domain's store.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated path, service command owner with compatibility adapter, and legacy retired.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, deadlines, retries, authentication, audit events, and deprecation rules.
- Set an honest year-one exit scope. Search, catalogue reads, inventory integration and availability reads, customer/profile slices, order-query and return slices, pricing façade and proven rules, payment adapters, and cart/checkout façades must be independently deployable. Transactional command ownership transfers only when evidence gates pass.
- Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12.
4. Instrument the estate and establish operational control (depends on: 1, 2)
Make legacy and new paths observable before moving material traffic.
- Add correlation IDs, structured logs, traces, RED metrics, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back office, warehouse, and providers.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, file exchange, and staff workflows.
- Build comparison dashboards by legacy versus replacement path, country, currency, language, traffic cohort, payment provider, and release version.
- Alert on business failures such as price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, and abnormal zero-result rate.
- Test current backup, restore, failover, incident communication, and on-call escalation procedures. Establish a five-minute detection target for critical journey failure.
5. Build the delivery, security, and progressive-release paved road (depends on: 3, 4)
Provide a small standard platform that makes independent deployment safer than the existing fortnightly release train.
- Deliver a service template with health checks, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migration, outbox, API documentation, and idempotent message handling.
- Create individual CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and deployment checks.
- Implement feature flags, canary or blue-green deployment, country and cohort targeting, automated SLO-based rollback, and auditable approval controls for financial changes.
- Provision production, performance, staging, and integration environments using infrastructure as code. Size the runtime, databases, cache, event platform, and gateway for 12x demand plus agreed headroom.
- Complete PCI-scope assessment, least-privilege access, encryption, key rotation, vulnerability management, audit logging, and GDPR controls before payment or customer traffic uses a new path.
- Prove online deployment, connection draining, and backward-compatible schema releases in the monolith to reduce dependence on the 30-minute maintenance window.
6. Create test, contract, and capacity evidence (depends on: 2, 4, 5)
Replace confidence based on low unit-test coverage with evidence focused on behaviour and affected risk.
- Add characterization tests around selected endpoints, stored procedures, scheduled jobs, pricing decisions, cart behaviour, checkout failures, and payment callbacks before changing them.
- Establish consumer-driven contracts for mobile, storefront, back-office, provider, and service boundaries. Preserve existing mobile contracts without requiring an app release.
- Build a production-like performance environment with anonymised data and payment-provider and warehouse-file simulators.
- Automate end-to-end, reconciliation, load, soak, spike, failover, and chaos tests. Cover all eight countries, three currencies, four languages, guest and registered customers, and payment outcomes.
- Require 80% coverage on changed migration code and 100% scenario coverage for defined money, stock, refund, and loyalty invariants. Do not use aggregate line coverage as the sole gate.
- Make rollback rehearsal, contract compatibility, security review, reconciliation plan, and 12x capacity evidence mandatory before a service receives meaningful traffic.
7. Modularise the monolith and create stable seams (depends on: 3, 5, 6)
Make the monolith safe to coexist with services. Extraction begins with interfaces and ownership rules, not a repository split.
- Enforce package and dependency boundaries with architecture tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, inventory, customer, pricing, payment-provider logic, cart, checkout, and order queries.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract migrations only. Inventory all readers before any destructive action and retain rollback-compatible schema versions through the observation period.
- Add kill switches to every monolith-to-service call. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
8. Build governed event, replication, and reconciliation capabilities (depends on: 3, 5, 7)
Build the coexistence spine before transferring data or commands. The key rule is one writer for each business command at any time.
- Deploy an event platform with schema registry, compatibility checks, access control, retention, replay, dead-letter processing, consumer ownership, and peak throughput tests.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only where an outbox cannot yet be introduced, and record its retirement owner and date.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, and timeout policies.
- Document write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
9. Deploy edge routing and channel-compatible façades (depends on: 4, 5, 6, 7)
Decouple clients from monolith implementation paths while preserving server-rendered storefront, mobile, session, and back-office compatibility.
- Put a gateway and selective backend-for-frontend façade in front of existing endpoints without changing initial behaviour.
- Route by endpoint, country, cohort, header, flag, and percentage. The default remains the monolith until promotion criteria are met.
- Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions.
- Mirror only safe reads or explicitly idempotent shadow calls. Never mirror live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, cache bypass, session continuity, connection draining, and full-load reversion to the monolith. A route rollback must complete in five minutes or less.
10. Run pricing archaeology and establish the legacy pricing façade (depends on: 2, 6, 7, 8, 9)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not begin with a rewrite.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, tables, overrides, campaigns, scheduled jobs, manual back-office actions, tax inputs, and external dependencies.
- Capture privacy-safe production decision traces and create a golden-master corpus across markets, currencies, dates, segments, baskets, vouchers, stacking, tax, inventory state, and edge cases.
- Put the legacy evaluator behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Define a machine-readable rule catalogue, identify independently movable slices, and require business and finance sign-off on the current observable behaviour.
- Establish an exact comparator for amount, currency, tax, discount, eligibility, explanation, and latency.
11. Extract catalogue read models and search (depends on: 8, 9)
Use read-heavy capabilities to prove the operational model without changing transactional ownership.
- Build catalogue read models from monolith-owned data using controlled replication and events. Keep product authoring in the monolith initially.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache controls, and fallback to the existing Lucene route.
- Shadow-compare content, localization, facets, ranking, zero-result rate, availability display, latency, and conversion. Search remains non-authoritative for price and stock.
- Progress through employee traffic, low-risk country cohorts, and measured percentage increases. Pause automatically on SLO, quality, or reconciliation breaches.
- Retain the legacy catalogue route and a warm Lucene fallback through at least one relevant sale period after full traffic migration.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practiced rollback.
12. Modernise warehouse exchange and inventory availability reads (depends on: 8, 9, 11)
Separate file handling and customer availability from reservation authority. The warehouse contract remains unchanged during the migration.
- Build an adapter that journals, validates, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create an availability read model with explicit warehouse, country, safety-stock, freshness, fulfilment, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result; train operations staff to resolve exceptions.
- Shift storefront and search availability reads only after parity and delayed-file, duplicate-file, malformed-file, and replay tests pass.
- Retain monolith reservation, allocation, and warehouse-export command authority until checkout and order transition designs pass their own gates.
- Provide immediate read fallback and prove no oversell increase attributable to the new path.
13. Extract customer, consent, and bounded loyalty slices (depends on: 8, 9, 11)
Move identity-adjacent functions incrementally while preserving privacy rights and avoiding forced logout or inconsistent loyalty state.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, address, access-control, and country-specific rules.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path and a compatibility adapter. Preserve existing browser and mobile sessions.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; retain legacy financial-impacting commands until reconciliation is consistently clean.
- Maintain a staffed exception process for mismatched data-subject requests, consent, and loyalty records.
- Operate independent deployment, rollback, monitoring, and on-call for each released customer capability.
14. Deliver order views, notifications, and bounded returns (depends on: 8, 9, 12, 13)
Create post-order value without prematurely splitting order creation, financial refunds, or warehouse export.
- Publish reliable order lifecycle events from the existing command owner using the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Extract bounded return initiation, return tracking, notification, and non-financial enrichment workflows only where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
15. Isolate payment providers and create financial controls (depends on: 6, 8, 9, 14)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each provider in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path, while only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
16. Move only proven pricing rule slices (depends on: 10, 11, 12, 15)
Deploy a pricing service as a selective replacement behind the established façade. Full migration is not a gate unless behaviour is demonstrably understood.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare every relevant field and investigate each discrepancy.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- Ensure campaign administration changes publish versioned events and retain a complete pricing decision audit trail.
17. Introduce cart and checkout façades, then migrate safe orchestration (depends on: 12, 13, 15, 16)
Separate deployability from ownership transfer for the revenue-critical journey. Start with a façade that delegates to legacy commands.
- Define cart identity, guest-to-account merge, expiration, country and currency changes, price snapshots, promotion recalculation, inventory checks, and customer retry behaviour.
- Introduce cart and checkout façades that preserve web and mobile contracts while initially delegating to the monolith.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, support tooling, and reconciliation for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes only with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- If a gate is not met before a protection window, retain the independently deployable façade delegating to legacy. Never make a first transaction ownership cutover during a sales-protection window.
18. Transfer data ownership through single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17)
Perform ownership changes entity by entity, not through a bulk database split. Read extraction alone does not justify a write cutover.
- For every candidate entity, document source of truth, writers, readers, procedures, event consumers, backfill checkpoint, retention, reconciliation thresholds, rollback mechanics, and accountable on-call team.
- Backfill with resumable batches and checksums. Validate replication and dual reads before switching the single command route.
- Use compatibility adapters and events rather than unrestricted dual writes or cross-database joins. Financial and inventory discrepancies halt expansion immediately.
- Rewrite stored procedures only after characterization evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the agreed observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Do not delete legacy tables, procedures, replication, or flags as part of initial transfer.
19. Migrate back-office workflows by role and domain (depends on: 11, 12, 13, 14, 18)
Move the 300 staff users incrementally through governed APIs and read models, rather than replacing the entire administration system at once.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, operational exceptions, and reporting needs.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as domains migrate.
- Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
20. Certify each sales peak and rehearse full reversion (depends on: 4, 6, 9, 11, 12, 15, 17)
Treat January and July as formal gates for the actual hybrid topology in production, not as generic performance tests.
- At least six weeks before each sale, freeze new risk and load-test the current routing mix at 12x observed normal demand plus agreed headroom.
- Include gateway, CDN and caches, monolith, PostgreSQL, services, event platform, search, warehouse adapter, payment adapters, external provider limits, and operational staffing.
- Rehearse reversion of every live route. Confirm the monolith, database, legacy search, and provider paths can absorb the full traffic returned by rollback.
- Run game days for service loss, database failover, cache failure, event delay or duplication, warehouse-file delay, payment-provider outage, price-path failure, and flag or gateway failure.
- Pre-scale, warm caches and indexes, validate connection limits, confirm provider commitments, and rehearse incident command and customer communication.
- Require written sign-off from engineering, operations, commerce, finance, payments, warehouse, customer support, and country operations before entering each protection window.
21. Consolidate proven services and establish the follow-on roadmap (depends on: 18, 19, 20)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish funded follow-on work for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (22):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, financial correctness, and reversibility as non-negotiable. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, domain owners, an operations lead, and business owners for pricing, finance, warehouse, payments, and country operations.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before, during, and two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, approval rate, database saturation, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service’s database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and business exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
4. Keep five domain teams and a thin paved-road platform (depends on: 1, 3)
Do not reorganise the five teams of eight. Keep them on business areas. Make the repository safer before you split it.
- Assign each team a future service to own. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls.
5. Instrument the monolith and define journey SLOs (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, metrics, traces, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
6. Build the behavioural safety net and 12x harness (depends on: 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut. Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind facades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 4, 7)
Build reusable coexistence patterns before moving data or command responsibility. Services subscribe to facts. They do not call each other’s databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search as the first independently deployable service (depends on: 10)
Replace the nightly Lucene rebuild with a read-heavy service off the payment path. This proves the playbook on live customer traffic.
- Index from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, latency, and conversion against current Lucene.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old index warm through the next sale as standby.
13. Season 1: extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue service. Command ownership can stay in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity.
- Feed from monolith-owned data via outbox or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare content, availability display, and locale fields before any live percentage.
- Cut storefront and mobile read traffic via the strangler after parity holds. Keep a cache bypass and monolith fallback.
- Do not move authoring tools until reads are operationally boring.
14. Season 1: wrap warehouse files and extract availability reads (depends on: 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today’s 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
15. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
16. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13, 14)
Certify whatever is live, and every fallback, before the first of January or July. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, and warehouse files.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Season 2: dual-run only proven pricing slices (depends on: 11, 13, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Season 2: order-query slices and payment-provider adapters (depends on: 9, 15, 16)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S19 gates pass.
19. Season 2: cart and checkout façades, then only proven orchestration (depends on: 14, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 16, 17, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer write ownership only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Transfer writes as controlled state transitions, not as a database split.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling.
- Train per screen group. Run old and new in parallel. Remove direct SQL access to migrated data.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Do not delete tables, procedures, or flags as part of initial ownership transfer.
22. Shrink residual coupling and hand over a durable operating model (depends on: 21)
Remove only proven-obsolete paths. Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual coupling, direct database access, synchronous depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production step has a rehearsed rollback restoring the previous path within 5 minutes and preserving payment, order, stock, and customer data integrity.
- January and July sales complete with at least pre-migration availability, conversion, payment approval rate, and order throughput at 12x baseline plus agreed headroom.
- No first production cutover, schema split, payment change, or traffic expansion occurs in freeze windows before, during, and two weeks after each peak.
- At least 10 core capabilities are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call by month 12: catalogue, search, pricing, inventory, cart/checkout, payments, orders, returns, customer/loyalty, and back-office workflow.
- Feature roadmap throughput stays at least 80% of agreed baseline; no programme-wide feature freeze.
- Pricing parity for any migrated slice is at least 99.99% on golden-master and production-shadow cases, with all differences approved by business and finance.
- Reconciliation identifies fewer than 0.01% unresolved record discrepancies and zero unresolved financial, stock, refund, loyalty, or order-total discrepancies at each cutover.
- Test coverage on migrated code reaches at least 80%; critical payment, pricing, stock, refund, and checkout paths have 100% contract and characterization coverage.
- Mean time to detect migration-related severity-one failures is under 5 minutes; mean time to restore or roll back is under 10 minutes via flags or routing.
- Deployment frequency reaches at least weekly per service, then daily where risk is low, with no mandatory monolith maintenance window for routine compatible releases.
- No service directly writes another service database; no cross-service direct database joins; each table has exactly one owning service by month 12.
- Monolith codebase reduced by at least 60%, and the remaining monolith no longer serves customer traffic for migrated domains.
- Back-office availability for 300 staff stays at least 99.9% during business hours across all countries.
Steps (21):
1. Programme governance, peak calendar, and team model
Establish delivery guardrails before any technical change. The programme must protect revenue, keep features flowing, and make every migration reversible.
- Appoint a programme lead, chief architect, domain owners, operations lead, security officer, and business owners for pricing, finance, warehouse, and payments.
- Publish a 12-month calendar that marks six-week freeze windows before each January and July sale, plus two weeks after. No first production cutover, schema split, payment change, or traffic increase inside those windows.
- Reserve capacity per team: about 50% roadmap features, 30% migration, 20% quality and operational hardening. Rebalance only through a weekly steering forum.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, and irreversible cutovers. Require a rehearsed rollback for every production step.
- Keep all new feature work on feature flags so deployment is decoupled from customer release.
2. Baseline architecture, data, traffic, and invariants (depends on: 1)
Measure the live monolith before changing it. The baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, payment providers, and warehouse files.
- Record p50/p95/p99 latency, error rate, conversion, payment approval, database load, Lucene rebuild time, inventory lag, and recovery times at normal and peak loads.
- Classify all 350 tables and stored procedures by owner, sensitive data, retention, and cross-module coupling.
- Capture business invariants: price and tax correctness, promotion stacking, stock reservation, payment-to-order match, refunds, loyalty ledger, and GDPR deletion.
- Create anonymised production-like fixtures and a repeatable load profile for later testing.
3. Target architecture and migration sequence (depends on: 2)
Define bounded contexts and a pragmatic strangler pattern. The monolith stays system of record until a service proves it can own the data.
- Define services: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customers/loyalty, returns, back-office.
- Assign one owning team and one source of truth for every entity group. Services may replicate read models but must not write another service's database.
- Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensations, reconciliation, and business exception queues.
- Define transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Sequence extraction by risk and coupling: read-heavy seams first, pricing and checkout only after dual-run and peak gates.
4. Observability and SLO foundation (depends on: 2)
Instrument the monolith and all future services before moving traffic. You cannot extract safely what you cannot measure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic transactions, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, cart, checkout, payment, order, inventory freshness, and back-office response.
- Alert on error-budget burn and business failures, not only infrastructure metrics.
- Build side-by-side dashboards for monolith and replacement paths, with country, currency, language, and traffic cohort dimensions.
- Add immutable audit events for pricing, payments, stock changes, and admin actions.
5. Delivery platform, feature flags, and progressive delivery (depends on: 3, 4)
Build the paved road for independently deployable services. CI/CD, flags, and canary releases replace the two-week monolith train.
- Provide service templates with health checks, graceful shutdown, telemetry, auth, config, migrations, and outbox publishing.
- Create per-service CI/CD with provenance, vulnerability scanning, unit/integration/contract/smoke/performance tests, and approval gates.
- Implement feature flags with country, cohort, percentage, and path routing. Support dark launch and instant kill.
- Add canary and blue-green deployment with automated SLO rollback. Provision Kubernetes or managed runtime sized for 12x peak plus headroom.
- Include secrets, identity, encryption, PCI controls, and GDPR controls from day one.
6. Monolith modularization and test hardening (depends on: 2, 4, 5)
Create internal seams and raise confidence before cutting processes. The monolith must be safe to coexist with services.
- Enforce package boundaries and ownership with ArchUnit tests; ban new cross-module joins and stored-procedure coupling.
- Wrap high-risk database access behind application interfaces. Use expand-contract schema changes: additive first, destructive later.
- Build characterization tests for APIs, stored procedures, pricing rules, and checkout flows before touching them.
- Raise regression coverage on candidate extraction paths, targeting at least 60% on touched code and 80% on changed code.
- Prove online monolith deployments, connection draining, and backward-compatible schema changes to remove the 30-minute maintenance dependency.
7. Strangler gateway and traffic routing (depends on: 4, 5, 6)
Place a routing layer in front of the monolith so services can take over route by route. Rollback becomes a route change, not redeploy.
- Deploy an API gateway or service mesh for web, mobile, and back-office traffic. Default all routes to the monolith.
- Route by path, country, cohort, flag, and percentage. Preserve sessions, cookies, localization, and mobile compatibility.
- Support shadow traffic mirroring for read-only or idempotent calls. Never mirror payment or write commands.
- Test instant route rollback, in-flight draining, cache bypass, and full load reversion to the monolith.
- Keep the existing storefront and mobile API contracts stable; no mobile release should be required for a backend cutover.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 6)
Build the integration spine that decouples services and allows safe coexistence with the monolith.
- Deploy Kafka or equivalent with schema registry, versioned topics, dead letter queues, and replay tooling.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a time-bound replacement plan.
- Implement idempotent consumers and anti-corruption adapters. Define event schemas with backward compatibility.
- Build reconciliation tooling that compares row counts, checksums, financial totals, stock totals, and event lag continuously.
- Maintain the rule that one command owner writes each entity; replication and events feed everything else.
9. Extract search service (depends on: 7, 8)
Use search as the first independently deployable service. It is read-heavy, eventually consistent, and off the money path.
- Build a search service indexed incrementally from catalogue and inventory events. Replace the nightly Lucene rebuild with blue/green indexes and aliases.
- Shadow-compare relevance, facets, zero-result rate, locale behavior, and latency against Lucene before live routing.
- Shift traffic in small percentages by country and cohort; start with employee traffic and low-risk cohorts.
- Keep the old Lucene index warm as a cold standby through the next peak.
- Deploy independently at least weekly and practise rollback to monolith search.
10. Extract catalogue read service (depends on: 9, 8, 7)
Move product, media, and localization reads behind a dedicated service while catalogue writes stay in the monolith initially.
- Build country and language read models for eight markets around one product identity.
- Consume catalogue changes through the event backbone or controlled replication. Stop new cross-module catalogue joins.
- Shadow-compare product data, availability display, and localization against the monolith.
- Shift read traffic gradually; keep caches and monolith route until parity and peak tests pass.
- Do not make catalogue authoritative for price or stock.
11. Extract customer accounts, sessions, and loyalty service (depends on: 7, 8, 9)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and GDPR compliance.
- Build a customer service owning profile, addresses, consent, and loyalty ledger. Start with replicated profile reads, then bounded writes behind idempotent APIs.
- Migrate sessions without forced logout. Keep existing cookies/tokens compatible during the transition.
- Move loyalty balance inquiry before accrual and redemption. Reconcile balances daily.
- Ensure subject access and deletion work in both monolith and service during transition.
- Route traffic via flags and percentages; rollback restores monolith auth with no password resets.
12. Modernize warehouse integration and extract inventory availability service (depends on: 7, 8, 10)
Separate warehouse file handling from customer-facing stock availability. Preserve reservation authority until checkout is migrated.
- Build a warehouse adapter that validates, journals, deduplicates, and acknowledges inbound/outbound files without changing the warehouse contract.
- Publish inventory change events and build an availability read model with freshness, safety stock, and country/fulfilment-node semantics.
- Shadow-compare availability results with the monolith, reconciling every SKU and warehouse before traffic shift.
- Keep monolith reservation, allocation, and warehouse export authority. New service handles reads only.
- Prove no extra oversell against today's 15-minute lag; provide instant fallback to monolith availability.
13. Pricing archaeology and golden-master harness (depends on: 2, 4, 6)
Do not rewrite the 200k-line pricing module until its behavior is testable. This step runs in parallel with the first wave.
- Form a dedicated squad with engineers, merchandising, finance, country representatives, and QA.
- Inventory pricing rules, stored procedures, config tables, overrides, jobs, and manual actions.
- Capture privacy-safe production decision traces into a golden-master corpus covering countries, currencies, tax, promotions, stacking, customer segments, and edge cases.
- Build a replay harness that can compare any candidate pricing engine against the legacy engine on exact amounts, tax, discount, and latency.
- Produce a signed rule specification and a machine-readable rule catalogue.
14. Extract pricing and promotions service behind a façade (depends on: 13, 18, 10, 11, 12)
Move only proven pricing rule slices into a new service, leaving the legacy engine available for rollback.
- Build a pricing service with externalised rules and a versioned façade. New callers use the façade even while it delegates to legacy logic for unproven slices.
- Run shadow mode against live production requests for at least two full weeks. Compare every result; investigate all mismatches.
- Promote a rule slice only after ≥99.99% parity on golden-master and production-shadow cases, with business sign-off for every accepted difference.
- Shift traffic by country and promotion type. Keep a per-slice route-back switch and retain legacy execution through the next sale period.
- Publish pricing events when promotions are created or ended so downstream services can react.
15. Build cart/checkout façade and payment provider adapters (depends on: 14, 18, 11, 12)
Strangle checkout without rewriting payment providers. A façade delegates to the current path first.
- Define cart identity, guest merge, session persistence, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to monolith commands. Introduce a durable attempt state machine and compensation paths.
- Wrap each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation/capture, retries, and reconciliation.
- Canary by country and payment method, starting with internal cohorts. In-flight operations complete on the old path after rollback.
- Do not split final order-creation authority until failure modes, compensating actions, support procedures, and 12x tests pass.
16. Extract order management and returns (depends on: 15, 12)
Move post-purchase workflows after checkout emits reliable order events.
- Publish order lifecycle events from the checkout/command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office views. Reconcile counts, states, refunds, returns, and event lag.
- Extract returns initiation and tracking before financial refund authority. Preserve monolith order creation and capture coordination until ownership transitions in S19.
- Backfill historical orders with checksums and resumable batches. Run dual-read validation before shifting traffic.
- Keep legacy back-office order screens as fallback until the new portal is stable.
17. Modernise back-office incrementally (depends on: 14, 15, 16, 10, 11, 12)
Replace back-office screens workflow by workflow, keeping legacy screens available.
- Build a BFF that aggregates service APIs for catalogue, pricing, order, inventory, and customer domains.
- Migrate read-only views first, then command workflows after service ownership and controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and exports.
- Run old and new screens in parallel for at least four weeks per workflow, with training and floor support.
- Remove direct SQL access to migrated data; move reports to governed read models.
18. Pre-peak readiness gate #1 (depends on: 5, 7, 8, 9, 10, 11, 12)
Certify the hybrid estate before the first of January or July that falls inside the 12-month period.
- Freeze new cutovers and traffic increases in the six weeks before the peak. Continue feature work behind flags and reversible defect fixes.
- Run full-path load, soak, spike, and failover tests at 12x observed baseline plus headroom, including gateway, monolith, services, cache, Kafka, search, inventory adapter, and payment simulators.
- Rehearse reversion of every live route to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb reverted load.
- Run game days for provider outage, CDC lag, flag rollback, search fallback, and warehouse file delay.
- Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and support.
19. Transfer data ownership one entity group at a time after the second peak (depends on: 20)
After the second peak, move final write ownership to services and retire stored procedures using controlled cutovers.
- For each entity group, document source of truth, writers, readers, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums; validate dual reads; then switch the single command writer to the service. Avoid uncontrolled dual writes.
- Reconcile continuously by row counts, hashes, financial totals, stock totals, and business state transitions. Any financial discrepancy halts further expansion.
- Retire stored procedures only when characterization tests prove equivalent service logic.
- Retain legacy read access and compatibility APIs until all consumers have moved and the observation period ends.
20. Pre-peak readiness gate #2 (depends on: 5, 18, 14, 15, 16, 17)
Certify the more complete hybrid estate before the second peak period.
- Freeze first cutovers in the six weeks before the second peak. Re-run full-path 12x load and rollback tests with pricing, checkout, order, inventory, returns, and customer services live.
- Rehearse route rollback for cart, checkout, payment, order, pricing, inventory, and search. Confirm fallback paths can take full reverted load.
- Run disaster-recovery drills for payment-provider outage, event lag, database failover, search fallback, and warehouse file delay.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- Obtain formal sign-off from all stakeholders before entering the protection window.
21. Retire obsolete paths and establish steady-state governance (depends on: 19)
Remove only proven-obsolete legacy paths after both peaks and after 30 days of stable service-only traffic per domain.
- Verify zero production requests route to the monolith for migrated domains for 30 consecutive days. Perform final data reconciliation and archive monolith database read-only for audit.
- Remove feature flags, compatibility adapters, CDC pipelines, and dark-launch paths in controlled releases.
- Decommission monolith infrastructure and update runbooks, on-call rotations, and disaster-recovery plans.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, and continuous resilience testing.
- Publish a follow-on roadmap for any pricing, checkout, or order logic that correctly remained in the monolith because safety gates were not met within the year.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production cutover has a documented, rehearsed rollback that restores the previous path within 5 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput at 12x baseline (approximately 480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside the defined six-week sales-protection windows.
- At least 8 core capabilities (catalogue, search, pricing, inventory, customer/loyalty, cart/checkout, payments, orders/returns) are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least daily per service, with no mandatory monolith maintenance window required for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty-ledger, or order-total discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business and finance owners.
- Test coverage on all migrated code paths reaches at least 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have parity and characterisation tests with 100% automated coverage of defined scenarios.
- Mean time to detect critical customer-journey failures is below 5 minutes; mean time to restore or roll back migration-related severity-one incidents is below 15 minutes.
- Feature delivery continues throughout the programme with planned business roadmap throughput maintained at no less than 80% of the agreed baseline; no programme-wide feature freeze.
- The three payment providers maintain at least 99.95% successful transaction rate throughout the migration; zero payment loss or duplication.
- Back-office availability for 300 staff is at least 99.9% during business hours across all 8 countries; zero disruption during migration.
- Monolith codebase reduced by at least 60%; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- No cross-service direct database joins remain for migrated capabilities; no new cross-module joins or stored-procedure coupling added.
- Peak-load capacity sustained at 12x normal traffic with p99 latency at or below 800 ms for checkout and at or below 400 ms for storefront during January and July sales.
- Inventory reconciliation accuracy at least 99.9% at all points during the migration; zero oversell incidents attributable to migration changes.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until the warehouse side can change.
- The hybrid platform passes full-path load and reversion testing at 12x normal demand plus headroom before each sales period, with formal written sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
Steps (23):
1. Charter, governance, peak-protection calendar, and team operating model
Create the organisational structure that protects revenue, prevents coordination failures, and keeps feature delivery alive throughout the 12 months. One accountable programme lead, one chief architect, and five named domain owners are appointed in week one.
- Form a steering committee with engineering, product, operations, finance, warehouse, payments, security/privacy, and country representatives. Meet weekly with a recorded risk register and dependency board.
- Publish the 12-month calendar immediately. Define hard freeze windows: no first-time cutovers, schema splits, payment changes, or traffic experiments in the six weeks before and two weeks after each January and July sale.
- Reserve team capacity: 50% business features, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance.
- Define stop/go criteria for every production cutover, a named rollback authority per domain, and an escalation path to the steering committee.
- Keep five domain teams aligned to bounded contexts. A shared platform guild of 2–3 senior engineers owns gateway, flags, events, CI, and data tooling.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, and irreversible cutovers. Every production step requires a tested rollback.
- Feature work continues through the same delivery pipeline. Feature flags decouple code deployment from customer release.
- Define non-negotiable invariants: price and tax correctness, promotion eligibility, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty ledger integrity, and warehouse export completeness.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Build an **evidence-based picture** of the current system before selecting extraction order. This baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, and external dependencies.
- Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling.
- Identify and document critical business invariants: stock reservation, price calculation, promotion stacking, payment-to-order consistency, returns, loyalty accrual, and country tax rules.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
3. Define target service architecture, domain boundaries, and honest 12-month scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts, clear data ownership, and incremental extraction. Full monolith retirement is not a 12-month promise; independently deployable services with proven rollback are.
- Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office.
- Assign a single system of record and owning team for each data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning, idempotency requirements, correlation identifiers, and error-handling conventions.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
- Choose the strangler pattern: new services are introduced behind stable interfaces while the monolith remains source of truth until ownership is deliberately transferred.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and reconciliation evidence exists.
- Define the year-one exit scope: independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, and a checkout façade. Transfer transactional ownership only where evidence gates pass.
- Keep the legacy pricing engine and core order creation available behind compatible façades if full ownership transfer is not proven safe by month 12.
4. Build observability, SLOs, and production safety foundations (depends on: 2)
Instrument the monolith and all future services so that **every extraction is measurable** and regressions are caught within minutes. You cannot extract what you cannot see.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds wired to on-call rotation. Alert on business failures (price mismatches, payment/order mismatch, inventory discrepancies, event lag) as well as infrastructure failures.
- Implement synthetic transaction monitoring covering browse → cart → checkout → payment → confirmation across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3)
Provide a **paved road** for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Stand up CI/CD capable of building, testing, and deploying individual modules independently with build provenance, dependency and container scanning, automated tests, environment promotion, and approval controls.
- Introduce a feature-flag platform wired into the monolith via a thin SDK. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, network policies, horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Deploy strangler gateway with instant traffic rollback (depends on: 4, 5)
Place an **API gateway in front of the monolith** that routes traffic to either legacy code or new services, enabling incremental extraction with instant rollback. Clients keep the same URLs.
- Deploy an API gateway or service mesh in front of the existing load balancer.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Preserve mobile API compatibility, cookies or tokens, sessions, headers, localization, and server-rendered storefront behaviour. Do not require a mobile-app release for a backend migration.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Implement traffic mirroring (shadow traffic) so new services can be validated against live production requests before receiving real traffic. Never duplicate customer-visible commands or payment requests.
- Implement instant route rollback to the monolith: a route change, not a redeploy, completing in minutes. Test handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and gateway latency overhead before moving any business endpoint.
7. Stabilise and modularise the monolith in place (depends on: 2, 4)
The monolith remains a **production dependency** for most of the programme. Create internal seams before extracting. New features may not add cross-module joins or new stored-procedure coupling.
- Add a modularity boundary map and enforce it with ArchUnit tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Introduce branch-by-abstraction interfaces around candidate domains, beginning with search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Apply expand-contract database migration rules: additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Ban new cross-module joins and new stored-procedure coupling. Route access through repository or application interfaces.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Capture characterization tests around high-risk stored procedures and APIs before modifying or replacing them.
- Raise automated regression coverage around critical journeys before touching them.
8. Build event backbone, outbox, CDC, and data-transition patterns (depends on: 5, 7)
Create the **integration spine** that decouples services and enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka (or equivalent) with topics per bounded context and a schema registry for versioned events with backward-compatibility enforcement.
- Implement the transactional outbox pattern in the monolith and each service: events are committed with source data and delivered asynchronously with deduplication.
- Provide Change Data Capture (Debezium) only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Add idempotent consumer patterns, dead-letter queues, replay procedures, and consumer ownership from day one.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with compatibility adapter, and legacy-retired.
- During any trial, one command owner writes. The monolith write wins on conflict until ownership is deliberately transferred.
- Validate that the backbone can sustain 12x peak event volume with headroom.
9. Raise test coverage, contract tests, and safety net before cutting seams (depends on: 2, 4, 5)
Replace confidence based on a fortnightly monolith release with **automated evidence** for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in under 15 minutes, executed on every deploy.
- Implement load, soak, spike, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold (target ≥ 60% on touched paths, 80% on changed code).
- Use mutation testing to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
10. Extract catalogue read service and modernise search (Wave 1) (depends on: 6, 8, 9)
Deliver the **first customer-facing extraction** through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication. Keep content and product command ownership in the monolith initially.
- Replace the nightly Lucene rebuild with an independently operated search service using incremental index updates, aliases, blue/green indexes, locale-aware analysis, and rapid fallback to the existing Lucene index.
- Build country and language-specific read models for eight markets around one product identity.
- Run catalogue and search in shadow mode: compare product availability, locale content, ranking, facets, response time, zero-result rates, and conversion against current behaviour.
- Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep the monolith catalogue/search route live until parity and peak tests pass.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
- Keep the old Lucene index warm through the next sale as a cold standby.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
11. Modernise warehouse integration and extract inventory availability reads (Wave 2) (depends on: 6, 8, 9)
Separate warehouse file exchange from customer-facing inventory reads while **preserving warehouse and order-system correctness**. The warehouse contract stays unchanged.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts.
- Publish inventory-change events from the adapter to Kafka. Build an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, and country semantics.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
- Test delayed files, duplicate files, malformed files, replay, inventory-event lag, and fallback to monolith reads under peak load.
- Prove no extra oversell versus today's 15-minute lag before a sale.
12. Extract customer accounts, identity, and loyalty service (Wave 2) (depends on: 6, 8, 9)
Move identity-adjacent data only after **privacy, consent, and data ownership** are clear. This is a well-bounded, lower-risk domain that validates the full extraction playbook.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Build a customer service owning profile, authentication, and loyalty data. Expose REST APIs behind the gateway.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Migrate sessions without forced logouts. Mobile and web keep the same auth cookies or tokens during the switch.
- Move loyalty functions in small slices: balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Route traffic via feature flags starting at 1% → 10% → 50% → 100%. The monolith continues as fallback; a single flag flip routes 100% back.
- Rollback restores monolith authentication with no password resets or forced logouts.
13. Pricing archaeology, golden-master harness, and pricing façade (depends on: 2, 7, 9)
Do not extract the **200,000-line pricing module** until you can prove equivalence. Nobody fully understands country rules. Tests must become the spec. Start this in parallel with infrastructure work.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases with at least 1,000 real orders per country.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact price, discount, explanation, and latency.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract pricing and promotions service behind dual-run comparison (Wave 3) (depends on: 10, 11, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set. Run in shadow until parity is proven. Checkout keeps monolith prices until the money path is clean.
- Build a pricing service with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in shadow mode for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01% over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Country-specific rules move last, one market at a time if needed. Keep a per-slice route-back switch to the legacy engine.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
15. Extract order query, notifications, and returns slices (Wave 3) (depends on: 8, 12)
Create independently deployable order-domain value **without splitting the revenue-critical order-creation transaction** too early.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer self-service, customer support, notifications, and selected back-office reads. Display freshness labels and preserve a legacy support fallback.
- Extract bounded workflows such as return initiation, return tracking, notification delivery, and non-financial enrichment where the ownership boundary is clear.
- Preserve order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export in the monolith until checkout cutover gates are passed.
- Reconcile order counts, state transitions, delivery notifications, returns, refunds, event lag, and customer-service views against the monolith.
- Backfill historical orders into the service and run reconciliation during a 60-day dual-run window.
16. Introduce payment-provider adapters and financial reconciliation (Wave 4) (depends on: 6, 8, 9)
Isolate provider-specific complexity **before changing checkout orchestration or payment ownership**. Wrap, do not rewrite.
- Wrap each payment provider behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
- Introduce a payment ledger and daily reconciliation across authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate adapter behaviour with provider sandboxes, recorded non-sensitive production outcomes, failure injection, and controlled internal cohorts. Do not mirror live payment commands.
- Preserve existing customer-facing errors and country/payment-method routing during initial adoption.
- Make rollback safe for in-flight operations: accepted payment attempts retain the same idempotency key and completion path, while new attempts route back through the compatible legacy path.
- Keep PCI and provider contracts stable throughout the migration.
17. Extract cart and checkout orchestration with progressive traffic control (Wave 5) (depends on: 12, 14, 16)
Move the **revenue-critical transaction path** only after its dependencies are available and proven. Transfer only the proven portions, country and payment method by country and payment method.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Cart state moves to a dedicated data store (Redis for transient, PostgreSQL for persisted) with CDC from the monolith during transition.
- Move checkout orchestration only after end-to-end failure-mode analysis proves correct handling of payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, payment approval, order completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- Use a durable orchestration state and outbox events rather than a distributed database transaction. Compensate or route exceptions; do not silently retry customer financial commands.
- If ownership transfer is not safe before a protected sales window, retain the independently deployable façade delegating to the monolith. This still permits independent release of channel and resilience improvements without risking orders.
- Run chaos-engineering tests (payment-provider timeout, partial failure, network partitions) before enabling real traffic.
18. Extract order management, returns, and post-order workflows (Wave 5) (depends on: 15, 17)
Move post-purchase order lifecycle and returns processing into a dedicated service once checkout emits reliable events.
- Build an order service consuming order-placed events from checkout. Own order state machine, fulfilment tracking, and returns workflow.
- Build a returns service owning return requests, labels, refund settlements, and status. Integrate with order, inventory, and payment services via APIs and events.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
19. Migrate back-office workflows and modernise storefront integration (Wave 6) (depends on: 10, 11, 12, 15, 18)
Move the 300 staff users by workflow and role, not through a high-risk replacement of the entire administration application. Update the storefront to consume the new service layer.
- Deliver domain-specific back-office screens or BFF capabilities that use the same governed APIs and audit controls as customer-facing channels.
- Start with read-only catalogue, order-query, return-status, and inventory views. Move commands only after service ownership and approval controls are established.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel for each workflow. Provide training, floor support, feedback capture, and a direct fallback during the adoption period.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Remove direct SQL access to migrated data and replace necessary reports with governed read models or reporting exports.
20. Transfer data ownership through controlled single-writer cutovers (depends on: 10, 11, 12, 14, 15, 17)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a **reversible state transition**, not a one-time database migration.
- For each entity group, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Rewrite stored procedures into service code with the characterization harness. Never cut stored procedures until logic has an equivalent test harness.
- Shrink the 1.2 TB monolith database as tables go dark. No cross-service joins remain for migrated capabilities.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing command rules, and core order ownership only after their specific evidence gates pass.
21. Peak-season resilience certification and capacity validation (January) (depends on: 5, 9, 10, 11)
Certify the hybrid estate and every fallback before the first of January or July, whichever comes first. A service is not production-ready if its rollback target cannot sustain the traffic it might receive. Schedule at least 3 weeks before the peak.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss, simulate CDC lag.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
- Any component that fails the 12x test blocks go-live.
22. Peak-season resilience certification and capacity validation (July) (depends on: 14, 17, 21)
Repeat and extend the capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week blackout before July: no first-time cutovers, schema splits, payment changes, or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology including pricing, checkout, order, inventory, customer, returns, and back-office services.
- Confirm price-parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills including payment-provider outage, event-lag, database failover, and search fallback.
- After the sale, compare actuals to forecasts and freeze lessons into the next wave.
- Obtain formal peak-readiness sign-off from all stakeholders.
23. Monolith decommission, final data migration, and steady-state governance (depends on: 19, 20, 22)
Retire legacy paths only after both peaks have passed and every service has proven ownership and parity. Remove only proven-obsolete paths and make service ownership sustainable.
- Verify that zero production requests route to the monolith for 30 consecutive days for each domain.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Remove feature flags and dark-launch paths for all migrated capabilities.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Decommission monolith deployments; maintain a read-only archive for 12 months for audit and compliance.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
Step-level differences computed by the tool:
Proposal 1 vs the previous-round proposal it resembles most (qwen3.8-max_refine_5): 12 steps kept, added ['Charter programme with capacity model and peak-protection calendar', 'Stabilise monolith and create extraction seams', 'Deploy event backbone, outbox pattern, and reconciliation framework', 'Strengthen test coverage and build safety net', 'Modernise warehouse integration without changing warehouse contract', 'Wave 1: Extract search and catalogue read services (Months 2–4, post-January)', 'Post-peak 1 strategic review and capacity rebalancing (Month 3)', 'Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8)', 'Pre-peak 2 readiness certification (Month 6, before July)', 'Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer)', 'Wave 3: Order service and post-purchase workflows (Months 9–11)'], removed ['Charter, governance, peak-protection calendar, and team operating model', 'Stabilise and modularise the monolith in place', 'Build event backbone, outbox, CDC, and data-transition patterns', 'Raise test coverage, contract tests, and safety net before cutting seams', 'Extract catalogue read service and modernise search (Wave 1)', 'Extract pricing and promotions service behind dual-run comparison (Wave 3)', 'Extract cart and checkout orchestration with progressive traffic control (Wave 5)', 'Extract order management, returns, and post-order workflows (Wave 5)', 'Peak-season resilience certification and capacity validation (January)', 'Peak-season resilience certification and capacity validation (July)', 'Monolith decommission, final data migration, and steady-state governance']
Proposal 2 vs the previous-round proposal it resembles most (gpt-5.6-terra_refine_2): 11 steps kept, added ['Build operational control and the behavioural safety net', 'Create the paved road and make the monolith safe to coexist', 'Install edge routing with safe fallback semantics', 'January peak gate: freeze risk and certify the initial hybrid estate', 'Move proven pricing slices and introduce cart and checkout façades', 'July peak gate: certify the expanded hybrid topology', 'Transfer only evidence-backed ownership and migrate back-office workflows'], removed ['Instrument the estate and establish operational control', 'Build the delivery, security, and progressive-release paved road', 'Create test, contract, and capacity evidence', 'Modularise the monolith and create stable seams', 'Deploy edge routing and channel-compatible façades', 'Move only proven pricing rule slices', 'Introduce cart and checkout façades, then migrate safe orchestration', 'Transfer data ownership through single-writer cutovers', 'Migrate back-office workflows by role and domain', 'Certify each sales peak and rehearse full reversion']
Proposal 3 vs the previous-round proposal it resembles most (grok-4.6_refine_3): 19 steps kept, added ['Build a thin paved road for independent deployment'], removed ['Keep five domain teams and a thin paved-road platform', 'Season 1: extract search as the first independently deployable service', 'Shrink residual coupling and hand over a durable operating model']
Proposal 4 vs the previous-round proposal it resembles most (claudeHaiku4.5_refine_1): 18 steps kept, added ['Programme governance, peak-protection calendar, and team capacity', 'Target architecture, bounded contexts, and honest 12-month scope', 'Strangler gateway and route-based rollback', 'Monolith modularisation and test hardening', 'Wave 4: Payment provider adapters and financial reconciliation'], removed ['Migration charter, governance and peak-protection freeze windows', 'Define target bounded contexts, data ownership model, and extraction sequence', 'Place API gateway and strangler façade with instant rollback', 'Stabilise and modularise the monolith in place', 'Execute progressive traffic migration with measured increments and automated rollback']
Proposal 5 vs the previous-round proposal it resembles most (grok-4.6_refine_3): 15 steps kept, added ['Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard', 'Define target architecture, domain boundaries, ownership model, and honest year-one scope', 'Instrument the estate and establish operational control', 'Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime', 'Peak readiness gate 1: certify the hybrid estate before the first sale', 'Wave 2: Isolate payment providers and create financial reconciliation', 'Wave 2: Deliver order-query slices, notifications, and bounded returns', 'Consolidate proven services, retire obsolete paths, and hand over steady-state governance'], removed ['Baseline the live system and freeze business invariants', 'Set honest year-one boundaries and non-goals', 'Keep five domain teams and a thin paved-road platform', 'Instrument the monolith and define journey SLOs', 'Certify the first peak on the real hybrid estate', 'Season 2: order-query slices and payment-provider adapters', 'Shrink residual coupling and hand over a durable operating model']
Origin of the steps of the new proposals, matched by title by the tool (evidence for "taken"; ideas can also travel without a matching title):
Proposal 1: 9 of its 23 steps match its own previous version, 6 are new; steps 7, 23 resemble steps 7, 18 of proposal 2; step 10 resembles step 13 of proposal 4; steps 2, 5, 6, 18, 22 resemble steps 2, 5, 6, 16, 19 of proposal 5
Proposal 2: 11 of its 18 steps match its own previous version, 6 are new; step 4 resembles step 6 of proposal 3
Proposal 3: 19 of its 20 steps match its own previous version, 1 is new
Proposal 4: 10 of its 23 steps match its own previous version, 0 are new; steps 9, 11, 12, 13, 14, 15, 20, 21 resemble steps 9, 11, 12, 13, 14, 15, 19, 20 of proposal 1; step 22 resembles step 18 of proposal 2; step 18 resembles step 19 of proposal 3; steps 3, 5, 17 resemble steps 3, 5, 16 of proposal 5
Proposal 5: 3 of its 23 steps match its own previous version, 0 are new; steps 2, 6, 16 resemble steps 2, 9, 15 of proposal 1; steps 4, 18, 19, 20, 22 resemble steps 4, 15, 14, 17, 19 of proposal 2; steps 7, 9, 10, 11, 12, 13, 14, 15, 17, 21 resemble steps 7, 9, 10, 11, 12, 13, 14, 15, 17, 20 of proposal 3; steps 1, 23 resemble steps 1, 21 of proposal 4
PROPOSALS OF ROUND 3 (to assess):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Your answer has these parts:
- "round_summary": two or three sentences on how the round went as a whole.
- "converging": true if the proposals of this round are more similar to each other than those of the previous round, false otherwise.
- "proposals": one entry per proposal of round 3, each with:
- "proposal": its number,
- "assessment": "improved", "worsened", "mixed" or "unchanged" with respect to its previous version ("no_previous_version" if that agent produced nothing in the previous round),
- "what_changed": a concise account of how it improved or worsened and why (three or four sentences at most),
- "improvements": a list of concrete gains (specific steps, metrics, structure),
- "regressions": a list of concrete losses (dropped steps, vaguer metrics, broken dependencies...),
- "taken": the ideas this proposal visibly adopted from the OTHER proposals of round 2 (not from its own previous version): one entry per idea with "from_proposal" (the number of the proposal it came from), "steps" (the numbers of the steps of that proposal where the idea lives, as listed above; empty if it is not tied to specific steps), "what" (the idea, one sentence) and "why" (how it was used or adapted, one sentence),
- "rejected": the ideas of the OTHER proposals of round 2 that this proposal visibly declined: an explicit contradiction, or a prominent idea it saw and left out while taking the opposite approach. Same fields; "why" gives the evidence (what the proposal does instead). Do not list mere omissions without evidence; an empty list is a valid answer.
[ROUND 4]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
This is round 4, a refinement round: every agent received ALL the proposals of round 3 and wrote a new plan, improving on them or taking a different approach. By convention, the previous version of proposal N is proposal N of round 3, written by the same model.
PROPOSALS OF ROUND 3 (the previous versions):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics:
- Zero unplanned customer-facing downtime attributable to migration across the 12 months.
- Every production cutover has a documented, rehearsed rollback restoring the previous path within 5 minutes and preserving financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration baseline for availability, conversion, payment approval, and order throughput at 12x baseline (≈480,000 orders/day).
- No first-time cutover, ownership transfer, destructive schema change, or traffic expansion occurs inside defined six-week sales-protection windows.
- At least 8 core capabilities (search, catalogue, inventory availability, customer/loyalty, pricing façade, orders, returns, cart/checkout façades) are independently deployable with named owners, SLOs, dashboards, runbooks, and on-call support by end of month 12.
- Deployment frequency increases from bi-weekly to at least weekly per service, with no mandatory monolith maintenance window for routine compatible releases.
- All extracted services have zero direct writes to another service's database; all cross-service state propagation uses governed APIs or versioned events with idempotency and monitored replay.
- For each ownership cutover, reconciliation identifies < 0.01% unresolved record discrepancies and zero unresolved financial, payment, refund, tax, loyalty, or order-total discrepancies.
- Pricing parity for any migrated rule slice is ≥ 99.99% against golden-master and production-shadow cases, with all differences explicitly approved by business and finance.
- Test coverage on all migrated code reaches ≥ 80%; contract tests exist for every inter-service boundary; critical pricing and checkout paths have 100% automated scenario coverage.
- Mean time to detect critical customer-journey failures < 5 minutes; mean time to restore or roll back < 15 minutes via flags or routing.
- Feature delivery throughput stays ≥ 80% of agreed baseline; no programme-wide feature freeze.
- All three payment providers maintain ≥ 99.95% successful transaction rate throughout migration; zero payment loss or duplication.
- Back-office availability for 300 staff ≥ 99.9% during business hours across all 8 countries.
- Monolith codebase reduced ≥ 60%; remaining monolith owns no migrated data or stored procedures.
- Peak-load capacity sustained at 12x with p99 checkout latency ≤ 1.2 s and p99 storefront latency ≤ 400 ms during both January and July sales.
- Inventory reconciliation accuracy ≥ 99.9%; zero oversell incidents attributable to migration.
- Mobile and storefront keep compatible endpoints throughout; warehouse file contracts remain valid until warehouse can change.
- Post-peak strategic review (Month 3) formally reforecasts the programme if migration slips exceed 20% of planned capacity.
- Warehouse integration adapter proves stability and reliability for ≥ 4 months before any inventory read service extraction.
- Pricing façade (delegating to the monolith) and proven rule slices are the accepted independently deployable artefact if full engine extraction cannot be safely completed by month 12.
Steps (23):
1. Charter programme with capacity model and peak-protection calendar
Establish accountable governance and protect the non-negotiable constraints that protect revenue and enable reversibility.
Appoint one programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, security, and country operations. Form a weekly steering committee with a recorded risk register and dependency board.
Publish a 12-month calendar in week one. Mark hard freeze windows: no first production cutover, schema split, payment change, or traffic expansion for six weeks before and two weeks after each January and July sale. Classify all feature work as committed or discretionary; commit to maintaining roadmap delivery at 50% and allocate 30% to migration and 20% to quality. Only the steering committee may rebalance.
Define the cost of migration delay: what happens to the roadmap if pricing archaeology takes 4 months instead of 2? What if inventory adapter slips? Document these decision trees. Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, and irreversible cutovers.
2. Baseline architecture, data model, traffic, and operational risk (depends on: 1)
Measure the live system before changing it. The baseline is the reference for capacity, correctness, and rollback at every step.
Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, files, and integrations. Record p50/p95/p99 latencies, error rates, payment approval rates, database load, Lucene rebuild time, 15-minute inventory sync lag, and recovery times at normal and 12x peak load.
Classify all 350 tables and procedures by owning concept, writers, readers, retention, GDPR obligations, and cross-module coupling. Capture critical business invariants: stock reservation semantics, price and tax correctness, promotion stacking, payment-to-order match, refund integrity, loyalty ledger, warehouse export completeness, and country-specific rules.
Create a coupling heat map and extraction scorecard (risk, coupling, change frequency, data ownership feasibility, and expected value). Capture anonymised production-shaped data and a documented 12x load profile for repeatable testing.
3. Define target architecture, bounded contexts, and data-ownership rules (depends on: 2)
Agree a pragmatic target based on business domains and clear ownership. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
Define bounded contexts: edge/storefront, catalogue, search, pricing & promotions, cart, checkout, payments, orders, inventory, customers & loyalty, returns, and back-office. Assign one system of record and owning team per entity group. Services may replicate data but must never directly write another service's database.
Prohibit distributed transactions. Use transactional outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues.
Sequence extraction by risk and coupling: read-heavy and already-async seams first (search, catalogue, inventory reads); pricing and checkout delayed until dual-run evidence; data ownership transfers only where evidence gates pass.
4. Build observability, SLOs, and error-budget control (depends on: 2)
Instrument the monolith and all future services so every extraction is measurable and regressions are caught within five minutes.
Deploy OpenTelemetry agents; export traces, metrics, and structured logs to a central stack. Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s. Build real-time dashboards with alert thresholds wired to on-call. Alert on business failures (price mismatches, payment/order lag, inventory discrepancies, event lag) as well as infrastructure.
Implement synthetic transaction monitoring covering all 8 countries, 3 currencies, and 4 languages. Establish an error-budget policy: any extraction that breaches its SLO is automatically rolled back.
Create immutable audit events for pricing, payments, stock adjustments, order state, and administrative actions. Test backup, restore, database failover, provider outage, and incident communications before any service traffic is introduced.
5. Build delivery platform: CI/CD, feature flags, canary deployment, and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk, not create operational complexity.
Stand up CI/CD (GitLab/GitHub → ArgoCD) capable of building and deploying individual services with build provenance, scanning, unit/integration/contract/smoke tests, and approval gates. Introduce a feature-flag platform wired into the monolith. Implement canary and blue-green deployment with automated SLO-based rollback.
Provision Kubernetes or managed runtime with namespaces per bounded context, autoscaling, and resource quotas sized for 12x peak plus headroom. Include isolated dev, integration, staging, performance, and production environments using infrastructure as code.
Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope, and GDPR controls. Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute maintenance window.
6. Place strangler gateway with instant traffic routing and rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping existing contracts stable. Clients use the same URLs; routes change transparently.
Deploy an API gateway in front of existing endpoints. Route by path, country, cohort, feature flag, and percentage; default remains the monolith. Preserve cookies, sessions, headers, localisation, currencies, and server-rendered storefront behaviour. Do not require a mobile app release for a backend migration.
Implement traffic mirroring (shadow mode) so new services validate against live production before receiving real traffic. Never mirror customer-visible commands or payment requests.
Implement instant route rollback: a configuration change, not a redeploy, completing in under five minutes. Test cache bypass, session continuity, in-flight request draining, and full-load reversion to the monolith. Measure baseline response equivalence and gateway latency overhead before moving any endpoint.
7. Stabilise monolith and create extraction seams (depends on: 2, 4)
The monolith remains the production dependency for most of the programme. Create internal seams before removing processes.
Enforce package boundaries using ArchUnit tests and code-ownership rules. Introduce branch-by-abstraction interfaces around candidate domains (search, catalogue, pricing, inventory, customer, payments). Wrap high-risk database access behind repository or application interfaces.
Apply expand-contract schema changes only: additive changes first, destructive changes only after evidence all readers have moved. Ban new cross-module joins and new stored-procedure coupling.
Build characterization tests around APIs, stored procedures, pricing rules, and checkout flows. Raise regression coverage on critical journeys to baseline (≥60% on touched code, 80% on changed code) before extraction. Add feature flags and kill switches around all new monolith-to-service integrations. New features ship with new seams; they do not bypass them.
8. Deploy event backbone, outbox pattern, and reconciliation framework (depends on: 3, 5, 7)
Build the integration spine that enables safe coexistence between the monolith and new services. Services subscribe to facts; they do not call each other's databases.
Deploy Kafka with topics per bounded context, schema registry with versioned events, dead-letter queues, replay procedures, and consumer ownership. Implement transactional outbox pattern: all writes publish events atomically with data changes. Use Change Data Capture (Debezium) only where outbox cannot yet be added, with a time-bound replacement plan.
Build a replication and reconciliation framework that compares row counts, hashes, financial totals, stock totals, lag, and exception records continuously. Standardise anti-corruption adapters, idempotent consumers, timeouts, circuit breakers, correlation IDs, and idempotency keys.
Define entity transition states: monolith-owned → replicated read → dual-read validation → service-owned with compatibility adapter → legacy-retired. Establish the rule: one command owner writes each entity at any time; during transition, writes route to the legacy owner until deliberately transferred.
9. Strengthen test coverage and build safety net (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated evidence for each independently deployed component. Focus on revenue-critical and migration-affected paths.
Build characterization tests around current APIs, stored procedures, and pricing rules. Add consumer-driven contract tests (Pact/Spring Cloud Contract) between every pair of modules that will become separate services.
Build end-to-end golden-journey regression tests (browse → price → cart → checkout → payment → order → return) runnable in under 15 minutes. Implement load, soak, spike, failover, and chaos tests using the observed 12x sale profile with recorded warehouse and payment provider scenarios.
Build a production-like test environment with anonymised data, provider simulators, and repeatable fixtures for all 8 countries, 3 currencies, and 4 languages. Define policy: no extraction proceeds unless affected module reaches ≥60% on touched paths, ≥80% on changed code. Use mutation testing to identify high-risk untested paths (checkout, payments, inventory).
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme, not a rewrite. Nobody fully understands the 200,000 lines and country-specific rules. Do this in parallel with infrastructure work (Months 1–4).
Form a dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, customer support, and QA. Protect its capacity for the full programme.
Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions. Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases—at least 1,000 real orders per country.
Produce a machine-readable rule catalogue (decision tables or DSL) representing all identified rules. Identify dead code (rules not fired in 24 months). Put the existing engine behind a versioned pricing façade. Build a shadow comparison harness for price, tax, discount, and latency.
Deliverable by Month 4: a signed-off rule specification that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8)
The warehouse file exchange is a critical dependency for inventory reads. Build a robust adapter upfront before extracting inventory service.
Build a warehouse integration adapter that validates, records in a journal, deduplicates, acknowledges, and retries inbound and outbound files without changing the warehouse SFTP contract. The adapter becomes the system of record for what the warehouse committed.
Implement backpressure handling, delayed-file recovery, duplicate-file detection, and malformed-file quarantine. Publish inventory-change events to Kafka from the adapter so downstream services react to authoritative inventory facts.
Test delayed files, duplicate files, malformed files, replay scenarios, and reconciliation at peak load. Verify the adapter can sustain 15-minute sync cycles under 12x peak demand.
This adapter operates for at least four months before the first inventory read service extraction, proving stability and reliability.
12. Wave 1: Extract search and catalogue read services (Months 2–4, post-January) (depends on: 6, 8, 9)
Deliver the first customer-facing extractions through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transactional ownership.
Build a catalogue read service fed from monolith-owned data via outbox or controlled replication. Replace nightly Lucene rebuild with independently deployed search service supporting incremental updates, blue/green indexes, and locale-aware analysis.
Run both in shadow mode for at least one week: compare product availability, locale content, ranking, facets, zero-result rates, and conversion against current behaviour. Shift traffic gradually by country and cohort (1% → 10% → 50% → 100%). Keep Lucene live as cold standby through the next sale.
Rollback is a route change (minutes, not redeploy). Implement cache policies, stale-data limits, and cache-bypass controls. Do not make search authoritative for price or stock; it consumes versioned read models from owning domains.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority and order correctness.
Build an inventory service consuming inventory-change events from the warehouse adapter. Create an availability read model for storefront and search with explicit freshness targets, safety-stock rules, oversell tolerance, country and fulfilment-node semantics.
Shadow-compare every SKU and warehouse against monolith for at least two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
Preserve monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete. Shift storefront and search availability reads progressively (1% → 10% → 50% → 100%).
Provide immediate fallback to monolith availability and a replayable file-recovery process. Keep the monolith read path live throughout.
14. Wave 1: Extract customer, identity, and loyalty service (Months 3–5) (depends on: 6, 8, 9, 12)
Move identity-adjacent data in bounded slices after privacy and consent rules are clear. This validates the full extraction playbook on a well-understood domain.
Define canonical customer identifier, consent model (across 8 countries), data-retention rules, subject-access and deletion workflows, and access-control rules. Build a customer service owning profile, authentication, and loyalty ledger.
Start with replicated profile and loyalty-balance reads. Compare records daily before moving writes. Migrate sessions without forced logouts: mobile and web keep the same cookies or tokens.
Move loyalty in slices: balance inquiry before accrual or redemption, using a ledger model with daily reconciliation. Route via feature flags (1% → 10% → 50% → 100%). Rollback is a single flag flip with monolith auth restored without password resets.
Maintain a staffed exception process for mismatched data-subject requests and loyalty records.
15. Post-peak 1 strategic review and capacity rebalancing (Month 3) (depends on: 4, 12, 13, 14)
After January peak (or equivalent), conduct a formal review of migration progress and adjust the roadmap.
Measure actual versus planned: Did pricing archaeology take 2 months or 4? Did inventory adapter pass its reliability gate? Which services exceeded capacity?
Review the outstanding roadmap features. Assess whether 30% migration capacity is sustainable. For any significant slip, reforecast the programme. Adjust the timeline and/or throttle later waves.
Formalise decisions on which capabilities will remain in a façade (delegating to the monolith) if full ownership transfer cannot be safely completed by month 12. Update the steering committee, business sponsors, and affected teams.
This review determines whether Waves 3 and 4 proceed as planned or are restructured.
16. Wave 2: Extract pricing service and promotion evaluation (Months 4–9, shadow until 8) (depends on: 10, 12, 13)
Rebuild the highest-risk module using the documented rule set from S10. Run in shadow mode for 4–6 weeks until parity is proven.
Build a pricing service with a rules engine; encode rules from S10 as configuration, not hard-coded logic. Expose synchronous price-calculation API (called by cart/checkout) and asynchronous promotion evaluation (event-driven).
Run the service in shadow: every pricing request is sent to both the monolith and the new service. A comparator flags every discrepancy. Alert on any mismatch; classify by financial impact. Require business sign-off before moving each rule slice.
Begin traffic shifting via feature flags only after discrepancy rate is < 0.01% for two full weeks (including a weekend). Require merchandising and finance approval for each slice. Target at least 99.99% exact parity on golden-master and production-shadow cases.
If full engine extraction is unsafe inside 12 months, the independently deployable artefact is the façade plus proven slices. Keep monolith pricing logic deployable as rollback for 90 days. Country-specific rules move last, one market at a time if needed.
17. Wave 2: Extract order-query and returns slices (Months 5–8) (depends on: 8, 13, 14)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction prematurely.
Publish reliable order lifecycle events from the monolith using the outbox pattern. Build an order-query service for self-service, customer support, notifications, and selected back-office reads. Display freshness labels and maintain a legacy support fallback.
Extract bounded returns workflows (initiation, tracking, notification) where ownership boundaries are explicit. Preserve order creation, payment capture coordination, cancellation authority, and refund authority in the monolith until checkout cutover gates pass.
Backfill historical orders into the service with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and refunds daily against the monolith. Run a 60-day dual-read validation window.
Keep legacy back-office order screens as fallback until the new portal is stable.
18. Wave 2: Payment-provider adapters and financial reconciliation (Months 5–8) (depends on: 6, 8, 9)
Isolate provider-specific complexity before changing checkout orchestration. Wrap, do not rewrite.
Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, provider-specific retries, and controlled fallback behaviour.
Introduce a payment ledger and daily reconciliation covering authorisations, captures, refunds, chargebacks, settlements, and order states. Validate using provider sandboxes, recorded non-sensitive production outcomes, and failure injection. Do not mirror live payment commands.
Preserve existing customer-facing error messages, country and payment-method routing, and PCI/provider contracts. Make rollback safe: accepted payment attempts retain the same idempotency key and original completion path on rollback.
Agree peak rate limits, escalation contacts, and outage runbooks with all three providers by month 6.
19. Pre-peak 2 readiness certification (Month 6, before July) (depends on: 5, 9, 12, 13, 14)
Certify the hybrid estate and every fallback path before July peak. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
Freeze new cutovers and traffic increases for the six weeks before the peak. Continue feature work behind flags.
Run full-path load, soak, spike, and failover tests at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, live services (search, catalogue, customer, inventory), event platform, databases, payment adapters, warehouse integration, and provider sandboxes.
Test traffic reversion from each service to the monolith and confirm that the monolith, database, and legacy search can absorb reverted load. Run chaos games: kill pods, inject latency, simulate provider outage, replay warehouse files.
Obtain formal go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, and customer support. Any component that fails blocks entry into the peak window.
20. Wave 3: Cart, checkout façade, and orchestration (Months 8–11, defer ownership transfer) (depends on: 13, 16, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith executes the write.
Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys. Build a checkout façade that initially delegates to legacy commands. Route web and mobile gradually with response compatibility.
Add checkout durable attempt state, idempotency keys, explicit compensation paths, support procedures, and reconciliation for ambiguous payment, stock, and order outcomes.
Move cart reads and writes first with one command owner and daily reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
Canary by country and payment method starting at 1%. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support thresholds are met.
If ownership transfer is not safe before the next sales window, retain the façade delegating to the monolith. Defer transactional split to post-July review and a funded follow-on programme.
21. Wave 3: Order service and post-purchase workflows (Months 9–11) (depends on: 8, 14, 17, 20)
Move post-purchase order lifecycle and returns processing into dedicated services once checkout is stabilised and events are reliable.
Publish reliable order lifecycle events from the checkout/command owner using the outbox pattern. Build an order service consuming order-placed events, owning order state machine, fulfilment tracking, and returns workflow.
Build a returns service owning return requests, labels, refund settlements, and status, integrating with order, inventory, and payment services via APIs and events. Migrate order and returns tables via CDC; reconcile daily during a 60-day dual-run window.
Backfill historical orders and run reconciliation. Back-office order views call the new service API through the gateway; legacy views remain as fallback.
Validate that returns processing (including cross-border returns across 8 countries) works identically. Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
22. Modernise back-office and storefront integration (Months 9–12) (depends on: 12, 16, 17, 20, 21)
Move 300 staff users by workflow and role, not through a high-risk replacement of the entire admin system. Update the storefront to consume the service layer.
Deliver domain-specific back-office screens (BFF) for catalogue, order-query, returns, inventory, and customer domains. Start with read-only views. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
Run old and new screens in parallel per workflow (4 weeks minimum). Provide training, floor support, and direct fallback. Remove direct SQL access to migrated data; replace necessary reports with governed read models.
Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith directly. Ensure the mobile app switches to the new API version; enforce backward compatibility for two app-release cycles.
Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations through automated E2E tests. Decommission legacy back-office screens only after 30 days of stable operation.
23. Transfer data ownership through single-writer cutovers and retire legacy paths (Months 11–12) (depends on: 8, 12, 13, 14, 16, 18, 20, 21, 22)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
For each entity, document source of truth, writer sequence, replication direction, API consumers, reconciliation thresholds, and rollback point. Use expand-contract schemas, backfills with checksums, dual-read validation, and carefully bounded write cutovers.
Route writes through one command owner that publishes changes reliably to dependents. Reconcile continuously by identifiers, row counts, hashes, financial totals, and business state transitions. Financial discrepancies halt expansion immediately.
Rewrite stored procedures with characterization harness coverage; never cut procedures until logic has equivalent test harness. Shrink the database as tables go dark. Retain legacy read access and compatibility APIs until all consumers migrate.
Schedule high-risk ownership moves outside sales windows with rehearsed rollback and staffed hypercare. After 30 days of zero unplanned downtime with 100% traffic on services and both peaks passed, begin decommission: archive monolith DB, retire temporary replication, remove flags, and establish quarterly architecture reviews, governance, and resilience testing.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback or recovery action; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first-time cutover, command-ownership transfer, destructive schema change, payment change, or traffic expansion occurs from six weeks before through two weeks after each January and July sale.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid topology and all live fallback paths pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed baseline. There is no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, a pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Each independently deployable capability has a named team, weekly or better compatible release cadence, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- No extracted service directly writes another service database. No new cross-context joins or stored-procedure coupling are introduced. Each transferred entity group has one command owner.
- Each ownership cutover has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for payment, refund, tax, price, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice reaches at least 99.99% exact parity on approved golden-master and production-shadow cases, with zero unresolved monetary discrepancies and written finance and merchandising approval.
- All critical price, payment, order, refund, stock, and loyalty invariants have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one service recovery or rollback completes within 30 minutes.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront contracts remain compatible throughout, with no forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback available during each workflow transition.
Steps (18):
1. Charter the programme and protect both sales peaks
Set the programme goal as independently deployable domain capabilities with safe coexistence, not a forced 12-month monolith shutdown.
- Appoint an accountable programme director, chief architect, SRE/operations lead, and business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a September-to-August delivery calendar. Protect January and July with a six-week pre-sale and two-week post-sale window. Ban first cutovers, write-owner changes, destructive schema changes, payment changes, and traffic expansion in those windows.
- Reserve capacity per team: 50% roadmap, 30% migration, and 20% quality, reliability, and operational work. Feature work continues behind flags.
- Require a named command owner, business owner, measurable entry and exit gates, rollback or recovery design, and operations approval for every production change.
- Ban big-bang replacement, distributed transactions, direct cross-service database writes, uncontrolled dual writes, and irreversible cutovers.
- Create a weekly steering forum, daily migration dependency board, decision log, risk register, and escalation process. Give operations authority to halt a rollout.
2. Baseline behaviour, dependencies, data, and peak capacity (depends on: 1)
Create the evidence base required to decide what can safely move, what must remain delegated, and what the legacy fallback must sustain.
- Trace the top customer, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, support, and reporting journeys across Java modules, endpoints, all 350 tables, stored procedures, triggers, and cross-module joins.
- Inventory every table and procedure by current writers, readers, business concept, personal-data class, retention obligation, country use, and coupling risk.
- Measure normal and sale-period demand by country, language, currency, channel, payment method, and endpoint. Record latency, errors, conversion, order completion, approval rates, PostgreSQL saturation, Lucene rebuild performance, file lag, and recovery time.
- Define and obtain business sign-off for invariants: exact price, tax, and promotion behaviour; no duplicate payment or order; stock reservation and oversell rules; refund and loyalty-ledger integrity; warehouse-file completeness; GDPR subject-right handling.
- Produce production-shaped anonymised fixtures, recorded request traces where lawful, and a repeatable 12x sales load profile with agreed headroom.
- Score extraction candidates using coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.
3. Set boundaries, ownership rules, and realistic year-one scope (depends on: 2)
Define a target that avoids creating a distributed monolith and makes the 12-month commitment credible.
- Establish bounded contexts: edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing and promotions, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign a current and future owner, team, source of truth, data classification, and command authority for each entity group.
- Define entity transition states: legacy command owner; replicated read model; shadow-validated route; service command owner with compatibility adapter; and legacy retired.
- Standardise API and event policies: versioning, correlation IDs, authentication, deadlines, idempotency keys, retries, auditability, schema compatibility, and deprecation.
- Set the year-one exit scope: independently deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades.
- Treat transfer of pricing, stock reservation, loyalty redemption, core checkout, and order-command ownership as conditional. If evidence gates fail, retain the legacy command behind an independently deployable façade.
4. Build operational control and the behavioural safety net (depends on: 2)
Instrument the old and new paths before routing meaningful traffic. Behaviour on high-risk seams becomes executable evidence rather than tribal knowledge.
- Add OpenTelemetry, correlation IDs, structured logs, RED metrics, real-user monitoring, synthetic journeys, and business events to storefront, mobile, back office, jobs, warehouse exchange, and payments.
- Define SLOs and error budgets for browse, search, product detail, quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side dashboards for legacy versus replacement outcomes, segmented by country, currency, language, cohort, provider, and release version.
- Alert on business failures, including price mismatch, payment without order, order without payment, inventory discrepancy, failed file, event lag, refund mismatch, and abnormal search quality.
- Add characterisation tests before changing candidate modules, stored procedures, scheduled jobs, payment callbacks, and customer-facing contracts.
- Build a production-like test environment with anonymised data, warehouse-file simulators, payment-provider simulators, and automated end-to-end, contract, load, soak, failover, and chaos tests.
- Require 100% automated scenario coverage for defined money, stock, refund, order, and loyalty invariants. Require at least 80% coverage on changed migration code.
5. Create the paved road and make the monolith safe to coexist (depends on: 3, 4)
Build only the platform capabilities needed to release services safely, while creating stable seams in the monolith without pausing feature delivery.
- Deliver a service template with health and readiness checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent message handling.
- Create independent CI/CD pipelines with build provenance, dependency and container scanning, contract tests, smoke tests, promotion controls, and auditable financial-change approvals.
- Introduce feature flags, progressive delivery, blue-green or canary deployment, kill switches, and automated SLO-based rollout halt or rollback.
- Provision infrastructure through code. Size runtime, caches, databases, gateway, and event platform for 12x load plus headroom. Apply network policies, encryption, least privilege, PCI assessment, and GDPR controls.
- Enforce package boundaries, code ownership, and architecture tests in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-module joins, direct cross-domain table access, and stored-procedure coupling. Use additive expand-contract schema migrations only.
- Prove backward-compatible online deployment and connection draining in the monolith. Do not make Java modernization or repository splitting a prerequisite for extraction.
6. Install edge routing with safe fallback semantics (depends on: 4, 5)
Decouple web, mobile, and back-office clients from implementation placement. A read-route rollback must be a configuration change, not a redeployment.
- Put a gateway and selective BFF façade in front of existing endpoints without changing initial behaviour.
- Preserve URL, mobile API, cookie, token, session, locale, currency, error, cache, and server-rendered storefront contracts. Do not require a mobile release for backend migration.
- Route by endpoint, country, cohort, flag, and percentage. Keep the monolith as the default route until promotion criteria are met.
- Permit mirroring only for safe reads or explicitly idempotent non-financial requests. Never duplicate live payment, checkout, order, refund, or other customer-visible commands.
- Rehearse route rollback, request draining, session continuity, cache bypass, gateway failure, and full-load reversion to legacy. Demonstrate rollback within five minutes.
- For command routes, define in-flight semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back.
7. Establish events, replication, and reconciliation as a product (depends on: 3, 5)
Build the coexistence spine before moving data or command ownership. Replication supports reads; it never creates ambiguous command ownership.
- Deploy a governed event platform with access control, schema registry, compatibility checks, retention, replay, dead-letter processing, consumer ownership, and capacity proven at peak event volume.
- Add transactional outbox publication to selected monolith writes and all new services. Use CDC only as a monitored temporary bridge with a named replacement date.
- Provide resumable backfill, checkpoints, lag monitoring, hashes, counts, financial totals, stock totals, record-level comparison, and staffed exception queues.
- Standardise idempotent consumers, duplicate and out-of-order event handling, anti-corruption adapters, circuit breakers, bulkheads, timeouts, and retry policy.
- Publish a single-writer cutover procedure. Routing a command back is insufficient; every previously accepted command must complete or enter an auditable business exception workflow.
- Test replay, poison messages, delayed events, duplicate events, and reconciliation under projected peak volume.
8. Run pricing archaeology and deploy a legacy pricing façade (depends on: 2, 4, 5, 7)
Treat pricing as a behaviour-preservation programme. Do not start with a 200,000-line rewrite.
- Form a protected cross-functional pricing squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, tables, campaigns, overrides, jobs, manual back-office actions, tax inputs, feature flags, and country-specific exceptions.
- Capture privacy-safe input and output decision traces. Build a golden-master corpus spanning all countries, currencies, languages, dates, baskets, customer segments, vouchers, stacking, tax, inventory states, and campaign lifecycle cases.
- Place the current evaluator behind a versioned pricing façade. New callers use the façade even when it delegates in-process to legacy logic.
- Build an exact comparator for price, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Create a machine-readable rule catalogue. Classify rules into movable slices, permanent legacy delegates, and inactive rules that need documentation rather than reimplementation.
- Require written merchandising and finance acceptance of current observable behaviour before a slice is replaced.
9. January peak gate: freeze risk and certify the initial hybrid estate (depends on: 4, 5, 6, 7)
Because a September start leaves limited time before January, the first season is a protection milestone, not a deadline for major domain extraction.
- Limit pre-January production scope to operational foundations and only low-risk, fully rehearsed read improvements. Defer any unproven service route to after the sale.
- Six weeks before the actual sale date, stop first cutovers, traffic expansion, write-owner changes, payment changes, and destructive database work.
- Load, spike, soak, and failover test the actual topology at 12x observed demand plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Rehearse complete reversion from every live route. Prove the monolith and legacy dependencies can absorb all returned traffic.
- Run game days for gateway failure, cache failure, database failover, event lag, warehouse-file delay, and payment-provider outage.
- Obtain written go/no-go sign-off from engineering, operations, commerce, finance, warehouse, payments, support, and country operations. Continue only reversible defect fixes during the protection window.
10. Extract search and catalogue read models after January (depends on: 6, 7, 9)
Use read-heavy, non-authoritative capabilities to prove the complete extraction playbook without changing financial or inventory command ownership.
- Build catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith initially.
- Replace nightly Lucene rebuilds with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, explicit cache policy, and controlled reindexing.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability read models only.
- Shadow-compare content, localisation, ranking, facets, zero-result rate, availability display, latency, and conversion against legacy.
- Promote through employee traffic, low-risk country cohorts, then measured percentages. Stop automatically on SLO, search-quality, or reconciliation breaches.
- Retain the legacy catalogue path and a warm Lucene fallback through the July sale. Give the service independent deployment, on-call, dashboards, runbooks, and rollback drills.
11. Wrap warehouse exchange and extract inventory availability reads (depends on: 6, 7, 9, 10)
Separate file handling and customer availability from reservation authority. Preserve the warehouse contract and legacy allocation logic until transactional gates are met.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files.
- Publish inventory facts and create availability read models with explicit fulfilment node, country, safety-stock, freshness, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every file, SKU, warehouse, and availability response. Train operations staff to resolve exceptions.
- Progressively move storefront and search availability reads only after delayed-file, duplicate-file, malformed-file, replay, and fallback tests pass.
- Keep reservation, allocation, warehouse export, and stock-adjustment command authority in the monolith.
- Demonstrate no increase in oversell attributable to the new path compared with the existing 15-minute process.
12. Extract customer, consent, and low-risk loyalty slices (depends on: 6, 7, 9)
Move customer capabilities in slices that preserve privacy rights and session continuity. Do not move financially meaningful loyalty commands until ledger reconciliation is proven.
- Define canonical customer identity, session compatibility, consent, retention, subject access, deletion, address, access-control, and country-specific obligations.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily.
- Move profile writes through one idempotent command route and a compatibility adapter. Preserve existing browser and mobile sessions without password resets or forced logout.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual, redemption, or partner settlement.
- Maintain a staffed exception process for data-subject requests, consent mismatches, and loyalty discrepancies.
- Retain immediate route fallback and independent service operational ownership for every released slice.
13. Deliver order queries, notifications, and bounded returns (depends on: 6, 7, 11, 12)
Create post-order independently deployable value while the legacy system remains command owner for order creation, financial refund, and warehouse export.
- Publish reliable order lifecycle facts using the outbox from the current command owner.
- Build order-query read models for customer self-service, support, notifications, and selected back-office views. Display freshness where data is eventually consistent.
- Extract return initiation, return status, labels, and non-financial communication only where ownership and exception handling are explicit.
- Backfill historical records in resumable batches with checksums. Reconcile order counts, state transitions, return states, notifications, and event lag continuously.
- Keep legacy routes available as immediate fallback. Retain cancellation, refund authority, payment-capture coordination, and warehouse order export in the monolith.
- Validate cross-border return journeys and all country, currency, and language combinations before traffic expansion.
14. Isolate payment providers and introduce financial controls (depends on: 4, 6, 7, 13)
Make provider integration independently deployable before moving checkout orchestration. Financial commands are not shadowed in live production.
- Wrap each of the three providers in a versioned adapter with token handling, callback verification, idempotent authorisation and capture, provider-specific timeout policy, and controlled retries.
- Create a durable payment-attempt state machine and payment ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and associated order state daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts, and failure injection. Preserve current payment-method and country routing.
- Define in-flight rollback: an accepted payment retains its idempotency key and completion path; only new attempts take the fallback route.
- Agree peak rate limits, escalation contacts, outage procedures, and reconciliation-file timing with all providers.
- Keep PCI scope controlled. Do not expose raw payment data to new services unless explicitly required and approved.
15. Move proven pricing slices and introduce cart and checkout façades (depends on: 8, 11, 12, 14)
Separate deployability from ownership transfer on the revenue path. The façade initially delegates to legacy commands and pricing rules that are not proven remain delegated.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approvals, and pricing decision audit trails.
- Shadow-evaluate applicable price requests. Promote a slice only after at least 99.99% exact parity over golden-master and two full weeks of production shadow traffic, zero unresolved monetary differences, capacity evidence, and finance and merchandising approval.
- Keep a per-slice route-back switch and retain legacy execution through at least the following relevant sale period.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory-check semantics, and client retry behaviour.
- Deploy cart and checkout façades with preserved web and mobile contracts. Initially delegate commands to the monolith.
- Add durable checkout-attempt state, idempotency keys, compensation and exception procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes only under a single command owner with reconciliation of active, abandoned, merged, and promotional carts. Move checkout orchestration only if all explicit ownership gates pass.
16. July peak gate: certify the expanded hybrid topology (depends on: 10, 11, 12, 13, 14, 15)
Treat July as a formal revenue-protection gate. Enter the sales window only with routes and fallback paths proven for the topology actually in production.
- Freeze new risk six weeks before the sale. If pricing or checkout ownership gates are incomplete, keep the façades delegating to legacy through the peak.
- Run full-path load, spike, soak, failover, and rollback testing at 12x demand plus headroom across gateway, CDN/cache, monolith, PostgreSQL, services, search, event platform, warehouse adapter, and all payment paths.
- Test full traffic reversion from every live route and prove fallback capacity, database connection limits, cache warm-up, autoscaling limits, and provider quotas.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, price-path failure, provider outage, and flag or gateway failure.
- Reconcile price, order, stock, payment, refund, and loyalty outcomes at expected sale volume. Pre-scale and staff incident command and business support.
- Require formal sign-off from the same cross-functional group used for January.
17. Transfer only evidence-backed ownership and migrate back-office workflows (depends on: 13, 15, 16)
After July, make selective single-writer transfers where the service has earned ownership. Move the 300 staff users by workflow rather than replacing the full back office.
- For every proposed entity cutover, document source of truth, writers, readers, procedures, consumers, backfill checkpoint, retention, reconciliation threshold, rollback semantics, support process, and accountable on-call team.
- Backfill with checksums, validate replication and dual reads, then switch one command route. Never use unrestricted dual writes or cross-database joins.
- Transfer low-risk ownership first, such as selected customer profile writes, catalogue administration where ready, bounded return commands, and cart state. Keep core pricing, reservation, checkout, order, refund, and loyalty-redemption commands delegated unless their gates are met.
- Rewrite stored procedures only after characterisation evidence proves equivalent service implementation. Retain rollback-compatible tables and procedures through the agreed observation period.
- Migrate back-office read workflows first: catalogue, inventory, order query, return status, and customer support. Preserve role-based access, segregation of duties, country entitlements, approval controls, audit logs, exports, and reporting.
- Run old and new staff screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Replace direct SQL reporting access with governed read models or controlled reporting exports as each domain migrates.
18. Consolidate the sustainable hybrid estate and publish follow-on scope (depends on: 17)
Close the year by removing only paths that are demonstrably obsolete. The correct outcome is a safe, operable service estate, even if critical legacy command logic remains.
- Verify every released capability has an independent pipeline, named owning team, SLOs, dashboards, runbooks, capacity model, on-call, disaster-recovery procedure, and rehearsed rollback or recovery path.
- Retire a legacy route, table, procedure, replication stream, or flag only after all consumers move, reconciliation is clean, rollback retention expires, and a relevant peak or equivalent capacity test passes.
- Archive data and code required for tax, financial, audit, and GDPR purposes. Maintain controlled read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time, and operational toil.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock reservation, refund, or loyalty ownership that properly remains in the monolith.
- Conduct a programme review with business and technical stakeholders. Update architecture governance, API and event lifecycle controls, resilience testing, and quarterly capacity reviews.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion inside the defined January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- The hybrid estate, including monolith fallback and Postgres connection headroom, passes full-path load and reversion tests at 12x plus headroom before each sale.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade (plus any proven rule slices), and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, and peak-capacity gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, or order-total discrepancies.
- Extracted services make zero writes to another service database and zero stored-procedure calls after ownership transfer. No new cross-context joins.
- Mobile and storefront keep compatible endpoints throughout. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
Steps (20):
1. Charter the programme around peaks, money, and rollback
Create a delivery model that treats peak trading, money integrity, and reversibility as non-negotiable.
Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity: **50% roadmap**, 30% migration, 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion for six weeks before through two weeks after.
- Freeze means no new migration risk, not a feature freeze. Proven features may still ship behind dormant flags.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Give operations veto on search, stock, checkout, and payments. Name rollback authority for every production step.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only.
2. Baseline the live system and freeze business invariants (depends on: 1)
Measure the live estate before changing it.
This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, the 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Capture invariants: price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce a coupling heat map and an extraction scorecard. Keep a production-shaped anonymised dataset for repeatable tests.
3. Set honest year-one boundaries and non-goals (depends on: 2)
Agree a pragmatic target. Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Map each domain to one of the five existing teams. Do not create more independently deployable units than those teams can operate and on-call.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one done means named services can deploy alone, with owners, SLOs, and practised rollback.
- In-scope if evidence allows: search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus proven rule slices, cart and checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transactional command ownership transfers only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and define journey SLOs (depends on: 1, 2)
Make the existing estate observable before any production traffic moves.
You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road for independent deployment (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove online, backward-compatible monolith deploys so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a **Postgres connection budget** for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
Prioritise affected journeys over a blanket line-coverage target.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised, production-shaped fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- Raise regression coverage on any module before it is touched. New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
- Put a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, and full-load reversion to the monolith before any business endpoint moves.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility.
Services subscribe to facts. They do not call each other's databases.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached.
- Financial discrepancies require immediate investigation. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and put a façade in front of the engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions.
- Put the existing engine behind a versioned pricing façade. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Season 1: extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock. They consume versioned read models from their owners.
- Keep the old Lucene index warm through the next sale as standby.
13. Season 1: wrap warehouse files and extract availability reads (depends on: 10, 12)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, and malformed files under peak load.
14. Season 1: extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
15. Certify the first peak on the real hybrid estate (depends on: 6, 8, 12, 13)
Certify whatever is live, and every fallback, before the first of January or July.
A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.
- Run game days for provider timeout, CDC lag, flag revert, search fallback, and stock-file delay.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
16. Season 2: dual-run only proven pricing slices (depends on: 11, 12, 15)
Run a candidate evaluator in shadow until it matches the monolith on live baskets.
Checkout keeps monolith prices until the money path is clean.
- Extract only well-understood slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing.
- Shift read traffic first, then promo-usage writes, country by country if needed. Keep a per-slice route-back switch.
- Target at least 99.99% exact parity on golden-master and production-shadow cases before any customer-facing slice.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
17. Season 2: order-query slices and payment-provider adapters (depends on: 9, 14, 15)
Create independently deployable post-order value and isolate provider complexity without splitting the revenue-critical create-order transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily.
- Do not mirror live payment commands. In-flight attempts keep the same idempotency key and completion path on rollback.
- Keep order creation, capture coordination, cancel, refund authority, and warehouse export in the monolith until S18 gates pass.
- Keep PCI scope inside the existing boundary. Do not expand it by copying card data into new stores.
18. Season 2: cart and checkout façades, then only proven orchestration (depends on: 13, 16, 17)
Strangle the transactional path without a big-bang rewrite.
Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
19. Certify the second peak and rehearse full-load reversion (depends on: 15, 16, 17, 18)
Repeat certification before the second sale with more services in the path.
Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
20. Move back-office by workflow, transfer writes only where proven, and hand over a durable hybrid (depends on: 18, 19)
Move the 300 staff users by workflow and role, not by replacing the whole admin application.
Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Publish the funded follow-on roadmap for any core pricing, checkout, or order ownership that correctly remained in the monolith.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production cutover has a documented, rehearsed rollback; route rollback completes within 5 minutes, and migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- January and July sales complete with at least pre-migration availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests.
- Feature delivery continues at no less than 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query and returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office workflows are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed APIs or versioned events.
- Each ownership cutover has one command owner; unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty paths have 100% automated scenario coverage; changed migration code has at least 80% coverage and every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Mean time to detect critical customer-journey failures is under 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible service releases deploy at least weekly, then daily where risk is low, without the monolith maintenance window.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all 8 countries, with no forced logouts or password resets attributable to migration.
Steps (23):
1. Programme governance, peak-protection calendar, and team capacity
Establish the governance, capacity model, and peak-protection calendar before any technical change. Feature work continues throughout behind flags.
- Appoint one programme lead, one chief architect, operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and each country.
- Publish the 12-month calendar in week one. Mark six-week freeze before, during, and two weeks after each January and July sale: no first-time cutover, schema split, payment change, or traffic expansion.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and operational hardening. Only steering may rebalance.
- Ban big-bang rewrites, uncontrolled dual writes, distributed transactions, and irreversible cutovers. Every production step requires a rehearsed rollback.
- Define stop/go criteria, a named rollback authority per domain, risk register, dependency board, and weekly engineering-business steering meeting.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the current system before changing it. This baseline is the reference for capacity, correctness, and rollback.
- Trace the top 30 customer and back-office journeys through modules, tables, stored procedures, queues, file exchanges, payment providers, and external dependencies.
- Inventory all 350 tables and stored procedures by owner, readers, writers, sensitivity, retention, GDPR obligations, and cross-module joins.
- Record normal and 12x peak load by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99, errors, conversion, payment approval, database saturation, Lucene rebuild time, inventory lag, and recovery time.
- Capture non-negotiable invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness.
- Produce anonymised production-shaped fixtures and a repeatable peak-load profile for later testing.
3. Target architecture, bounded contexts, and honest 12-month scope (depends on: 2)
Define the target architecture and extraction sequence. Independently deployable services are the goal; full monolith retirement is not a 12-month promise unless every safety gate passes.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, back-office workflow.
- Assign one system of record and owning team per entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Use outbox, idempotent consumers, compensation, reconciliation, and business-visible exception queues.
- Define entity transition states: monolith-owned, replicated read, dual-run validated, service command owner, legacy retired.
- Agree year-one exit scope: search, catalogue reads, inventory availability, customer/profile/loyalty slices, order-query/returns slices, payment adapters, pricing façade with proven rule slices, cart/checkout façade, and back-office by workflow. Transfer core transactional ownership only where evidence gates pass.
- Sequence extraction by risk and coupling: read-heavy and already-async seams first; pricing and checkout delayed until dual-run and peak tests prove parity.
4. Observability, SLOs, and business-failure alerting (depends on: 2)
Make the existing monolith observable before moving traffic. Define SLOs and alert on business outcomes, not just infrastructure.
- Add structured logs, RED metrics, distributed tracing, correlation IDs, synthetic journeys, and real-user monitoring across storefront, mobile, and back-office.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Build dashboards comparing legacy and replacement paths with country, currency, language, payment provider, cohort, and release-version dimensions.
- Alert on customer and financial failures: price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, zero-result drift.
- Establish error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Store immutable audit events for pricing, promotion decisions, payments, order state, stock changes, and GDPR actions.
5. CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Build the paved road for independently deployable services: CI/CD, feature flags, canary/blue-green, and a secure runtime sized for 12x peak.
- Provide service templates with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox publishing, and idempotent message handling.
- Create per-service CI/CD with build provenance, dependency scanning, unit, integration, contract, smoke, and performance gates, plus approval controls.
- Implement a feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag.
- Implement canary and blue-green deployment with automated SLO-based rollback. Provision Kubernetes with namespaces per bounded context, autoscaling, and resource quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope assessment, and GDPR controls. Prove online backward-compatible monolith deployments to remove the 30-minute maintenance dependency.
6. Strangler gateway and route-based rollback (depends on: 4, 5)
Decouple clients from monolith internals with an API gateway and strangler façade. Default all traffic to the monolith; rollback is a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of storefront, mobile, and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag, and percentage. Preserve cookies, sessions, localization, currencies, headers, and mobile API compatibility.
- Support traffic mirroring for safe read-only or idempotent shadow calls. Never mirror customer-visible commands or payment requests.
- Rehearse instant route rollback, in-flight draining, cache bypass, session continuity, and full-load reversion to monolith. Rollback must complete in minutes.
- Measure baseline response equivalence and gateway latency overhead before extracting any endpoint.
7. Monolith modularisation and test hardening (depends on: 2, 3, 4, 5)
Create internal seams and stronger tests before extracting. The monolith remains the production dependency for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk database access behind repository/application interfaces.
- Use expand-contract schema migrations only: additive first; destructive later only with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration. New features must use the new seams, not bypass migration.
- Raise characterisation coverage on critical journeys before touching them.
8. Event backbone, outbox, CDC, and reconciliation (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. One command owner per entity; services subscribe to facts, not databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay tooling, and consumer ownership.
- Add transactional outbox publishing in the monolith and new services. Use CDC only where outbox cannot yet be added, with a dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries, and correlation IDs.
- Build a reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and exception queues.
- Define and enforce the one-writer rule: the monolith write wins on conflict until ownership is deliberately transferred.
9. Characterisation, contract tests, and 12x load harness (depends on: 2, 4, 5, 7)
Build the behavioural safety net: characterisation tests, contract tests, and a 12x load harness. Confidence comes from evidence, not fortnightly releases.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office workflows.
- Add characterisation tests around APIs, stored procedures, pricing rules, and checkout flows before modifying them.
- Add consumer-driven contracts between monolith and future services, and between mobile/storefront and backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run before every traffic expansion and peak.
10. Pricing archaeology and golden-master corpus (depends on: 2, 7, 9)
Run pricing archaeology in parallel with foundation work. Do not rewrite 200k lines until behaviour is captured in a golden-master corpus.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and external inputs.
- Capture privacy-safe production decision traces into a golden-master corpus across countries, currencies, dates, customer segments, baskets, vouchers, stacking, tax, and edge cases.
- Produce a machine-readable rule catalogue and classify rules into universal, country-specific, campaign/temporary, and dead rules not fired in 24 months.
- Put the existing engine behind a versioned pricing façade; new callers use the façade even while it delegates to legacy logic.
- Build a shadow evaluation harness to compare candidate outputs exactly. Require business and finance sign-off on current observable behaviour.
11. Modernise warehouse integration without changing contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing the warehouse contract. Publish inventory events from the existing file exchange while preserving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound/outbound SFTP files.
- Publish inventory change events to Kafka and build an availability read model with explicit freshness, safety stock, fulfilment node, country, and oversell semantics.
- Run the adapter alongside the legacy job. Reconcile every SKU, warehouse, file, and availability result.
- Handle delayed files, duplicate files, malformed files, replay, and event lag under peak load.
- Keep monolith stock reservation and warehouse export authority; the new service handles reads only.
12. Wave 1: Extract catalogue read service and modern search (depends on: 6, 8, 9)
Extract the first customer-facing read-heavy services: catalogue and search. Prove platform, routing, replication, and rollback before touching the money path.
- Build a catalogue read service fed from monolith-owned catalogue data via outbox or controlled replication. Keep catalogue command ownership in the monolith initially.
- Deploy a search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis, and fallback to the existing Lucene index.
- Shadow-compare product content, availability display, ranking, facets, zero-result rate, latency, and conversion for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort. Keep the monolith route and old Lucene index warm through the next sale.
- Search/catalogue must not be authoritative for price or stock. Rollback is a route change with latency overhead < 50 ms.
13. Wave 2: Extract customer accounts, identity, and loyalty (depends on: 6, 8, 9, 12)
Extract customer accounts, identity, and loyalty in bounded slices. Preserve sessions, consent, and GDPR rights throughout.
- Define canonical customer identity, session compatibility, consent, retention, subject-access, deletion, and access-control rules across the 8 countries.
- Start with replicated profile, address, consent, and loyalty-balance reads. Reconcile records and balances daily before any writes.
- Move profile writes through one idempotent command path with a compatibility adapter. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption; keep legacy financial-impacting commands until reconciliation is consistently clean.
- Route traffic via feature flags 1% → 10% → 50% → 100%. Rollback restores monolith authentication with no password resets or forced logouts.
14. Wave 2: Extract inventory availability reads (depends on: 6, 8, 9, 11)
Extract inventory availability reads while leaving reservation and warehouse export authority in the monolith.
- Build an inventory availability service consuming events from the warehouse adapter (S11). Own the read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against the monolith for at least two weeks; reconcile every discrepancy before traffic expansion.
- Provide immediate fallback to monolith availability. Ensure no extra oversell versus today's 15-minute lag.
- Move reads gradually by country. Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Prove no oversell increase before any sale.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 9, 11, 12, 13, 14)
Certify the real hybrid estate before the first January or July peak that falls inside the programme. Do not enter a sale with unproven routes or rollback paths.
- Freeze new cutovers and traffic increases in the six weeks before and two weeks after the peak.
- Load-test the current routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, and provider simulators.
- Rehearse reversion of every live service (search, catalogue, customer, inventory) to the monolith; confirm the monolith and 1.2 TB PostgreSQL can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, and staff a war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support.
16. Wave 3: Extract pricing and promotions service behind the façade (depends on: 10, 12, 13, 14, 15)
Build pricing and promotions service behind the façade and run dual-run until parity is proven. Transfer only proven rule slices; keep the legacy engine as rollback.
- Implement a pricing service with a rules engine, encoding the rule catalogue from S10 as configuration rather than hard-coded Java.
- Expose synchronous price calculation for cart/checkout and asynchronous promotion evaluation for campaign changes.
- Run shadow mode for 6–8 weeks on real production requests. A comparator flags every discrepancy; classify and require business/finance sign-off.
- Promote a rule slice only after ≥99.99% parity over two full weeks including a weekend, with written sign-off for every accepted difference.
- Shift traffic by rule slice, country, and promotion type. Keep a per-slice route-back switch and the legacy engine compilable/deployable for 90 days.
- If full engine extraction is not safe within 12 months, the independently deployable façade plus proven slices is success.
17. Wave 4: Payment provider adapters and financial reconciliation (depends on: 6, 8, 9, 15)
Isolate payment providers behind versioned adapters and establish financial reconciliation before changing checkout orchestration. Do not mirror live payment commands.
- Wrap each of the three providers in a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific fallback.
- Introduce a durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states.
- Validate with provider sandboxes, recorded non-sensitive production outcomes, fault injection, and controlled internal cohorts. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback: accepted attempts retain the same idempotency key and completion path; only new attempts route differently.
18. Wave 5: Cart/checkout façade and progressive orchestration (depends on: 12, 13, 14, 16, 17)
Introduce cart/checkout façade then migrate orchestration gradually. Revenue-critical order creation remains in the monolith until failure-mode and peak tests pass.
- Define cart identity, guest-to-account merge, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Build a checkout façade that initially delegates to the monolith. Route web and mobile gradually with response compatibility.
- Move cart reads and writes first with one command owner and reconciliation. Then migrate checkout orchestration by country and payment method.
- Add durable checkout-attempt state, outbox events, explicit compensation paths, and support tooling for ambiguous outcomes.
- Canary only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass. Never make a first transaction ownership cutover inside a protection window.
- If gates are not met, retain the independently deployable façade delegating to legacy; that is an acceptable year-one outcome.
19. Wave 5: Extract order management, notifications, and returns (depends on: 8, 13, 14, 17, 18)
Extract order management, notifications, and returns once checkout emits reliable events. Reconcile continuously during dual-run.
- Publish reliable order lifecycle events from the current command owner using the outbox pattern.
- Build an order query service for self-service, support, notifications, and selected back-office reads. Display freshness where eventual consistency applies.
- Build a returns service for return initiation, tracking, notification, and non-financial enrichment. Keep refund authority in the monolith until ownership gates pass.
- Migrate order and returns tables via CDC with checksums; reconcile daily during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Rollback re-routes to the monolith with event replay ensuring no order is lost.
20. Peak readiness gate 2: certify before second sale (depends on: 15, 16, 17, 18, 19)
Certify the more complete hybrid estate before the second sale. Repeat 12x load, rollback, and game-day tests with pricing, payment, checkout, order, and returns live.
- Enforce the same six-week freeze before and two weeks after the peak. No first-time cutovers or traffic experiments.
- Run full-path 12x hybrid load and rollback-to-monolith tests on the then-current topology.
- Rehearse reversion for cart, checkout, payment, order, pricing, inventory, and search; confirm fallback paths can absorb full reverted load.
- Validate price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: provider outage, event lag, database failover, search fallback, warehouse file delay. Obtain formal sign-off from all stakeholders.
21. Migrate back-office by workflow and refactor storefront to services (depends on: 13, 16, 17, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to consume service APIs. Move staff without disrupting operations.
- Deliver domain BFFs and screens first for catalogue reads, order-query, return-status, inventory views, and customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, exports, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, and a one-click fallback. Retire a legacy screen only after 30 stable days.
- Refactor the server-rendered storefront to call services via the gateway instead of hitting monolith endpoints directly. Mobile switches to the new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search responses to protect services during 12x peaks. Validate all language/currency combinations; remove direct SQL access to migrated data.
22. Transfer data ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Do not delete legacy tables or procedures as part of initial transfer.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums, validate dual reads, then switch the single command writer to the service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when the characterisation harness proves equivalent service logic. Retain legacy compatibility through the observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with a rollback rehearsal, staffed hypercare, and an explicit business exception queue.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Decommission only proven-obsolete legacy paths and establish steady-state governance. Preserve rollback and audit evidence.
- Verify zero production requests route to the monolith for each domain for 30 consecutive days. Perform final data reconciliation and checksums.
- Retire temporary replication, CDC pipelines, feature flags, endpoints, tables, and stored procedures through controlled releases after the rollback-retention period.
- Archive legacy data and maintain documented read-only access for audit, tax, GDPR, and financial retention. Decommission monolith infrastructure only after both peaks have passed and stable service traffic is confirmed.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Confirm each service has named owners, on-call coverage, SLOs, runbooks, and tested rollback. Publish a funded follow-on roadmap for any core pricing/checkout/order ownership that safely remained in the monolith.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of migrated functionality. The remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter the programme: governance, peak calendar, team model, and non-negotiables
Establish the **revenue-protection delivery model** before any technical work. The programme must protect January and July sales, keep features shipping, and make every migration step reversible.
- Appoint one accountable programme lead, one chief architect, an operations lead, five named domain owners (one per business area), and business owners for pricing, finance, warehouse, payments, security/privacy, and each of the eight countries.
- Form a weekly steering committee with a recorded risk register, dependency board, and decision log. Define go/no-go criteria, rollback authority per domain, and an escalation path to the committee.
- Publish the 12-month calendar in week one. Mark hard protection windows: **six weeks before through two weeks after each January and July sale**, during which no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion occurs.
- Reserve team capacity: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only steering may rebalance. Feature delivery never stops.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Keep the five teams of eight on their current business areas. Add a thin platform pair of two to three senior engineers owning gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Define non-negotiable invariants: exact price and tax calculation, promotion eligibility and stacking, no duplicate payment or order, stock-reservation semantics, refund integrity, loyalty-ledger correctness, warehouse export completeness, and GDPR data-subject rights.
- If the first sale is fewer than 14 weeks from programme start, throttle the first wave to search, warehouse adapter, and observability only.
2. Baseline the live system: architecture, data, traffic, invariants, and extraction scorecard (depends on: 1)
Measure the estate before changing it. This baseline is the **capacity, correctness, and rollback reference** for every migration wave.
- Run static analysis (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 million lines of Java and all 350 PostgreSQL tables. Map every stored procedure, trigger, scheduled job, and file exchange.
- Trace the top 30 customer and back-office journeys through modules, endpoints, tables, procedures, queues, warehouse files, and external payment providers. Record p50/p95/p99 latency, error rates, database load, Lucene rebuild duration, 15-minute inventory lag, payment approval rates, and recovery times at normal and 12x peak.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with more than two writers as highest-risk.
- Capture invariants as testable assertions: price and tax correctness per country, promotion stacking, no duplicate payment or order, reservation semantics, refund and loyalty ledger, warehouse file completeness.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.
- Capture production-shaped anonymised data and documented peak-load profiles for repeatable testing. This dataset becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a **pragmatic target architecture** based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record for every entity group. A service may hold a replicated read model but must never write another service's database.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned, replicated read, shadow-validated, service-owned with compatibility adapter, and legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, audit events, and deprecation rules.
- Set the year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Keep the legacy pricing engine and core order creation available behind compatible façades if ownership transfer is not proven safe by month 12.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services **observable before moving any production traffic**. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart operations p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes, not only infrastructure metrics: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and runtime (depends on: 3, 4)
Provide a **paved road** for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with **automated evidence** focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the **primary production system** for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping **current contracts intact**. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the **coexistence spine** that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. **One playbook** makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and put a façade in front of the legacy engine (depends on: 2, 7)
Treat the **200,000-line pricing module** as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a **read-heavy service off the money path**. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a **catalogue read service**. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability **without changing the warehouse contract** and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in **bounded slices**, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the **first of January or July** that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in **shadow until it matches the monolith** on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour **independently deployable before changing checkout orchestration**. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value **without splitting the revenue-critical order-creation transaction**.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. **Independent deployability of the façade is valuable** even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the **second sale** with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the **300 staff users by workflow and role**, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- Move commands only after the relevant service has accepted command ownership and all approval controls are proven.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only **genuinely obsolete paths** and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Step-level differences computed by the tool:
Proposal 1 vs the previous-round proposal it resembles most (deepseek-v4-pro_refine_4): 15 steps kept, added ['Charter programme with revenue-protection governance model', 'Instrument estate and establish SLOs before moving traffic', 'Build delivery platform: CI/CD, flags, canary, and secure runtime', 'Modularise live monolith without stopping feature delivery', 'Launch parallel pricing archaeology and place façade over legacy engine', 'Post-peak 1 review and roadmap adjustment (Month 3)', 'Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9)', 'Wave 2: Extract order-query, returns slices, and notifications (Months 5–8)'], removed ['Programme governance, peak-protection calendar, and team capacity', 'Observability, SLOs, and business-failure alerting', 'CI/CD, feature flags, progressive delivery, and secure runtime', 'Monolith modularisation and test hardening', 'Pricing archaeology and golden-master corpus', 'Wave 3: Extract pricing and promotions service behind the façade', 'Wave 4: Payment provider adapters and financial reconciliation', 'Wave 5: Extract order management, notifications, and returns']
Proposal 2 vs the previous-round proposal it resembles most (gpt-5.6-terra_refine_2): 11 steps kept, added ['Instrument journeys and establish operational control', 'Create the executable safety net', 'Adopt a mandatory extraction and cutover playbook', 'Wrap warehouse exchange without changing its contract', 'First-sale readiness gate', 'Extract inventory availability reads and customer read slices', 'Deliver order-query, bounded returns, and payment adapters', 'Second-sale readiness gate', 'Migrate back-office workflows by role'], removed ['Build operational control and the behavioural safety net', 'January peak gate: freeze risk and certify the initial hybrid estate', 'Wrap warehouse exchange and extract inventory availability reads', 'Extract customer, consent, and low-risk loyalty slices', 'Deliver order queries, notifications, and bounded returns', 'Isolate payment providers and introduce financial controls', 'July peak gate: certify the expanded hybrid topology']
Proposal 3 vs the previous-round proposal it resembles most (grok-4.6_refine_3): 15 steps kept, added ['Build a thin paved road and remove the maintenance window', 'Wrap warehouse files without changing the warehouse', 'Extract inventory availability reads', 'Reforecast after the first peak', 'Dual-run proven pricing slices and isolate payment providers', 'Deliver order-query slices and cart/checkout façades', 'Hand over a durable hybrid and a funded follow-on'], removed ['Build a thin paved road for independent deployment', 'Season 1: wrap warehouse files and extract availability reads', 'Season 2: dual-run only proven pricing slices', 'Season 2: order-query slices and payment-provider adapters', 'Season 2: cart and checkout façades, then only proven orchestration']
Proposal 4 vs the previous-round proposal it resembles most (deepseek-v4-pro_refine_4): 17 steps kept, added ['Charter the migration programme and protect peak trading windows', 'Establish technical and business baseline with full dependency mapping', 'Build observability, SLOs and error-budget controls', 'Build delivery platform: CI/CD, feature flags, canary and runtime', 'Wave 2 - Dual-run and prove pricing rule slices behind façade', 'Wave 2 - Build order-query service and bounded returns workflows'], removed ['Programme governance, peak-protection calendar, and team capacity', 'Baseline architecture, data, traffic, and business invariants', 'Observability, SLOs, and business-failure alerting', 'CI/CD, feature flags, progressive delivery, and secure runtime', 'Wave 3: Extract pricing and promotions service behind the façade', 'Wave 5: Extract order management, notifications, and returns']
Proposal 5 vs the previous-round proposal it resembles most (qwen3.8-max_refine_5): 23 steps kept, added none, removed none
Origin of the steps of the new proposals, matched by title by the tool (evidence for "taken"; ideas can also travel without a matching title):
Proposal 1: 11 of its 23 steps match its own previous version, 1 is new; steps 2, 7 resemble steps 2, 7 of proposal 3; steps 15, 19, 20, 21, 23 resemble steps 15, 20, 18, 21, 23 of proposal 4; steps 4, 6, 8, 10 resemble steps 4, 6, 8, 11 of proposal 5
Proposal 2: 10 of its 20 steps match its own previous version, 4 are new; step 15 resembles step 17 of proposal 3; steps 11, 13, 14 resemble steps 11, 12, 14 of proposal 4; steps 4, 18 resemble steps 4, 22 of proposal 5
Proposal 3: 15 of its 22 steps match its own previous version, 3 are new; step 12 resembles step 11 of proposal 1; step 19 resembles step 15 of proposal 2; step 15 resembles step 14 of proposal 4; step 18 resembles step 17 of proposal 5
Proposal 4: 16 of its 23 steps match its own previous version, 1 is new; steps 3, 4, 5 resemble steps 3, 4, 5 of proposal 1; step 1 resembles step 1 of proposal 2; steps 16, 18 resemble steps 17, 19 of proposal 5
Proposal 5: 20 of its 23 steps match its own previous version, 0 are new; step 11 resembles step 8 of proposal 2; steps 1, 2 resemble steps 1, 2 of proposal 4
PROPOSALS OF ROUND 4 (to assess):
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
Your answer has these parts:
- "round_summary": two or three sentences on how the round went as a whole.
- "converging": true if the proposals of this round are more similar to each other than those of the previous round, false otherwise.
- "proposals": one entry per proposal of round 4, each with:
- "proposal": its number,
- "assessment": "improved", "worsened", "mixed" or "unchanged" with respect to its previous version ("no_previous_version" if that agent produced nothing in the previous round),
- "what_changed": a concise account of how it improved or worsened and why (three or four sentences at most),
- "improvements": a list of concrete gains (specific steps, metrics, structure),
- "regressions": a list of concrete losses (dropped steps, vaguer metrics, broken dependencies...),
- "taken": the ideas this proposal visibly adopted from the OTHER proposals of round 3 (not from its own previous version): one entry per idea with "from_proposal" (the number of the proposal it came from), "steps" (the numbers of the steps of that proposal where the idea lives, as listed above; empty if it is not tied to specific steps), "what" (the idea, one sentence) and "why" (how it was used or adapted, one sentence),
- "rejected": the ideas of the OTHER proposals of round 3 that this proposal visibly declined: an explicit contradiction, or a prominent idea it saw and left out while taking the opposite approach. Same fields; "why" gives the evidence (what the proposal does instead). Do not list mere omissions without evidence; an empty list is a valid answer.
[FINAL]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
THE INITIAL PROPOSALS (round 0):
--- PROPOSAL 1 (agent claudeHaiku4.5_initial_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics: - All major business functions (catalog, pricing, orders, payments, inventory) deployed as independently releasable services by end of month 12.
- Deployment frequency increased from bi-weekly to daily or on-demand per team, with zero coordination required between teams.
- Peak-season capacity maintained: handle 40,000 orders/day baseline and 480,000 orders/day (12x peak) with P95 page load time ≤2 seconds and payment success rate >99.9%.
- Zero unplanned downtime caused by the migration during the 12-month period; any incidents are handled with automated rollback within 5 minutes.
- Test coverage increased from 25% to ≥70% across all services, with comprehensive integration test suite running on every commit.
- Mean time to recovery (MTTR) for production incidents reduced from hours to <15 minutes due to circuit breakers and fallbacks.
- Data consistency validated: automatic nightly checks confirm service data matches source-of-truth, with any discrepancies logged and investigated within 24 hours.
- Service API latency (p95) meets SLOs: catalog ≤200ms, pricing ≤300ms, inventory ≤200ms, payment ≤1000ms, with circuit breakers preventing cascading failures.
- Each service has documented runbooks, incident response procedures, and scaling playbooks; all ops and dev teams trained and confident.
- Feature delivery velocity maintained at pre-migration levels: new feature deployment time remains unchanged despite architectural changes.
Steps (23):
1. Establish governance and migration steering committee
Create a governance structure to guide the 12-month migration and ensure alignment across teams.
- Define clear decision-making authority and escalation paths.
- Establish weekly steering meetings with representatives from each of the five teams plus leadership.
- Create a shared vision for service boundaries and prioritize which modules to extract first.
- Set up RACI matrix (responsible, accountable, consulted, informed) for each major service extraction.
2. Design service architecture and system boundaries (depends on: 1)
Map the monolith into independently deployable services with clear boundaries and synchronization points.
- Analyze the 350 tables and identify which tables belong to each business domain (catalog, pricing, orders, inventory, etc.).
- Design the data synchronization strategy for the 1.2 TB database, including which data moves to which service.
- Plan the strangler approach for each module: what gets extracted first, what depends on what.
- Define API contracts and asynchronous messaging patterns (events vs. direct calls) between services.
3. Deploy Kubernetes infrastructure and container registry (depends on: 2)
Build the cloud infrastructure to run containerized services at scale with redundancy and monitoring.
- Provision a production-grade Kubernetes cluster (managed service like EKS, AKS, or on-premises).
- Set up container image registry with retention policies and security scanning.
- Configure persistent storage volumes for databases and caches.
- Implement cluster networking, RBAC, and network policies for security.
4. Implement strangler proxy and API gateway (depends on: 3)
Deploy a reverse proxy that routes requests between the monolith and the new services, enabling gradual traffic migration.
- Deploy API gateway (e.g., Kong, Ambassador, or cloud-native option) in front of the monolith.
- Implement request routing logic to direct traffic to services or monolith based on rules.
- Add request/response logging and transformation layer for API versioning.
- Enable instant traffic rerouting and rollback if a service fails.
5. Build feature flagging and traffic routing system (depends on: 3)
Implement a system to control which users hit which service, enabling safe canary deployments and A/B testing.
- Choose or build a feature flag platform (LaunchDarkly, Unleash, or open source).
- Integrate with API gateway and service code to support percentage-based traffic splitting.
- Enable per-user, per-region, and per-browser routing for testing (e.g., mobile app to new service before web).
- Create dashboards for ops teams to adjust routing in real time without redeploying.
6. Establish comprehensive observability (logs, metrics, tracing) (depends on: 3)
Deploy centralized logging, metrics, and tracing to track behavior across services and detect issues early.
- Set up centralized log aggregation (e.g., ELK, Splunk, or cloud-native solution).
- Deploy metrics collection (Prometheus, Datadog, or equivalent) with dashboards for each service.
- Implement distributed tracing (Jaeger, Zipkin) to track requests across service boundaries.
- Define critical alerts: error rates, latency spikes, database query performance, payment transaction failures.
7. Design event-driven data consistency architecture (depends on: 3)
Plan how services will stay in sync when sharing data extracted from the monolith's single database.
- Design an event bus or message queue topology (Kafka, RabbitMQ, or cloud equivalent).
- Plan Change Data Capture (CDC) from the monolith to notify services when data changes.
- Define saga patterns for multi-step distributed transactions (e.g., order creation spanning multiple services).
- Document how to handle eventual consistency, conflicts, and zombie data in each service.
8. Build inter-service communication framework (APIs and queues) (depends on: 3)
Establish libraries and standards for how services talk to each other synchronously and asynchronously.
- Define REST or gRPC standards (authentication, versioning, error handling) for all service-to-service calls.
- Create shared libraries for message publishing/consuming (idempotency, dead-letter handling).
- Document timeout and retry policies to prevent cascading failures.
- Provide templates and SDKs to development teams so they don't reimplement these patterns.
9. Extract catalog and search service (depends on: 4, 5, 6, 8)
Extract the catalog and Lucene search index into its own service, starting with a low-risk module to validate the pattern.
- Move catalog module code from monolith to a new service repository.
- Containerize the service and deploy to Kubernetes.
- Keep the existing Lucene index and nightly rebuild process initially.
- Route catalog API requests through the gateway: send 10% of traffic to new service first, validate results, increase to 100%.
10. Create independent catalog data layer with synchronization (depends on: 9, 7)
Extract catalog tables from the shared database and sync changes from the monolith to the new service.
- Copy catalog tables to a new PostgreSQL database managed by the catalog service.
- Implement CDC (Change Data Capture) to publish catalog changes as events when the monolith updates data.
- Build catalog service to subscribe to these events and update its own tables.
- Implement consistency checks: run hourly validation that catalog service data matches monolith source-of-truth, log discrepancies.
11. Extract customer accounts service (depends on: 4, 5, 6, 8)
Move customer profile, login, and loyalty data into a dedicated service that other services query.
- Extract customer and loyalty tables from monolith database.
- Build service to manage customer profile, authentication, and loyalty points.
- Implement event stream for customer changes (profile updates, loyalty point transactions).
- Route customer API calls through gateway; monolith and new service share database briefly, then switch to CDC sync.
12. Extract returns management service (depends on: 4, 5, 6, 8)
Create a focused returns processing service to further validate the extraction pattern and learn before tackling complex modules.
- Move returns processing logic and tables from monolith.
- Build simple service with clear inputs (return requests) and outputs (refund events).
- Connect to order data via API calls (will be extracted separately) and inventory service.
- Canary traffic, monitor error rates and latency; this is the lowest-risk extraction.
13. Audit, document, and decompose pricing/promotions business rules (depends on: 1)
Reverse-engineer and document the complex pricing logic to enable rebuilding it as a new service. Start early in parallel with infrastructure work.
- Form a task force: architects, the original pricing team, and business analysts.
- Read through the 200k lines of pricing code; document country-specific rules, exceptions, and dependencies (which rules call which).
- Build a comprehensive spreadsheet of pricing scenarios: free shipping rules, discount types, country-specific taxes, dynamic pricing, etc.
- Extract test cases from production data: get 1,000 real orders from each country and document how pricing rules applied.
- Identify which pricing decisions depend on cart, inventory, or customer account data.
14. Design and implement pricing/promotions service with enhanced testing (depends on: 4, 5, 6, 8, 13)
Rebuild the pricing logic as a new microservice with a cleaner architecture and comprehensive test coverage.
- Architect the new service with clear separation: promotion evaluation, tax calculation, discount application, price transformation per country.
- Implement each country's rules as either code or a rules engine (not hardcoded strings).
- Build unit tests for 100+ pricing scenarios (cross-reference with S13 test cases).
- Implement shadow traffic testing: send real production requests to both monolith and new service, log differences, investigate discrepancies before switching traffic.
15. Implement event-driven pricing and cart synchronization (depends on: 14, 7, 9)
Sync pricing changes and promotions between the pricing service and cart/checkout to keep pricing consistent in real time.
- Publish events when promotions are created/updated: promotion_created, promotion_updated, promotion_ended.
- Implement cart service subscription: when a cart is modified or promotion changes, recalculate cart total.
- Handle time-based promotions: if a promotion starts/ends during a customer's shopping, reflect immediately.
- Validate consistency: sample 1% of checkouts, compare price calculated by pricing service vs. what customer paid; alert if mismatch.
16. Extract inventory management service (depends on: 4, 5, 6, 8, 10)
Create a service that manages stock levels and warehouse synchronization, replacing the 15-minute batch sync with event-driven updates.
- Extract inventory tables and warehouse sync logic from monolith.
- Build inventory service that subscribes to warehouse file drops (replace file exchange with event publishing or direct API).
- Implement real-time inventory updates: when an order is placed, reserve stock immediately; when warehouse sends stock count, update available qty.
- Canary deploy and validate: monitor for stock mismatch errors (overselling); maintain monolith as source-of-truth with service as secondary initially.
17. Extract payment gateway coordination service (depends on: 4, 5, 6, 8)
Abstract the three payment providers into a dedicated service so checkout doesn't depend on external API details.
- Move payment provider logic (Stripe, PayPal, local provider) from monolith checkout to new service.
- Implement payment orchestration: route to correct provider based on country/currency, handle failures, retry logic.
- Build payment event stream: payment_initiated, payment_authorized, payment_captured, payment_failed, payment_refunded.
- Test thoroughly: use sandbox accounts, simulate failure scenarios (provider timeout, decline, network error); ensure consistent error messages to checkout.
- Use gateway to route: send payments for test users/regions to new service first.
18. Implement resilience patterns across services (circuit breakers, fallbacks, retries) (depends on: 9, 10, 11, 12)
Make services robust to failures of dependent services; services should handle failures gracefully, not crash the whole system.
- Install circuit breaker library (Resilience4j, Hystrix equivalent) in each service.
- Define circuit breaker policies per dependency: if catalog service is slow, circuit opens after 50 failures or 5 seconds slow response, fails fast.
- Implement fallback strategies: if pricing service is down, use cached pricing; if inventory is down, temporarily increase order-to-fulfillment delay.
- Set timeouts on all cross-service calls (e.g., cart→pricing must return in 500ms) with bulkhead pattern to prevent resource exhaustion.
- Test: use chaos monkey or chaos toolkit to inject failures (kill pods, add latency) and verify fallbacks work.
19. Build comprehensive integration test suite (depends on: 14, 16, 17)
Create automated tests that exercise real customer journeys across multiple services to catch bugs before production.
- Build test data setup: create products, customers, promos, inventory in test environment.
- Write end-to-end test scenarios: browse catalog → add to cart → apply promo → checkout with payment → order created → inventory updated → returns processing.
- Implement performance tests: simulate 40,000 orders/day baseline load, 480,000 orders (12x peak) burst load; validate response times and error rates.
- Add chaos tests: run scenarios while services fail (pod restart, network partition, database slow) to validate resilience.
- Run tests on every service commit and nightly against staging environment; alert on test failure.
20. Create independent service deployment pipelines (depends on: 4, 18)
Set up automated deployment so each service can be released independently without coordinating with other teams every two weeks.
- For each service: build → run tests → build container image → push to registry → deploy to staging with canary (5% traffic initially).
- Implement automated rollback: if error rate on new service exceeds threshold for 5 minutes, automatically route traffic back to old version and alert.
- Add manual approval gates for production: team lead reviews test results, approves, release happens with 0 downtime (health checks, graceful shutdown).
- Documentation: each team has runbook for deploying their service, rolling back, handling incidents.
- Target: enable each team to deploy 1-2 times per day if needed.
21. Conduct load testing and peak-season capacity planning (depends on: 19, 20)
Validate that the new service architecture can handle peak loads (40k baseline, 480k at 12x peak) without degradation.
- Load test in staging: ramp up traffic gradually, measure latency, error rate, and resource usage (CPU, memory, database connections).
- Identify bottlenecks: where does latency spike first? Is it database queries, service CPU, or network?
- For each service and the database: determine max capacity and burst capacity (e.g., catalog service handles 500 QPS sustained, 1000 QPS for 30s burst).
- Plan auto-scaling: set Kubernetes horizontal pod autoscaler min/max replicas, database read replicas, and caching layers based on results.
- Validate payment processing: simulate peak payment volume with all three providers; confirm no payments are lost or duplicated.
22. Execute comprehensive pre-peak-season validation and simulation (depends on: 21)
Run a full-dress rehearsal before January/July peak season to ensure the system is ready; critical gate before any further changes.
- Schedule 48-hour end-to-end test: run production-like load against all services with canary deployments to catch integration issues.
- Run disaster recovery drill: if one service is down, can customers still browse and checkout? If payment provider fails, can we use fallback?
- Customer journey validation: have real team members and friendly customers test: browse → add items → apply promo code → checkout on web and mobile apps.
- Team readiness: hold incident response drill, confirm runbooks are accurate, escalation paths clear, and alert thresholds are tuned.
- Performance sign-off: confirm P95 page load times, checkout flow time, order processing latency all meet SLOs for peak traffic.
- Go/no-go decision: leadership reviews results; if any critical issue, fix and re-test before peak season starts.
23. Monitor, optimize, and prepare for ongoing evolution (depends on: 22)
After validation, monitor the production system closely during peak season; optimize based on real behavior and plan next improvements.
- Daily monitoring during peak season: dashboard watching error rates, latency, payment success rate, customer support tickets.
- Real-time tuning: if one service is bottleneck, increase replicas or add caching; if database query is slow, add index (non-blocking).
- Post-peak analysis: compare actual peak performance to projections; document what assumptions were wrong, what worked well.
- Identify quick wins: which cross-service calls can be cached, which synchronous calls could be async, which services could be split further?
- Plan the next 6 months: which remaining monolith modules can be extracted, which services need optimization, should we change tech stack for any?
--- PROPOSAL 2 (agent gpt-5.6-terra_initial_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - No unplanned customer-facing downtime is attributable to migration work during the 12-month programme.
- Every production migration has a documented, rehearsed rollback that can be initiated within 15 minutes and preserves financial, order, payment, and inventory integrity.
- January and July sales periods complete with at least the pre-migration peak availability, conversion rate, payment approval rate, and order throughput.
- The hybrid platform sustains at least 12x observed normal load plus agreed headroom in full-path load and failover tests before each sales period.
- Critical journeys achieve at least 95% automated API, integration, contract, and end-to-end regression coverage by business-risk weighting, with 100% coverage of defined checkout, payment, order, stock, refund, and price-parity scenarios.
- Catalogue/search, inventory availability, customer/loyalty slices, order query/post-order slices, and selected checkout/payment façade capabilities are independently deployable with named ownership, SLOs, dashboards, runbooks, and on-call support.
- All extracted services have zero direct writes to another service's database, and all cross-service state propagation uses governed APIs or versioned events.
- For each migrated entity group, reconciliation identifies less than 0.01% unresolved record discrepancies and zero unresolved financial discrepancies at cutover completion.
- Pricing and promotion decision parity for any migrated rule slice is at least 99.99% against approved golden-master cases, with all remaining differences explicitly approved by business owners.
- Deployment frequency for independently deployable services reaches at least weekly, with no mandatory monolith maintenance window required for routine compatible releases.
- Mean time to detect critical customer-journey failures is below 5 minutes, and mean time to restore or roll back migration-related severity-one incidents is below 30 minutes.
- Feature delivery continues throughout the programme, with planned business roadmap throughput maintained at no less than 80% of the agreed baseline.
Steps (20):
1. Establish migration governance and delivery model
Create a migration programme that protects revenue, peak periods, and ongoing feature delivery. Assign one accountable programme lead, a chief architect, and named business and operational owners for every domain.
- Create a steering group with engineering, product, operations, security, finance, warehouse, payments, and country representatives.
- Reserve capacity per team: 50% business delivery, 30% migration work, and 20% quality, operational, and unplanned-work reduction. Rebalance only through the steering group.
- Publish decision rights, architecture principles, risk register, dependency board, and weekly programme cadence.
- Define explicit stop/go criteria for each production cutover and a formal rollback authority.
- Plan sales protection windows: no first-time domain cutovers, database schema changes, payment changes, or major traffic experiments during the four weeks before and through January and July sales periods.
- Keep feature work flowing through the same delivery pipeline, with feature flags used to decouple code deployment from customer release.
2. Baseline the monolith, traffic, data, and operational risk (depends on: 1)
Build an evidence-based picture of the current system before selecting extraction order. The baseline becomes the capacity, correctness, and rollback reference for every migration wave.
- Map request flows from web, mobile, back-office, warehouse files, payment providers, and scheduled jobs to modules, tables, stored procedures, queues, and external dependencies.
- Measure normal and sale-peak throughput, latency, error rates, database load, index rebuild duration, batch duration, payment approval rates, and recovery times.
- Classify all 350 tables and stored procedures by owning business concept, writers, readers, sensitivity, retention requirements, and cross-module coupling.
- Identify critical business invariants, including stock reservation, price calculation, promotion eligibility, payment-to-order consistency, returns, loyalty accrual, and country tax requirements.
- Produce dependency heat maps and a candidate extraction scorecard using coupling, business risk, change frequency, data ownership feasibility, and expected value.
- Capture a production-like anonymised data set and documented peak-load profiles for repeatable testing.
3. Define target architecture and domain boundaries (depends on: 2)
Agree a pragmatic target architecture based on bounded contexts, clear data ownership, and incremental extraction. Do not start by redesigning every business process or splitting every table.
- Define initial bounded contexts: edge/storefront experience, catalogue, search, pricing and promotions, cart, checkout, payments, orders, inventory, customers and loyalty, returns, and back-office workflow.
- Assign a single system of record and an owning team for each business data entity. Services may consume replicated data but must not directly write another service's database.
- Define synchronous API rules, asynchronous event rules, versioning rules, idempotency requirements, correlation identifiers, and error-handling conventions.
- Establish a platform pattern: containerised services, managed or highly available PostgreSQL where appropriate, API gateway or edge routing, event transport, secrets management, central configuration, and infrastructure as code.
- Select an incremental strangler pattern. New services are introduced behind stable interfaces while the monolith remains the source of truth until ownership is deliberately transferred.
- Document explicitly that distributed transactions are prohibited. Use outbox, idempotent consumers, compensating actions, reconciliation, and business-visible exception queues instead.
4. Create production safety foundations (depends on: 1, 3)
Make every current and future component observable, operable, and auditable before material traffic is moved. This work starts in the monolith as well as in new services.
- Implement standard structured logs, metrics, distributed tracing, correlation IDs, service dashboards, synthetic customer journeys, and business KPIs.
- Define service-level objectives for storefront availability, search, price response, cart operations, checkout, payment confirmation, order creation, and warehouse export.
- Add alerting with severity, ownership, escalation paths, and tested runbooks. Alert on business failures as well as infrastructure failures.
- Establish immutable audit events for pricing changes, promotion decisions, payments, order state changes, stock adjustments, customer-data access, and administrative actions.
- Implement backup, restore, disaster recovery, and failover tests for the monolith database, new data stores, event platform, and search platform.
- Create a shared operations readiness review required before any service receives production traffic.
5. Build secure delivery and runtime platform (depends on: 3, 4)
Provide a paved road for independently deployable services. The platform must reduce deployment risk rather than create a second operational burden.
- Build standard service templates for Java, including health checks, readiness checks, graceful shutdown, telemetry, API documentation, authentication, configuration, database migrations, and outbox publishing.
- Implement CI/CD with build provenance, dependency and container scanning, automated unit, contract, integration, and smoke tests, environment promotion, and approval controls for high-risk releases.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Introduce progressive delivery capabilities: feature flags, canary releases, blue/green deployment where justified, traffic splitting, automated rollback, and deployment freeze controls.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, and GDPR data-handling controls.
- Ensure platform capacity is sized and load-tested for at least the documented 12x sales peak plus agreed headroom.
6. Improve monolith safety while it remains live (depends on: 2, 4, 5)
Stabilise the monolith so it can safely coexist with extracted services for most of the programme. The monolith remains a production dependency and needs the same operational discipline as new services.
- Add a modularity boundary map and enforce it with architecture tests, package rules, code ownership, and mandatory reviews for cross-module changes.
- Wrap high-risk database access behind repository or application interfaces, beginning with areas selected for extraction.
- Introduce expand-contract database migration rules. Additive, backward-compatible changes deploy first; destructive changes require evidence that all readers have moved.
- Raise automated regression coverage around critical journeys before touching them, using API, integration, and end-to-end tests rather than relying only on unit tests.
- Add feature flags and kill switches around all new monolith-to-service integrations.
- Reduce the 30-minute maintenance dependency by proving online deployment procedures, connection draining, backward-compatible schema releases, and zero-downtime smoke tests.
7. Implement integration, event, and data-transition patterns (depends on: 3, 5, 6)
Create reusable patterns for safe coexistence between the monolith and services. This is the core mechanism for reversible migration without dual-write corruption.
- Introduce an event backbone and schema registry or equivalent governance, with versioned events, retention policies, dead-letter handling, replay procedures, and consumer ownership.
- Implement transactional outbox publishing in the monolith and each service. Events are committed with source data and delivered asynchronously with deduplication.
- Provide change-data-capture only where an outbox cannot initially be added, with monitoring and a time-bound plan to replace it.
- Build a replication and reconciliation framework that compares source and target counts, hashes, business totals, lag, and exception records.
- Standardise anti-corruption adapters so services do not inherit monolith-specific data shapes and semantics.
- Define transition states for each entity: monolith-owned, replicated read model, dual-read validation, service-owned with monolith compatibility adapter, and legacy-retired.
8. Create quality, performance, and release assurance (depends on: 2, 4, 5, 7)
Replace confidence based on a fortnightly monolith release with automated evidence for each independently deployed component. Focus first on revenue-critical and migration-affected flows.
- Build a production-like test environment with anonymised data, external-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion test fixtures.
- Establish consumer-driven API and event contract tests. Producers may not release breaking changes until consumers have migrated or compatibility periods expire.
- Create end-to-end tests for browse-to-order, guest and registered checkout, payment success and failure, cancellation, return, refund, stock changes, loyalty, and back-office operations.
- Implement load, soak, spike, chaos, and failover tests using the observed 12x sale profile. Run them before every traffic expansion.
- Use shadow execution for high-risk decisions. Compare service and monolith outputs without changing customer outcomes.
- Set release gates for security, contracts, performance, observability, rollback rehearsal, and business reconciliation.
9. Select and sequence extraction waves (depends on: 2, 3, 8)
Prioritise small, low-coupling seams first, then use the resulting capabilities for harder domains. Pricing, promotions, checkout, and core order ownership are deliberately not first-wave candidates.
- Wave 1: edge routing, read-only catalogue API, search, and selected back-office read/reporting capabilities.
- Wave 2: inventory availability read model and warehouse integration adapter, while preserving the current order and stock authority initially.
- Wave 3: customer profile and selected loyalty read/write capabilities, subject to GDPR and identity constraints.
- Wave 4: order query model, notification or non-core order workflow, and returns workflow where process boundaries are confirmed.
- Wave 5: cart and checkout façade components, followed by payment-provider adapters only after reliability evidence is sufficient.
- Treat pricing and promotions as a dedicated discovery-and-modernisation stream. Extract only verified, bounded slices after exhaustive parity testing; retain the monolith engine behind an API if full extraction is not safe within 12 months.
- Define per-wave entry criteria, exit criteria, capacity allocation, and a no-go rule for work that would cross a sales protection window.
10. Introduce edge routing and façade interfaces (depends on: 4, 5, 6, 8)
Decouple channels from monolith internals before extracting business capabilities. Web, mobile, and back-office clients must use stable, versioned interfaces rather than service-specific implementation details.
- Place an API gateway or backend-for-frontend layer in front of existing endpoints without changing functional behaviour.
- Route by path, tenant/country, customer cohort, feature flag, and percentage of traffic. Default routing remains to the monolith.
- Add authentication, authorisation, rate limiting, request validation, response compatibility, correlation IDs, and traffic dashboards at the edge.
- Preserve mobile API compatibility through versioning and adapter endpoints. Do not force a mobile release as a prerequisite for backend extraction.
- Implement instant route rollback to the monolith, including tested handling for sessions, carts, cached responses, and in-flight requests.
- Measure baseline response equivalence and latency overhead before moving any business endpoint.
11. Extract catalogue read API and modern search (depends on: 7, 8, 9, 10)
Deliver the first customer-facing extraction through read-heavy capabilities with clear fallback paths. This validates the platform, routing, replication, and operational model without changing transaction ownership.
- Build a catalogue read service fed from monolith-owned catalogue data through outbox or controlled replication.
- Replace nightly-only Lucene rebuilding with an independently operated search service that supports incremental index updates, aliases, blue/green indexes, and rapid rollback to the existing index.
- Run catalogue and search in shadow mode. Compare product availability, locale content, ranking, facets, response time, and zero-result rates against current behaviour.
- Shift traffic gradually by country and cohort. Keep the monolith catalogue/search route live until parity and peak tests pass.
- Introduce cache policies, invalidation events, stale-data limits, and cache-bypass operational controls.
- Do not make the new search service authoritative for price or stock. It displays explicitly versioned read models from their owning domains.
12. Modernise inventory integration and availability reads (depends on: 7, 8, 9, 10)
Separate warehouse file exchange from customer-facing inventory reads while preserving warehouse and order-system correctness. Inventory changes are operationally sensitive and require explicit freshness semantics.
- Build a warehouse integration adapter that validates, records, deduplicates, and acknowledges inbound and outbound files without changing warehouse contracts initially.
- Publish inventory-change events and create an availability read model for storefront and search use.
- Define country and fulfilment-node stock semantics, safety-stock rules, oversell tolerance, freshness targets, and customer messaging for stale or unavailable stock.
- Shadow-compare the new availability result with the monolith for all products and warehouses. Reconcile every discrepancy before traffic expansion.
- Preserve current monolith stock reservation and allocation authority until order and inventory ownership boundaries are fully designed.
- Provide an immediate fallback to monolith availability reads and a replayable file-processing recovery process.
13. Discover and contain pricing and promotions (depends on: 2, 6, 7, 8, 9, 10)
Treat pricing and promotions as the highest-risk business capability. First make its behaviour observable and testable; do not attempt a big-bang rewrite based on incomplete knowledge.
- Form a dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, customer support, and QA.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, and country-specific exceptions.
- Capture real production decision inputs and outputs into a privacy-safe decision log. Build a golden-master corpus covering products, customer segments, countries, currencies, dates, carts, vouchers, stacking, tax, and edge cases.
- Put the existing engine behind a versioned pricing façade. New callers use the façade even while it delegates to monolith logic.
- Build a new rules-evaluation candidate service only for well-understood rule slices. Shadow-evaluate and compare exact price, discount, explanation, and latency before any customer exposure.
- Require business sign-off, discrepancy classification, and financial-impact analysis before moving each rule slice. Keep a per-slice route-back switch to the legacy engine.
14. Extract customer and loyalty capabilities safely (depends on: 7, 8, 9, 10)
Move customer-facing identity-adjacent data only after privacy, consent, and data ownership are clear. Avoid introducing inconsistent account state across countries and channels.
- Define the canonical customer identifier, consent model, data-retention rules, subject-access and deletion workflows, and access-control model.
- Start with a replicated customer profile read service, then migrate bounded profile writes through a façade with idempotency and audit trails.
- Move loyalty functions in small slices, such as balance inquiry before accrual or redemption, using a ledger model and reconciliation against legacy balances.
- Support account-session compatibility across web, mobile, monolith, and new services throughout the transition.
- Reconcile customer records, consent states, and loyalty balances daily during migration. Route exceptions to trained operations staff.
- Retain a compatibility adapter for legacy back-office functions until those workflows are migrated or retired.
15. Extract order views and bounded post-order workflows (depends on: 7, 8, 9, 10, 14)
Create independently deployable order-related value without prematurely splitting the transactional checkout path. Start with event-driven reads and post-order processes that can tolerate asynchronous integration.
- Publish reliable order lifecycle events from the monolith using the outbox pattern.
- Build an order query service for customer-service, customer self-service, notifications, and selected back-office views. Validate it against monolith order history and live state.
- Extract bounded workflows such as notifications, selected return initiation, return-status tracking, and non-financial order enrichment where ownership is explicit.
- Preserve monolith order creation, payment capture coordination, cancellation authority, refund authority, and warehouse order export until their transition design is approved.
- Implement reconciliation for order counts, states, refunds, returns, notification delivery, and event lag.
- Ensure every new order-facing view identifies source freshness and has a monolith fallback for support staff.
16. Create cart, checkout, and payment transition architecture (depends on: 7, 8, 9, 10, 11, 12, 13, 15)
Prepare the revenue-critical transactional path through façade-first migration, exhaustive provider testing, and progressive traffic control. This stage must not force immediate service ownership transfer.
- Define cart identity, guest-to-account merge rules, session persistence, currency and country transitions, promotion snapshots, inventory checks, and checkout idempotency keys.
- Introduce a checkout façade that initially delegates to the monolith. Route storefront and mobile gradually while maintaining response and error compatibility.
- Isolate each payment provider behind versioned adapters with token handling, webhook verification, idempotent authorisation and capture, retry policy, reconciliation, and provider-specific fallback behaviour.
- Build a payment ledger and daily reconciliation process covering authorisations, captures, refunds, chargebacks, provider settlements, and orders.
- Shadow-run checkout orchestration and payment-adapter decisions where possible. Use provider test environments and controlled internal cohorts before customer traffic.
- Do not split the final order-creation transaction until failure-mode analysis, compensating actions, support procedures, and sale-peak load tests demonstrate acceptable risk.
17. Transfer ownership through controlled data cutovers (depends on: 7, 8, 11, 12, 13, 14, 15, 16)
Move write ownership one entity group at a time after services have proven read parity and operational maturity. Each cutover is a reversible state transition, not a one-time database migration.
- For each entity, document source of truth, writer cutover sequence, replication direction, API consumers, data-retention obligations, reconciliation rules, and rollback point.
- Use expand-contract schemas, backfills with checksums, change capture or outbox replication, dual-read validation, and carefully bounded write cutovers.
- Avoid unrestricted dual writes. During transition, route writes through one command owner that publishes changes reliably to dependent systems.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Define thresholds that automatically halt traffic expansion.
- Retain legacy data read access and compatibility APIs until all consumers are migrated and the defined observation period has passed.
- Schedule any high-risk ownership cutover outside sales protection windows, with an approved rollback rehearsal and staffed hypercare period.
18. Execute progressive traffic migration and rollback drills (depends on: 4, 8, 10, 11, 12, 13, 14, 15, 16, 17)
Move production traffic only through measured, reversible increments. Every migration uses the same operational playbook regardless of domain.
- Progress through dark launch, shadow comparison, employee cohort, low-risk country or cohort, 1%, 5%, 25%, 50%, and full traffic stages where appropriate.
- Define quantitative promotion criteria for each stage: error rate, latency, conversion, search quality, price parity, payment approval rate, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Automate route rollback and validate it with game days. Rollback must restore a known compatible route without data loss or customer-visible duplicate operations.
- Run failure injection for dependency loss, event delay, duplicate messages, provider timeout, cache failure, database failover, and warehouse-file replay.
- Maintain staffed hypercare after each material expansion, with business, support, and engineering representatives able to pause or reverse rollout.
- Freeze traffic increases before sales protection windows. Use those windows only for monitoring, capacity verification, defect fixes with approved exceptions, and rehearsed rollback readiness.
19. Prepare peak-season resilience and capacity certification (depends on: 4, 5, 8, 11, 12, 13, 16, 18)
Certify both the hybrid estate and fallback paths for January and July sales. A service is not production-ready if its rollback target cannot sustain the traffic it might receive.
- Forecast peak demand by country, channel, page type, checkout step, payment provider, product launch, and warehouse activity.
- Load-test the full hybrid path at at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, databases, search, payment adapters, and warehouse integration.
- Test traffic reversion from each service to monolith and confirm that the monolith, database, and legacy search can absorb the reverted load.
- Establish capacity reservations, autoscaling limits, database connection limits, cache warm-up procedures, provider rate-limit agreements, and operational staffing plans.
- Conduct sale-day simulations, incident command exercises, communications rehearsals, and business-continuity tests with payment providers and warehouse stakeholders.
- Obtain formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and customer support.
20. Retire legacy paths and establish steady-state service governance (depends on: 17, 18, 19)
Conclude the 12-month programme by removing only proven-obsolete paths and making service ownership sustainable. Retain legacy components where removal would create unjustified business risk.
- Decommission monolith endpoints, batch jobs, Lucene components, table access paths, and stored procedures only after consumer inventory, data archival, reconciliation, and rollback-retention periods are complete.
- Remove temporary replication and compatibility adapters in controlled releases. Update runbooks, diagrams, recovery procedures, and ownership records at the same time.
- Measure and reduce residual monolith coupling, direct database access, synchronous dependency chains, event lag, and operational toil.
- Establish quarterly architecture reviews, API and event lifecycle governance, service scorecards, dependency upgrade policies, resilience testing, and disaster-recovery exercises.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance. Prioritise any remaining pricing, checkout, order, or database decomposition work as a funded follow-on roadmap.
- Confirm that independently deployable services have named owners, on-call coverage, SLOs, operational documentation, and tested rollback or recovery procedures.
--- PROPOSAL 3 (agent grok-4.6_initial_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime attributed to migration work across the 12 months.
- Every production cutover has a practised rollback that restores the previous path in minutes.
- January and July peak capacity at or above today's 12x headroom, with no extra error-budget burn on search, cart, checkout or payments.
- Feature throughput stays at or above the current two-week train; no programme-wide feature freeze.
- At least search, catalogue, identity, inventory, pricing, cart, checkout and OMS deploy independently of the monolith artefact.
- Dual-run mismatch rate for prices and stock below an agreed threshold before each traffic shift (target: 0 on money paths).
- Golden-journey pass rate 100% on critical paths before and after each cutover.
- Monolith database coupling reduced: no new cross-context joins; stored-procedure call volume on extracted domains at zero after ownership transfer.
- Mean time to revert a bad service release under 10 minutes via flags or routing.
Steps (25):
1. Charter, governance and non-negotiables
Write a short **migration charter** that product, ops, finance and all five teams sign.
Feature work never stops. Only production risk is constrained.
- Name one accountable migration lead and a weekly steering forum.
- Ban big-bang rewrites, shared-database-first splits and un-reversible cutovers.
- Require a tested rollback for every production step.
- Keep the two-week monolith release train for features until a domain is fully extracted.
2. Peak calendar and freeze protocol (depends on: 1)
Protect **January and July** sales with hard engineering blackouts.
No extractions, schema splits or traffic switches in the six weeks before a sale or the two weeks after, unless they are already proven and idle.
- Publish the 12-month calendar in week one.
- Freeze means no new migration risk, not a feature freeze.
- Require a peak capacity rehearsal before each blackout.
- Give ops a veto on any change that could affect checkout, payments, stock or search.
3. Baseline architecture, data and SLOs (depends on: 1)
Measure the live system before changing it.
Build a factual map of the 2M-line monolith, the 1.2 TB database and the real traffic shape.
- Trace the top 30 user journeys and the 350 tables they touch.
- Record p50/p95/p99, error rates and 12x peak headroom per journey.
- Inventory stored procedures, cross-module joins and file exchanges.
- Tag every endpoint used by the storefront, mobile app and back-office.
4. Delivery platform, flags and progressive delivery (depends on: 1)
Give every team a **safe way to ship** without the 30-minute maintenance window.
New work deploys behind flags. Old work stays on the existing train until it is ready.
- Add feature flags, weighted routing and instant revert at the edge.
- Build CI that can later publish one artefact per service.
- Keep Java 8 on the monolith. Start new services on a current LTS.
- Provide preview environments that replay production-like traffic.
5. Observability and error budgets (depends on: 3, 4)
Instrument the monolith as if it were already many services.
You cannot extract what you cannot see.
- Add distributed tracing, RED metrics and structured logs with correlation IDs.
- Define SLOs for search, PDP, cart, checkout, payments and back-office.
- Page on error-budget burn, not on CPU.
- Dashboards must show monolith vs new service side by side for every cutover.
6. Safety net: journeys, contracts and load (depends on: 3)
Raise the net where extraction will cut.
Unit coverage at 25% is not enough. Protect behaviour, not lines.
- Record golden journeys for browse, price, cart, checkout, order, return and loyalty.
- Add contract tests on every mobile and storefront endpoint.
- Capture characterization tests around stored procedures before moving them.
- Automate a 12x peak load test and run it before each sale and each major cutover.
7. Bounded contexts and extraction backlog (depends on: 3)
Draw domain boundaries from the business, not from the package tree.
Sequence work by **risk and coupling**, not by fashion.
- Contexts: identity, catalogue, search, pricing, inventory, cart, checkout, orders, returns, loyalty, back-office.
- Extract read-mostly and already-async seams first (search, inventory files).
- Leave pricing and checkout until dual-run and reconciliation exist.
- Rank a 12-month backlog with a rollback story on every item.
8. Team operating model without a freeze (depends on: 1, 7)
Keep five domain teams. Stop treating the repo as a single ownership blob.
Each team ships features in the monolith **and** prepares its future service.
- Assign a service to own per team, plus a shared platform pair.
- Code owners and module walls inside the current repository first.
- A small platform group owns gateway, flags, events, CI and data tooling.
- Product still plans features; migration work is a percentage of each sprint, not a separate freeze.
9. Modularise the monolith in place (depends on: 6, 7)
Create seams before you create processes.
New code may not add cross-module joins or new stored-procedure coupling.
- Split packages by bounded context with compile-time walls.
- Replace in-process calls at boundaries with interfaces (branch by abstraction).
- Document and freeze the worst pricing and checkout internals; wrap them.
- Ban new features from reaching into another team's tables.
10. Strangler facade and instant traffic rollback (depends on: 4, 5)
Put a reverse proxy in front of every public and mobile endpoint.
Clients keep the same URLs. You choose monolith or service per route and per percentage.
- Preserve headers, sessions, cookies and the four languages.
- Shadow traffic before any live percentage.
- Rollback is a route change, not a redeploy, and must complete in minutes.
- Storefront SSR and the mobile app stay compatible until a later BFF if needed.
11. Events, outbox and CDC backbone (depends on: 5, 9)
Give the monolith a **reversible integration spine**.
Services must not call each other's databases. They subscribe to facts.
- Add an outbox in the same Postgres transaction as business writes.
- CDC from the monolith for tables you do not yet own.
- Standard event names for product, price, stock, customer, order and return.
- Idempotent consumers and a dead-letter process before the first extraction.
12. Data-change playbook: dual-write, reconcile, roll back (depends on: 11)
Treat every data move as a campaign with an abort switch.
The 1.2 TB database stays the system of record until a service proves otherwise.
- Dual-write with the monolith write winning on conflict during trial.
- Nightly and continuous reconciliation with row-level diffs.
- Never cut stored procedures until logic has an equivalent test harness.
- Rollback means stop writes to the new store and keep serving from Postgres.
13. Extract search as the first service (depends on: 2, 8, 10, 11, 12)
Replace the nightly Lucene rebuild with an independently deployed **search service**.
This is read-heavy, already eventually consistent, and off the payment path.
- Index from catalogue and price events, not from a nightly dump.
- Shadow queries against current Lucene until precision/recall match.
- Shift traffic 1% → 10% → 50% → 100% with instant route rollback.
- Keep the old index warm through the next sale as a cold standby.
14. Extract catalogue read models (depends on: 13)
Serve product, media and localisation from a catalogue service.
Writes can stay in the monolith until editors have a new path.
- Build country and language-specific read models for eight markets.
- Keep one product identity so pricing, stock and search stay aligned.
- Cut storefront and mobile read traffic via the strangler.
- Do not move merchandising tools until reads are stable.
15. Extract identity, accounts and session (depends on: 8, 10, 12)
Pull login, profile, addresses and session behind a dedicated service.
Mobile and web keep the same auth cookies or tokens during the switch.
- Migrate sessions without forced logouts.
- Dual-read loyalty points until that domain is extracted.
- GDPR/export and deletion flows must work in both systems.
- Rollback restores monolith auth with no password resets.
16. Extract inventory and warehouse sync (depends on: 8, 11, 12)
Replace the 15-minute file exchange with an inventory service that still talks to the warehouse.
The warehouse interface stays file-based until they can change. Your side becomes events.
- Service owns ATP, reservations and oversell rules.
- Adapter keeps the existing file contract so warehouse risk is zero.
- Cart and checkout read stock from the service via API or replica.
- Prove no extra oversell versus today's 15-minute lag before a sale.
17. Pricing archaeology and dual-run harness (depends on: 6, 9)
Do not extract the 200k-line pricing module until you can prove equivalence.
Nobody fully understands country rules. Tests must become the spec.
- Capture production price traces for all eight countries and three currencies.
- Build a harness that replays promotions, baskets and edge SKUs.
- Freeze behavioural snapshots; new promo features implement twice until cutover.
- Only then wrap pricing behind an interface inside the monolith.
18. Extract pricing and promotions behind dual-run (depends on: 14, 17, 12)
Run the new pricing service in **shadow** until it matches the monolith on live baskets.
Checkout keeps using monolith prices until the error budget is clean.
- Compare every quote; alert on any currency, tax or promo mismatch.
- Shift read traffic first, then write of promo usage.
- Keep the monolith engine deployable as rollback through the next two sales.
- Country-specific rules move last, one market at a time if needed.
19. Extract cart (depends on: 15, 16, 18)
Move the cart after identity, catalogue, stock and price reads are stable.
Cart is stateful. Lose no baskets during cutover.
- Dual-write carts; reconcile abandoned and active baskets.
- Preserve promo application using the dual-run price API.
- Session migration must survive app versions in the wild.
- Rollback reattaches baskets to the monolith cart tables.
20. Extract checkout and payment orchestration (depends on: 19)
Strangle checkout without touching the three payment providers in one step.
A thin orchestration service talks to existing provider integrations first.
- Keep PCI and provider contracts stable; wrap, do not rewrite.
- Idempotent order placement with an outbox to OMS.
- Canary by country and by payment method.
- Rollback is route-plus-flag; in-flight payments complete on the old path.
21. Extract order management (depends on: 20)
Move post-purchase order state once checkout emits reliable events.
OMS must survive 12x peaks and warehouse files.
- Order of record shifts only after reconciliation is clean for a full weekly cycle.
- Back-office screens can still read a projection while writes move.
- Returns and finance reports stay correct during dual-run.
- Keep monolith OMS as standby through one sale after cutover.
22. Extract returns, loyalty and remaining back-office (depends on: 15, 21)
Peel remaining domains once orders and identity are independent.
Staff of 300 must not get a big-bang UI change.
- Returns service consumes order events and drives refunds via payment facade.
- Loyalty becomes the owner of points with dual-write from checkout.
- Back-office gets BFFs or modular UIs per domain, not a new monolith.
- Train staff per screen group; keep old screens until the new ones match.
23. Split data ownership and retire stored procedures (depends on: 16, 18, 21)
Give each stable service its **own schema or database** only after traffic and reconciliation are boring.
Shared Postgres is allowed during transition. It is not the end state.
- Move table ownership context by context; no cross-service joins.
- Rewrite stored procedures into service code with the characterization harness.
- Shrink the 1.2 TB monolith database as tables go dark.
- Rollback is restoring replication to the monolith copy, practised in staging.
24. Independent deploy pipelines and repository split (depends on: 8, 23)
When a service is independently releasable, stop bundling it into the fortnightly artefact.
Teams ship on demand with automated checks and progressive delivery.
- One pipeline per service: test, canary, promote, revert.
- Split repos only after module walls and CI already work in the monorepo.
- Contract tests gate consumer and provider deploys.
- The remaining monolith keeps the old two-week train until it is small.
25. Peak rehearsals, chaos and residual shrink (depends on: 2, 22, 24)
Prove **12x capacity** on the mixed architecture before each sale.
Then keep shrinking the monolith so it is a shell, not a risk.
- Game-days: provider failure, CDC lag, flag revert, search fallback, stock file delay.
- Scale tests on checkout, search and inventory with production-sized data.
- Delete dead modules, jobs and tables only after two quiet weeks.
- End state: independently deployable services, instant rollback still in place, no unplanned downtime attributed to the programme.
--- PROPOSAL 4 (agent deepseek-v4-pro_initial_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - 100% of critical customer journeys remain within SLOs during migration; no unplanned downtime outside planned windows.
- Every extraction step has a rehearsed rollback path that restores monolith behaviour in under 5 minutes.
- Peak-season capacity maintained: January and July sales complete without capacity-related errors, with peak traffic at least 12x baseline and error rate <= 0.1%.
- By month 12, at least 8 core business capabilities are deployed as independently deployable services from separate repositories with separate data ownership.
- Monolith code is reduced by at least 60%, and the remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Deployment frequency increases from one release every two weeks to daily per service; lead time for changes decreases from weeks to hours.
- Test coverage on changed code reaches at least 80%; critical pricing and checkout paths have contract and parity tests.
- Zero data loss or irreversible data corruption during migration; reconciliation discrepancies are below 0.01% of records.
- Feature delivery velocity remains at least equal to pre-migration levels; no feature freeze is imposed.
- No cross-service direct database joins remain for migrated capabilities; all service data access happens through APIs or events.
Steps (19):
1. Baseline and decompose the monolith into bounded contexts
Capture the current behaviour, data model, and operational risks before changing anything. The output is a shared map that justifies every later cutover.
- Inventory all modules, endpoints, database tables, stored procedures, cross-module joins, external integrations, and batch jobs.
- Map business capabilities to bounded contexts and identify candidate service seams and data owners.
- Record every country/currency/language variation, especially the 200k-line pricing and promotions module.
- Capture the peak-season calendar, current deployment windows, known failure modes, and rollback mechanisms.
- Create a risk register with blast radius and rollback criteria for each candidate extraction.
2. Define target service architecture and migration sequence (depends on: 1)
Agree the target state and the guardrails before building any new service.
- Publish target decomposition: storefront, catalogue/search, pricing/promotions, cart/checkout, orders, inventory, customers/loyalty, returns, back-office.
- Define synchronous APIs, asynchronous events, idempotency, retries, sagas, and eventual consistency where required.
- Define data ownership and database-per-service strategy; prohibit cross-service joins and direct access to another service's tables.
- Define API versioning, security, tenancy, and country-specific routing.
- Choose migration sequence: start with low-risk read-heavy capabilities and delay peak-sensitive cutovers until outside sales windows.
- Set the rollback requirement: every change must be behind a flag or reversible migration with rehearsed rollback.
3. Establish observability, SLOs and production load testing (depends on: 1)
Make the current system measurable so cutovers are based on data, not hope.
- Add structured logs, metrics, and distributed tracing to the monolith and future services.
- Define SLOs and error budgets for storefront, catalogue, cart, checkout, payments, and order management.
- Add synthetic transactions and real-user monitoring for 8 countries, 3 currencies, and 4 languages.
- Build a performance test environment that replays production-like traffic at peak 12x volume.
- Create dashboards for golden signals, slow queries, stored procedure hotspots, and cache/index health.
4. Build zero-downtime CI/CD and database migration automation (depends on: 2)
This is the safety rail for every later step: frequent, reversible, low-risk deployments.
- Replace the biweekly single-artifact release with a pipeline supporting per-service builds, automated tests, security scans, and deployment.
- Introduce canary and blue-green deployment with automated rollback based on SLOs and error budgets.
- Add expand/contract database migration patterns: first add new schema, dual-write or synchronise, switch reads, then remove old schema in a later release.
- Ensure every service change is independently deployable in minutes, with no planned maintenance window.
- Use infrastructure-as-code and immutable artifacts for all environments.
5. Strengthen tests and add contract testing before cutting seams (depends on: 3, 4)
Raise confidence in behaviour without freezing features, focusing on seams to be extracted.
- Build characterization tests around current API endpoints, stored procedures, pricing rules, and checkout flows.
- Add consumer-driven contract tests between the monolith and new services.
- Introduce mutation testing and enforce at least 80% coverage on changed code.
- Add data-migration tests, reconciliation tests, and performance regression gates to CI/CD.
- Keep a long-running dual-read and diff harness for later services.
6. Introduce traffic routing and feature flag platform (depends on: 4, 5)
Enable gradual migration and instant rollback without redeploying the entire monolith.
- Deploy a feature flag system and edge/API gateway that can route traffic by customer, country, currency, language, percentage, and header.
- Add dark-launch capability to send shadow traffic to new services while the monolith remains source of truth.
- Implement kill switches that revert to monolith paths in one action.
- Integrate flags with SLO dashboards and deployment rollback.
7. Extract customer accounts and loyalty as pilot service (depends on: 2, 3, 4, 5, 6)
Prove the extraction playbook on a well-bounded, lower-risk capability before touching the most complex modules.
- Create a customer service owning customer, address, and loyalty data; expose a REST API with the same contracts.
- Move related monolith code behind an anti-corruption layer; run dual-writes or CDC to keep data in sync.
- Use expand/contract database migration: retain monolith tables temporarily, synchronise with the service, then switch reads/writes by flag.
- Launch to a small country and a small traffic percentage; monitor SLOs and rollback if errors exceed the error budget.
- Use the pilot to refine templates, runbooks, and training for other teams.
8. Extract catalogue and search into a dedicated service (depends on: 3, 4, 5, 6, 7)
Move the read-heavy catalogue and search path first, as it is valuable and relatively safe if done in shadow mode.
- Build a catalogue/search service that owns product, category, and search data; maintain the Lucene index within the service or via a dedicated index.
- Synchronise catalogue data from the monolith through CDC or events; stop cross-module joins.
- Serve storefront and mobile via the new catalogue/search API; run shadow reads against the monolith and compare.
- Route reads progressively by country and language and validate search quality, latency, and conversion.
- Keep the monolith fallback and flag-based rollback until after the peak readiness gate.
9. Extract pricing and promotions with dual-run comparison (depends on: 7, 8)
The most complex module; migration must be based on observed behavioural equivalence.
- Build a pricing/promotions service with country-specific rules as versioned configuration or domain rules.
- Run the new service in shadow mode on all checkout/cart/catalogue calls and compare every calculation with the monolith for months before cutover.
- Treat any divergence as a defect; require 100% parity on sampled and historical promotion scenarios before routing live traffic.
- Expose a pricing API and route live reads/writes only by country and promotion type, with immediate rollback.
- Keep the monolith promotion engine available until after all peak seasons.
10. Extract inventory service and modernise warehouse integration (depends on: 7)
Replace the 15-minute file exchange with safer, event-driven inventory updates while keeping the old path as fallback.
- Build an inventory service owning stock levels, reservations, and warehouse sync logic.
- Integrate with the warehouse system via API or events and keep the file exchange running in parallel for dual sync.
- Expose inventory availability and reservation APIs for cart, checkout, and back-office.
- Run reconciliation between the old file batch and the new event flow for all SKUs; eliminate divergence before cutover.
- Route inventory consumers to the service progressively, maintaining the monolith fallback.
11. Extract cart and checkout service (depends on: 7, 8, 9, 10)
Move the highest-value transaction path only after its dependencies are available and proven.
- Build a cart/checkout service that owns cart state and checkout workflow; it calls customer, catalogue, pricing, and inventory APIs with fallbacks.
- Integrate the three payment providers through adapters; implement idempotency, retries, and reconciliation.
- Use saga or orchestration for payment, inventory reservation, and order creation.
- Route by country, currency, and traffic percentage; start with one payment provider and one country.
- Rehearse rollback to monolith checkout and validate that no cart or payment is lost.
12. Peak readiness gate before first sales peak (depends on: 7, 8, 9, 10, 11)
Protect the first peak by freezing risky cutovers while allowing normal feature work through flags.
- Freeze new service cutovers and irreversible data migrations for four weeks before and during the peak.
- Run production-like load tests at 12x baseline with monolith and new services in their current routing ratios.
- Rehearse rollback for every extracted service and confirm the monolith fallback handles full load.
- Pre-scale infrastructure to at least 30% above expected peak.
- Keep on-call and war-room runbooks ready; certify only if all SLOs pass in load tests.
13. Extract order management service after first peak (depends on: 11, 12)
Move order persistence and lifecycle after the first peak, using events from checkout and inventory.
- Build an order service owning orders and order lines; consume order-placed events from checkout and payment.
- Replace monolith order creation and status update code behind flags.
- Backfill historical orders into the service and run reconciliation.
- Route order read/write traffic progressively; maintain the monolith fallback.
- Ensure returns and customer service integration remains consistent.
14. Extract returns service (depends on: 13)
Move returns and refunds out of the monolith once order and inventory services are stable.
- Build a returns service owning return requests, labels, refund settlements, and status.
- Integrate with order, inventory, and payment services via APIs and events.
- Migrate business rules country-by-country with dual-run comparison.
- Keep the monolith fallback and rollback for all return journeys.
15. Extract back-office capabilities (depends on: 13, 14)
Decouple internal staff tools from the monolith so operations run on the new services.
- Build a new back-office UI or modular back-office services that use the same APIs as storefront services.
- Migrate catalogue, pricing, inventory, order, customer, and returns management screens incrementally.
- Route the 300 staff users per function and country; keep the old monolith back-office available during transition.
- Automate manual processes and remove direct SQL access to migrated data.
16. Peak readiness gate before second sales peak (depends on: 13, 14, 15)
Repeat the readiness gate for the second peak with more services in production.
- Freeze cutovers and irreversible migrations four weeks before and during the peak.
- Run full production-like load test at 12x peak with current routing ratios.
- Rehearse rollback for order management, returns, and back-office services.
- Verify capacity headroom and failover to monolith if required.
- Certify only if all critical SLOs are met under peak stress.
17. Decommission monolith code and data ownership for migrated modules (depends on: 16)
Remove the old implementation only after both peaks and after all services have proven parity.
- Remove feature flags and dark-launch paths for customer, catalogue, pricing, inventory, cart/checkout, orders, and returns.
- Drop or archive monolith tables and stored procedures for migrated modules after data reconciliation.
- Delete monolith code paths and reduce monolith size; verify no cross-module joins remain.
- Run final reconciliation and zero-downtime data archival.
18. Final cutover, contract freeze and monolith retirement (depends on: 17)
Complete the strangler migration so the monolith stops serving business traffic.
- Switch any remaining traffic to services and remove edge routing to the monolith.
- Decommission monolith deployments; maintain a read-only archive for audit.
- Finalise API contracts, versioning, and service ownership.
- Complete security reviews and production runbooks for all services.
19. Continuous improvement and governance handover (depends on: 18)
Make the new architecture the default and keep it safe after migration.
- Embed service ownership: each team owns build, deploy, and operate with SLOs.
- Review cost, performance, and reliability; tune autoscaling and capacity for the next peak.
- Update architecture decision records, runbooks, and onboarding material.
- Establish a light-touch governance board for API and data contracts.
--- PROPOSAL 5 (agent qwen3.8-max_initial_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned downtime throughout the 12-month migration; all maintenance performed via blue-green or canary cutover.
- Every extraction step is reversible within 5 minutes via feature-flag rollback, validated at least once in production before full cutover.
- Deployment frequency increases from bi-weekly to at least daily per service by month 4.
- Peak-load capacity sustained at 12× normal traffic (≈ 480 000 orders/day) with p99 latency ≤ 800 ms for checkout and ≤ 400 ms for storefront during January and July sales.
- Test coverage on all migrated code paths reaches ≥ 80 %; contract tests exist for every inter-service boundary.
- Monolith codebase reduced from 2 M lines to 0 lines in production by end of month 12.
- All 350 tables are owned by exactly one service; zero cross-service direct database joins remain.
- The three payment providers maintain ≥ 99.95 % successful transaction rate throughout the migration.
- Back-office availability for 300 staff ≥ 99.9 % during business hours across all 8 countries.
- Mean time to recovery (MTTR) for any single-service incident ≤ 10 minutes.
- No degradation in order-accuracy rate (≥ 99.99 %) or inventory reconciliation accuracy (≥ 99.9 %) at any point during the migration.
- Customer-facing error rate (5xx) stays below 0.1 % across all 8 countries, 3 currencies, and 4 languages throughout the programme.
Steps (20):
1. Full-Scope Discovery and Dependency Mapping
Perform a **complete technical and organisational audit** of the monolith before any code changes.
- Run static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) to produce a module-level dependency graph across all 2 M lines of Java and all 350 PostgreSQL tables.
- Catalogue every stored procedure, trigger, and cross-module join; classify each as *local*, *cross-module read*, or *cross-module write*.
- Interview each of the five teams to document tribal knowledge, especially the pricing & promotions rules (200 K lines, country-specific logic).
- Map all external integrations: three payment providers, warehouse file exchange, mobile-app endpoints, back-office UI routes.
- Record current performance baselines: p50 / p95 / p99 latency per endpoint, throughput, DB query plans for the top-100 queries.
- Deliverable: a living architecture dossier stored in a shared wiki, updated throughout the migration.
2. Build CI/CD Pipelines and Feature-Flag Platform (depends on: 1)
Create the **deployment and release-safety infrastructure** that every later step depends on.
- Stand up a CI/CD stack (e.g. GitLab CI or GitHub Actions → ArgoCD) capable of building, testing, and deploying individual modules independently.
- Introduce a feature-flag platform (LaunchDarkly, Flagsmith, or Unleash) wired into the monolith via a thin SDK; every new or changed code path ships behind a flag.
- Define branching strategy: one repo per future service, plus the existing monorepo during the transition period.
- Automate canary and blue-green deployment patterns so every release can be rolled back in under five minutes.
- Target: reduce the two-week release cycle to **daily deployable** by end of this step.
3. Establish Observability, Tracing, and SLO Baseline (depends on: 1)
Instrument the monolith so that **every subsequent extraction is measurable** and regressions are caught within minutes.
- Deploy OpenTelemetry agents across all application nodes; export traces, metrics, and structured logs to a central stack (Grafana Tempo + Prometheus + Loki, or Datadog).
- Define SLOs per domain: storefront p99 < 400 ms, checkout p99 < 1.2 s, search p95 < 300 ms, back-office p95 < 2 s.
- Build real-time dashboards per SLO with alerting thresholds; wire alerts to on-call rotation.
- Implement synthetic transaction monitoring covering the critical user journeys (browse → cart → checkout → payment → confirmation) across all 8 countries, 3 currencies, and 4 languages.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
4. Automated Testing Uplift and Contract-Test Foundation (depends on: 2)
Raise test coverage from **25 % to at least 60 %** on the paths that will be touched first, and introduce contract testing.
- Use mutation testing (PIT) to identify the highest-risk untested paths; prioritise checkout, payment, and inventory flows.
- Add integration tests using Testcontainers with a seeded copy of the production schema.
- Introduce Pact (or Spring Cloud Contract) for consumer-driven contract tests between every pair of modules that will become separate services.
- Build a regression suite of end-to-end smoke tests runnable in < 15 minutes, executed on every deploy.
- Define a policy: no extraction proceeds unless the affected module reaches the agreed coverage threshold.
5. Team Topology Realignment and Governance Model (depends on: 1)
Reorganise the five teams into **stream-aligned, domain-owned squads** and agree on governance rules for the migration.
- Map each team to a bounded context: (1) Storefront & Search, (2) Pricing & Promotions, (3) Cart, Checkout & Payments, (4) Order Management, Inventory & Returns, (5) Customer, Loyalty & Back-Office.
- Assign a Platform/Enablement guild (2–3 senior engineers drawn across teams) responsible for shared infra, libraries, and cross-cutting concerns.
- Agree on API governance: versioning policy (URL-path major, header minor), deprecation window (minimum 90 days), and an internal API catalogue.
- Set up a weekly cross-team architecture sync and a migration-risk register reviewed every sprint.
- Define the rollback decision tree: who can trigger a rollback, under what SLO breach, and the communication protocol.
6. Strangler-Fig Gateway and Anti-Corruption Layer (depends on: 2, 3)
Deploy an **API gateway in front of the monolith** that will route traffic to either the legacy code or the new services, enabling incremental extraction.
- Place a reverse-proxy / service mesh layer (e.g. Kong, Envoy via Istio, or AWS ALB + App Mesh) in front of the existing load balancer.
- Implement an Anti-Corruption Layer (ACL) service that translates between the monolith's internal models and the new service APIs.
- Configure the gateway to route by URL pattern, header, or feature flag; default route goes to the monolith.
- Support traffic mirroring (shadow traffic) so new services can be validated against live production traffic before receiving real requests.
- All mobile-app and back-office traffic passes through the gateway from day one; server-rendered pages are proxied transparently.
7. Database Decomposition Strategy and Shared-Data Refactor (depends on: 1, 4)
Prepare the **1.2 TB PostgreSQL database** for eventual per-service ownership without a big-bang migration.
- Classify all 350 tables by bounded context using the dependency map from S1.
- Eliminate cross-module joins at the application layer first: replace them with service calls or denormalised read models.
- Convert stored procedures that span contexts into application-level logic behind the ACL; keep single-context procedures temporarily.
- Introduce an internal event log (outbox pattern) on the existing database: every state change publishes a row to an `outbox` table, later relayed to a message broker.
- Define the target data-ownership matrix: which service will own which tables, and which data will be replicated read-only.
- Plan a dual-write / change-data-capture (CDC) strategy using Debezium so that during transition both old and new stores stay consistent.
8. Event-Driven Backbone and Async Messaging Layer (depends on: 6, 7)
Stand up the **messaging infrastructure** that decouples services and replaces synchronous cross-module calls.
- Deploy Apache Kafka (or AWS MSK) with topics per bounded context: `catalogue-events`, `order-events`, `inventory-events`, `pricing-events`, `customer-events`.
- Implement the transactional outbox relay (Debezium → Kafka Connect) so the monolith can publish domain events without code changes to business logic.
- Define event schemas in a central Schema Registry (Avro / Protobuf) with backward-compatibility enforcement.
- Add idempotent consumer patterns and dead-letter queues from day one.
- Validate throughput: the backbone must sustain 12× peak (≈ 480 000 orders/day equivalent event volume) with headroom.
9. Containerisation and Kubernetes Platform Readiness (depends on: 2, 3)
Package the monolith and prepare a **Kubernetes-based runtime** for all future services.
- Dockerise the existing monolith (multi-stage build, slim JRE image) and deploy it to a Kubernetes cluster alongside the gateway.
- Provision namespaces per bounded context, with network policies enforcing that only the gateway and the ACL can reach the monolith.
- Configure horizontal pod autoscaling, pod disruption budgets, and resource quotas sized for 12× peak.
- Set up a service mesh (Istio or Linkerd) for mTLS, traffic splitting, circuit breaking, and retry policies.
- Run a load test replicating the January-sale profile (12× normal traffic) to validate the platform before any service extraction.
10. Extract Customer Accounts and Loyalty Service (Wave 1) (depends on: 4, 6, 7, 8, 9)
Carve out the **lowest-risk, well-bounded domain** first to validate the full extraction playbook.
- Build a new `customer-service` (Java 21 / Spring Boot 3 or Kotlin) exposing REST + gRPC APIs for registration, authentication, profile, and loyalty points.
- Migrate the relevant 15–20 tables to a dedicated PostgreSQL instance using the CDC dual-write pattern from S7.
- Place the service behind the ACL; route traffic via feature flags starting at 1 % → 10 % → 50 % → 100 % over two weeks.
- The monolith continues to serve as fallback; a single flag flip routes 100 % back.
- Validate contract tests, SLO dashboards, and rollback procedure end-to-end.
- This extraction serves as the **reference implementation** for all subsequent waves.
11. Extract Catalogue and Search Service (Wave 2) (depends on: 10)
Replace the nightly Lucene rebuild with a **real-time search and catalogue service**.
- Build a `catalogue-service` owning product data, categories, and media references; use CDC from the monolith DB during transition.
- Replace Lucene with Elasticsearch or OpenSearch; index updates driven by Kafka events instead of the nightly batch.
- Expose search and browse APIs through the gateway; server-rendered storefront pages call the new API via the ACL.
- Migrate in two sub-phases: (a) read-only catalogue and search behind flags, (b) write path (product updates from back-office) once reads are stable.
- Keep the legacy Lucene index warm for instant rollback for 60 days.
- Validate that search latency meets the p95 < 300 ms SLO across all 4 languages.
12. Extract Inventory and Warehouse Sync Service (Wave 3) (depends on: 10)
Isolate the **inventory domain and its 15-minute file-exchange** with the warehouse system.
- Build an `inventory-service` owning stock levels, reservations, and warehouse synchronisation.
- Replace the file-based exchange with an event-driven adapter: the service consumes warehouse updates via SFTP poll or API and publishes `inventory-updated` events to Kafka.
- During transition, run the adapter in parallel with the legacy file job; reconcile counts nightly.
- Checkout and order-management modules consume inventory availability via synchronous gRPC (with circuit breaker) and asynchronous events for reservation confirmations.
- Migrate stock tables using CDC; rollback path re-points reads to the monolith tables.
- Validate under 12× peak load: inventory checks must not become a bottleneck during flash sales.
13. Deep Analysis and Rule Documentation for Pricing & Promotions (depends on: 1)
Before touching the **most complex 200 K-line module**, invest in understanding and documenting its rules.
- Pair domain experts from each of the 8 country teams with developers to walk through every pricing rule, promotion type, and country-specific override.
- Produce a machine-readable rule catalogue (decision tables or a lightweight DSL) that captures all 200+ identified rules.
- Identify dead code, redundant branches, and rules that have not fired in the last 24 months (use production logging and feature-flag data).
- Classify rules into: (a) universal, (b) country-specific, (c) campaign/temporary.
- Define the target architecture: a `pricing-service` with a rules engine (Drools, Easy Rules, or a custom evaluation pipeline) externalised from application code.
- Deliverable: a signed-off rule specification document that all five teams agree represents current behaviour.
14. Extract Pricing and Promotions Service (Wave 4) (depends on: 11, 12, 13)
Rebuild the **highest-risk module** as an independent service using the documented rule set from S13.
- Build a `pricing-service` with a pluggable rules engine; encode the rule catalogue from S13 as configuration rather than hard-coded Java.
- Expose two API surfaces: synchronous price calculation (called by cart/checkout) and asynchronous promotion evaluation (event-driven for campaign changes).
- Run the new service in **shadow mode** for 4–6 weeks: every pricing request is sent to both the monolith and the new service; a comparator flags discrepancies.
- Only after the discrepancy rate drops below 0.01 % over two full weeks (including a weekend) begin traffic shifting via feature flags.
- Migrate pricing tables via CDC; keep monolith pricing logic compilable and deployable as rollback for 90 days.
- Assign dedicated on-call coverage for the first 30 days post-cutover.
15. Extract Cart, Checkout, and Payment Service (Wave 5) (depends on: 14)
Separate the **revenue-critical checkout flow** into its own service with hardened payment integration.
- Build a `checkout-service` owning cart state, checkout orchestration, and integration with the three payment providers.
- Cart state moves to a dedicated data store (Redis for transient cart, PostgreSQL for persisted orders) with CDC from the monolith during transition.
- Payment-provider integrations are wrapped in an adapter layer with circuit breakers and idempotency keys; failover order between providers is configurable per country.
- Migrate in sub-phases: (a) cart operations, (b) checkout orchestration, (c) payment capture and confirmation.
- Run chaos-engineering tests (payment-provider timeout, partial failure) before enabling real traffic.
- Rollback: feature flag routes checkout back to monolith; in-flight transactions are drained gracefully.
16. Extract Order Management and Returns Service (Wave 6) (depends on: 15)
Move **post-purchase order lifecycle and returns processing** into a dedicated service.
- Build an `order-service` consuming `order-placed` events from checkout; it owns order state machine, fulfilment tracking, and returns workflow.
- Integrate with the inventory service for reservation release and with the warehouse adapter for shipping updates.
- Back-office order views call the new service API through the gateway; legacy views remain as fallback.
- Migrate order and returns tables via CDC; reconcile daily during the 60-day dual-run window.
- Validate that the returns process (including cross-border returns across the 8 countries) works identically.
- Rollback re-routes order queries to the monolith; event replay ensures no order is lost.
17. Extract Back-Office and Admin Portal (Wave 7) (depends on: 16)
Deliver a **modern back-office** for the 300 staff users, consuming the new service APIs.
- Build a new back-office frontend (React or Vue SPA) backed by a thin BFF (Backend-for-Frontend) that aggregates calls to catalogue, pricing, order, inventory, and customer services.
- Migrate back-office routes incrementally via the gateway; legacy server-rendered admin pages remain accessible.
- Implement role-based access control (RBAC) and audit logging as cross-cutting concerns in the BFF.
- Run parallel operation for 4 weeks: staff use the new portal with a feedback channel; legacy portal stays one click away.
- Decommission legacy admin screens only after 30 days of zero critical issues.
- Provide training sessions and documentation for all 300 back-office users.
18. Storefront Modernisation and Mobile-App API Alignment (depends on: 11, 14, 15)
Update the **customer-facing storefront and mobile-app integration** to consume the new service layer.
- Refactor the server-rendered storefront to call service APIs via the gateway instead of hitting monolith endpoints directly.
- Introduce a Storefront BFF that aggregates catalogue, pricing, cart, and customer data for page rendering.
- Ensure the mobile app switches to the new API version behind the gateway; enforce backward compatibility for two app-release cycles.
- Implement edge caching (CDN + Varnish) for catalogue and search responses to protect services during 12× peaks.
- Validate all 4 language / 3 currency combinations through automated E2E tests.
- Rollback: gateway routes storefront traffic back to the monolith rendering path.
19. Peak-Season Load Testing and Resilience Validation (depends on: 9, 15, 16)
Prove the platform sustains **12× peak load** before the January and July sales windows.
- Build a load-test suite (Gatling or k6) replicating the full user journey across all 8 countries, including promo-code-heavy scenarios.
- Execute a full 12× load test in a staging environment that mirrors production topology, data volume (1.2 TB replica), and service versions.
- Run chaos-engineering experiments: kill random pods, introduce network latency, take a payment provider offline, simulate Kafka broker loss.
- Validate autoscaling: confirm that pod counts scale to handle peak within 90 seconds and scale down gracefully.
- Produce a signed-off capacity report; any component that fails the 12× test blocks go-live.
- Schedule this step at least 3 weeks before each peak season (early December for January sales, early June for July sales).
20. Monolith Decommission and Final Data Migration (depends on: 16, 17, 18, 19)
Retire the legacy monolith **only after all traffic is served by the new services**.
- Verify that zero production requests route to the monolith for 30 consecutive days.
- Perform a final data reconciliation: compare monolith DB checksums against service-owned databases.
- Archive the monolith codebase and database; retain read-only access for 12 months for audit and compliance.
- Decommission monolith infrastructure; reclaim compute and storage resources.
- Update all runbooks, on-call rotations, and disaster-recovery plans to reference the new service topology.
- Conduct a cross-team retrospective documenting lessons learned, technical debt incurred, and future improvement backlog.
HOW THE ROUNDS WENT (from the round analyses):
Round 0: All five agents converge on the strangler-fig pattern with feature flags, canary routing, and event-driven data transition, but diverge sharply on extraction sequence, pricing-risk handling, and ambition for monolith retirement. Proposal 5 is the most aggressive, targeting zero monolith lines in 12 months and seven extraction waves with concrete tooling choices (Debezium, Kafka, Elasticsearch, Pact). Proposal 2 is the most conservative, treating pricing as a dedicated discovery stream and explicitly allowing partial extraction if parity cannot be proven. Proposals 1 and 4 follow a more traditional sequential extraction with explicit peak-readiness gates, while Proposal 3 emphasises monolith modularisation in place and a strict freeze calendar around sales windows.
Proposal 1: A 23-step plan that builds Kubernetes infrastructure, a strangler proxy, and observability in the first two months, then extracts services in a low-to-high-risk order: catalogue/search, customer accounts, returns, pricing, inventory, payments. Pricing is treated as a dedicated audit and rebuild stream starting early in parallel with infrastructure work. The plan ends with a 48-hour pre-peak rehearsal, load testing at 12x, and a go/no-go gate before each sales period.
Proposal 2: A 20-step plan that front-loads governance, baseline measurement, and production safety before any extraction. It sequences five waves from read-only catalogue/search through to cart/checkout, explicitly excluding pricing from early waves and treating it as a bounded-slice discovery stream. It mandates sales protection windows (four weeks before and through January/July), prohibits distributed transactions, and requires formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and support.
Proposal 3: A 25-step plan that starts with monolith modularisation in place (package-level bounded contexts, branch-by-abstraction) before creating any new processes. It enforces a hard freeze calendar around sales (six weeks before, two weeks after), extracts search first as a read-heavy low-risk seam, and uses a dual-run shadow harness for pricing before any traffic shift. The plan includes explicit steps for cart-state migration, checkout canary by country and payment method, and back-office UI migration screen-by-screen.
Proposal 4: A 19-step plan that starts with bounded-context decomposition and CI/CD automation, then extracts customer accounts as a pilot, followed by catalogue/search, pricing with months-long shadow comparison, inventory, cart/checkout, and orders. It inserts two explicit peak-readiness gates (steps 12 and 16) that freeze cutovers four weeks before each sales period. The plan targets 60% monolith code reduction by month 12 and requires 80% test coverage on changed code.
Proposal 5: A 20-step plan organised in seven extraction waves, targeting complete monolith retirement (zero lines in production) by month 12. It specifies concrete tooling: Debezium for CDC, Kafka for events, Elasticsearch to replace Lucene, Pact for contract tests, and Gatling/k6 for load testing. Pricing gets a dedicated six-step analysis and shadow-mode extraction (steps 13-14) with a 0.01% discrepancy threshold over two weeks before traffic shift. The plan includes storefront BFF modernisation and a 30-day zero-traffic verification before decommissioning.
Round 1: All five proposals converged strongly toward a shared architecture: strangler gateway, event backbone with outbox/CDC, pricing archaeology before extraction, dual peak-readiness gates, and honest acknowledgment that full monolith retirement may not be achievable in 12 months. The refinement round produced materially better plans overall, with Proposals 2 and 3 standing out for risk realism and Proposal 1 remaining the weakest due to overly aggressive scope commitments. The principal divergence remaining is whether the 12-month target demands full monolith decommission (Proposals 1, 5) or accepts a residual monolith behind façades (Proposals 2, 3).
Proposal 1 (mixed): The proposal adopted the governance-and-peak-calendar framing, pricing archaeology workstream, and warehouse adapter pattern from other round-0 proposals, which are genuine improvements. However, it retained unrealistic end-state commitments: decommissioning the monolith to under 100k lines and assigning all 350 tables to single services by month 12. The step descriptions are thin compared to peers, and the sequencing still places cart/checkout extraction after only one peak gate, compressing the riskiest work into the final quarter.
Proposal 2 (improved): The refinement sharpened the proposal's already strong risk discipline by adding an explicit peak calendar step (step 4), a dedicated payment-adapter step (step 16) separated from checkout, and a clearer back-office migration path (step 20). The 12-month scope is now explicitly bounded: façades and proven slices count as success, and a funded follow-on roadmap covers anything not safely transferred. The step count dropped from 20 to 22 but each step gained more actionable sub-bullets and clearer entry/exit criteria.
Proposal 3 (improved): The refinement consolidated the original 25 steps into 23 with tighter grouping and added two explicit peak-certification steps (21, 22) that were previously implicit. The honest-scope position is now stated bluntly in step 3: 'Full monolith retirement is not a 12-month promise.' The pricing section (steps 15–16) is sharper, separating archaeology from dual-run slice migration. The team model step (4) now specifies a 50/30/20 capacity split, making the no-freeze commitment concrete.
Proposal 4 (improved): The refinement added a migration charter with peak calendar (step 1), a dedicated monolith-modularisation step (9), and two explicit peak-readiness gates (steps 20, 21) that were previously generic. The pricing section is now split into discovery (step 15) and extraction behind façade (step 16), matching the archaeology-first pattern from Proposals 2, 3, and 5. The data-transition playbook (step 8) is new and adds entity transition states and automatic halt thresholds. The plan is more realistic about sequencing but still targets eight independently deployable capabilities by month 12, which is ambitious.
Proposal 5 (improved): The refinement restructured the original 20 steps into 22 with clearer wave numbering, added a dedicated resilience-patterns step (9), and expanded the pricing section (steps 14–15) with a golden-master harness and dual-run comparison. The data-ownership cutover step (19) is new and adds entity transition states, automatic halt thresholds, and stored-procedure retirement criteria. The proposal retains its ambitious end-state (full monolith decommission) but now sequences it behind two peak gates and a 30-day zero-traffic observation, making it more realistic in execution if not in target.
Round 2: All five proposals converged strongly toward a shared vocabulary: peak-protection windows, façade-first pricing and checkout, single-writer cutovers, and an honest year-one scope that may leave the monolith partially intact. The most ambitious agents (Proposals 2, 3) adopted explicit non-goals and conditional success criteria, while the more prescriptive ones (1, 4, 5) retained numeric targets and full decommission plans. The principal remaining divergence is whether month-12 success is defined as 'independently deployable façades with proven rollback' or as 'monolith reduced ≥ 60 % with daily deploys'.
Proposal 1 (mixed): The rewrite adds stronger safety language (≤5-min rollback, error-budget auto-rollback, immutable audit events) and adopts the façade-first checkout pattern visible in Proposals 2 and 3. However, it retains aggressive end-state metrics—'≥ 60 % monolith reduction', '8 + independently deployable services', 'daily deploy cadence'—that contradict the conditional, evidence-gated philosophy the other proposals adopted. The tension between 'retain legacy pricing behind façade if parity is unproven' (S16) and 'monolith reduced ≥ 60 %' (success metric) is unresolved.
Proposal 2 (improved): The revision tightens the conditional-scope philosophy throughout: the year-one target is now explicitly 'independently deployable capabilities, not an unsafe promise to fully retire every monolith transaction'. Payment isolation (S15) is elevated to a standalone step before checkout migration, and the pricing step now requires business and finance sign-off per rule slice. The plan drops the separate 'peak calendar' step and folds it into governance (S1), reducing step count from 22 to 21 without losing content.
Proposal 3 (improved): The plan is restructured around two explicit 'seasons' aligned to the January and July peaks, making the calendar constraint operational rather than aspirational. A new unified extraction playbook (S10) eliminates per-domain improvisation. The honest-scope philosophy is strengthened with explicit non-goals (S3) and a conditional throttle ('If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only'). The step count drops from 23 to 22 while gaining clarity.
Proposal 4 (improved): The revision consolidates the original 23 steps into 21 by merging the resilience-patterns step into the event-backbone step and splitting the single peak gate into two explicit gates (S18, S20) aligned to January and July. Data-ownership cutovers (S19) are now explicitly scheduled after the second peak, reducing risk. The plan adds a back-office step (S17) that was missing in round 1. Success metrics now include '10 core capabilities independently deployable', up from 8, which is more ambitious but supported by the step structure.
Proposal 5 (mixed): The plan adds three new steps: pricing archaeology (S13), order-query/returns slices (S15), and payment-provider adapters (S16), filling gaps from round 1. The second peak gate (S22) is now explicit. However, the plan retains aggressive metrics ('monolith reduced ≥ 60%', 'daily deploy per service') alongside conditional language ('façade plus proven slices is success'), creating internal tension. The step count grows to 23, the highest in the round, and some steps (S19, S20) are very long with many sub-bullets that could be split.
Round 3: All five proposals converged strongly on a shared vocabulary and structure: an honest year-one scope that accepts façades as valid outcomes, a seasonal cadence gated by two formal peak-certification steps, and a single extraction playbook. The main remaining differentiator is conservatism about timing and write-ownership transfer: Proposals 2 and 3 remain the most cautious, Proposal 1 adds explicit programme re-forecasting, and Proposals 4 and 5 lean toward a fuller 23-step programme with more ambitious decommission targets.
Proposal 1 (mixed): Proposal 1 adds genuinely new programme-management ideas (decision trees for migration delay, a Month-3 strategic review, a 4-month warehouse-adapter burn-in gate) and restructures the calendar around explicit month labels. However, it removes the dedicated progressive traffic migration step from its previous version and the standalone peak readiness gate 1, folding traffic management and certification into other steps. The result is richer in programme control but thinner in operational execution detail.
Proposal 2 (improved): Proposal 2 consolidates 21 steps into 18 by merging related activities (instrumentation with testing, paved road with monolith modularisation, pricing slices with cart/checkout façades). It adds a concrete September-to-August calendar example and sharpens command-rollback semantics. The compression improves readability without losing substantive content, and the January gate (S9) is now more explicit about limited pre-January scope.
Proposal 3 (improved): Proposal 3 makes two structural improvements: it merges the separate search and catalogue extraction steps into a single Season 1 step (S12), and it consolidates the final back-office, write-ownership, and steady-state handover into one closing step (S20). It adds a Postgres connection budget to the paved-road step and PCI scope protection to metrics. The result is tighter at 20 steps without losing substance.
Proposal 4 (mixed): Proposal 4 restructures from 21 to 23 steps, adding dedicated steps for strangler gateway (S6), monolith modularisation (S7), and payment adapters (S17). It adopts the honest year-one scope and façade-as-success language from other proposals. However, it retains the aggressive success metric of 'at least 10 core capabilities independently deployable' and 'monolith codebase reduced by at least 60%', which conflict with the conservative tone adopted by most other proposals. The step numbering introduces a dependency anomaly where S19 (data ownership) depends on S20 (peak gate 2).
Proposal 5 (improved): Proposal 5 undergoes the most substantial restructuring, moving from a grok-4.6-influenced seasonal structure to a comprehensive 23-step programme that integrates ideas from all four other proposals. It adds a dedicated extraction playbook step (S10), explicit static-analysis tooling (jQAssistant, ArchUnit), mutation testing, and a Postgres connection budget. The result is the most detailed and cross-referenced proposal, though at the cost of length.
Round 4: All five proposals converged further on the same structural spine: charter, baseline, observability, platform, gateway, events, pricing archaeology, two peak gates, and a closing consolidation step. The most notable change is the formal extraction playbook (adopted from Proposals 3 and 5) now appearing explicitly in Proposal 2, while most agents refined wording, tightened dependencies, and added operational details such as Postgres connection budgets and SSR cache handling. Proposals are now very close in substance; the main remaining differentiators are granularity (23 steps vs. 20), the explicitness of the reforecast checkpoint, and how teams are mapped to deployable units.
Proposal 1 (improved): Proposal 1 restructured from 23 to 23 steps but reorganised waves and added a post-peak-1 reforecast checkpoint (S16) that was absent in its round-3 version. It adopted the explicit extraction-playbook concept from Proposals 3 and 5, tightened success metrics with latency thresholds and deployment-frequency targets, and merged pricing dual-run with payment isolation into a single wave step for tighter sequencing. The rewrite also adds a gateway latency overhead cap (<50 ms p99) and a monolith-codebase-reduction metric (≥60%), both new measurable commitments.
Proposal 2 (improved): Proposal 2 restructured from 18 to 20 steps, adding a dedicated extraction playbook (S9), a separate warehouse-adapter step (S11), and splitting the first-sale gate from the second more cleanly. It also added an explicit 'executable safety net' step (S6) with a 15-minute regression-suite target and a command-rollback semantics definition in S7. The rewrite is tighter on in-flight financial-command treatment and adds a PostgreSQL connection-budget reservation for full monolith fallback in S5.
Proposal 3 (improved): Proposal 3 restructured from 20 to 22 steps, splitting the warehouse adapter from inventory reads (S12, S15), adding a dedicated reforecast step (S17), and merging order-query with cart/checkout façades into a single step (S19). It added a Postgres connection-budget metric, an explicit ban on new CDC load during protection windows, and a five-team operability constraint on the number of independently deployable units. The rewrite is more operationally grounded, explicitly staffing hypercare from existing teams and banning assumptions about extra headcount.
Proposal 4 (improved): Proposal 4 restructured from 23 to 23 steps but reorganised waves, adding a dedicated order-query step (S18) and splitting pricing dual-run from payment isolation into separate steps (S16, S17). It tightened the charter step with operations veto language, added a gateway overhead cap, and made the warehouse adapter stability gate explicit (≥4 months). The rewrite also adds a 'raise regression coverage on touched code to at least 60%' threshold in S7, a new quantitative gate for monolith preparation.
Proposal 5 (unchanged): Proposal 5 is essentially identical to its round-3 version. The tool reports 23 steps kept, 0 added, 0 removed. Minor wording adjustments appear in S1 (added 'operations/SRE lead' title, added 'daily migration dependency board') and S2 (added 'connection usage' to baseline metrics), but no structural, sequencing, or metric changes occurred. The proposal was already the most detailed in round 3 and the agent made no substantive revision in response to peer proposals.
THE PROPOSALS OF THE FINAL ROUND (4), to assess:
--- PROPOSAL 1 (agent claudeHaiku4.5_refine_1, anthropic/claude-haiku-4-5) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production step has a documented, rehearsed rollback; read-route rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes without losing payments, orders, or stock reservations.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined six-week freeze before, during, and two weeks after each January and July sale.
- Each January and July sale meets or exceeds pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline; no programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; unproven pricing, checkout, or order commands remain safely delegated behind independently deployable façades.
- Every migrated capability has zero direct writes to another service's database, zero new cross-context joins, and uses governed versioned APIs or events.
- Each ownership cutover has one command owner; unrestricted dual writes and distributed transactions are not used; unresolved record discrepancies are below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock, or order-total discrepancies.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate; no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes; mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window; deployment frequency trends toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout; no mobile-app release required for backend migration; warehouse file contracts remain valid.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries; zero forced logouts or password resets during migration.
- The monolith codebase is reduced by at least 60% of extracted functionality; remaining monolith no longer owns migrated data or executes migrated stored procedures.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2s and p95 storefront latency at or below 400ms during both January and July sales.
Steps (23):
1. Charter programme with revenue-protection governance model
Establish accountable leadership and protect January and July peaks before any technical work begins.
- Appoint programme lead, chief architect, operations lead, and domain owners for pricing, finance, warehouse, payments, privacy, and each country market.
- Publish 12-month calendar in week one. Mark hard freeze windows: six weeks before through two weeks after each January and July sale. Ban first-time cutovers, schema splits, payment changes, and traffic expansions during these windows.
- Reserve team capacity: 50% roadmap features, 30% migration, 20% quality and resilience. Only steering committee may rebalance. Feature delivery never stops.
- Define non-goals explicitly: big-bang pricing rewrite, 1.2 TB database split, Java 8 upgrade as prerequisite, forced mobile release, warehouse-contract change. The goal is independently deployable capabilities, not monolith decommission within 12 months.
- Ban big-bang rewrites, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires named ownership, tested rollback, and operations approval.
- Form weekly steering committee with risk register, dependency board, decision log, and escalation path.
2. Baseline live system: measure capacity, dependencies, and business invariants (depends on: 1)
Create the reference point for all later capacity, correctness, and rollback decisions. You cannot extract what you cannot measure.
- Trace top 30 customer, mobile, warehouse, payment, and back-office journeys through all modules, endpoints, 350 tables, stored procedures, triggers, and external systems.
- Inventory all tables and procedures by owner, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Identify tables with multiple writers as highest risk.
- Record p50/p95/p99 latency, error rates, conversion, payment approval, database load, Lucene rebuild time, inventory-sync lag, and recovery times at normal and 12x peak demand by country, currency, language, payment method, and channel.
- Capture invariants as testable assertions: exact price and tax per country, promotion stacking semantics, no duplicate payments or orders, stock-reservation rules, refund integrity, loyalty-ledger correctness, warehouse-export completeness.
- Produce a coupling heat map and extraction scorecard (risk, coupling, change frequency, data-ownership feasibility, operational maturity). Create production-shaped anonymised test fixtures and a repeatable 12x load profile.
3. Define target architecture, bounded contexts, and year-one scope (depends on: 2)
Agree pragmatic boundaries and realistic scope. Independently deployable services with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one system of record and accountable team per entity group. A service may replicate data but must never write another service's database. Prohibit distributed transactions.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every transition requires passing quantitative gates.
- Set year-one scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded-returns slices, payment adapters, pricing façade with proven rule slices, and cart/checkout façades. Transactional write ownership transfers only where evidence gates pass.
- Document API and event standards: versioning, schema compatibility, correlation IDs, idempotency, timeouts, retries, authentication, and deprecation rules.
4. Instrument estate and establish SLOs before moving traffic (depends on: 2)
Make the monolith and all future services observable. You cannot extract what you cannot see or measure.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic journeys across storefront, mobile, back-office, warehouse, and payment providers.
- Define SLOs and error budgets per domain: browse p99 <400ms, search p95 <300ms, checkout p99 <1.2s, payment p99 <2s, inventory <15min fresh, back-office p95 <2s. Build side-by-side dashboards comparing legacy and replacement paths.
- Alert on business outcomes, not just infrastructure: price mismatches, payment-without-order, order-without-payment, stock discrepancies, event lag, zero-result drift. Implement immutable audit events for pricing, payments, stock, orders, and GDPR actions.
- Establish error-budget policy: any extraction step breaching its SLO budget is automatically rolled back. Target five-minute detection for critical customer journeys.
- Test current backup, restore, database failover, provider outage handling, and incident communication procedures before service traffic is introduced.
5. Build delivery platform: CI/CD, flags, canary, and secure runtime (depends on: 3, 4)
Provide a paved road making independent service deployment safer than the current bi-weekly monolith train.
- Deliver service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, migrations, outbox publishing, and idempotent handlers.
- Create per-service CI/CD with build provenance, scanning, unit, integration, contract, smoke, and performance gates. Approval controls mandatory for financial changes.
- Implement feature-flag platform wired into monolith and services. Every new or changed code path ships behind a flag. Support canary, blue-green, country/cohort targeting, and instant kill.
- Provision production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer require the 30-minute maintenance window.
- Centralise secrets, certificate rotation, least-privilege identities, encryption, PCI scope assessment, and GDPR controls.
6. Create behavioural safety net: characterisation, contracts, and 12x harness (depends on: 4, 5)
Replace 25% unit-coverage confidence with automated evidence on revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty, and back-office. Automate as regression tests runnable in <15 minutes.
- Add characterisation tests around stored procedures, pricing rules, and checkout flows before modifying them. Establish consumer-driven contracts for every mobile, storefront, back-office, provider, and service boundary.
- Require 100% automated scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before ownership can change. Require 80% coverage on changed migration code.
- Build production-like environment with provider simulators, warehouse simulators, anonymised fixtures, and all country/currency/language/tax/promotion combinations. Automate load, soak, spike, failover, and chaos tests using the observed 12x profile.
- Use mutation testing to identify highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise live monolith without stopping feature delivery (depends on: 3, 5, 6)
Create internal seams before extracting. The monolith remains the primary production system for most of the year.
- Enforce package boundaries with ArchUnit tests and code ownership. Ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Apply expand-contract schema migrations only: additive first, destructive only with evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use new seams so roadmap helps rather than bypasses migration.
- Raise regression coverage on any module before it is touched using golden journeys from S6. Keep monolith on Java 8; start new services on current LTS.
8. Place strangler gateway with minute-scale rollback (depends on: 4, 5, 6, 7)
Decouple clients from monolith internals. Rollback becomes a route change, not a redeploy.
- Place API gateway in front of existing endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to monolith until promotion criteria met. Preserve cookies, tokens, sessions, headers, languages, currencies, and mobile API versions. Do not require mobile release.
- Mirror only safe read-only or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payments.
- Implement instant route rollback: configuration change, not redeploy, completing within five minutes including in-flight draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to monolith before moving any business endpoint. Measure baseline response equivalence and gateway latency (<50ms p99 overhead).
9. Deploy event backbone, outbox, and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine enabling safe data and command transition. Services subscribe to facts, not databases.
- Deploy event platform (Kafka or equivalent) with topics per bounded context, schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and consumer ownership. Size beyond 12x peak load.
- Add transactional outbox to new writes and selected monolith modules. Use CDC only where outbox cannot yet be added, with dated retirement plan.
- Implement idempotent consumers, anti-corruption adapters, duplicate-event handling, circuit breakers, bulkheads, timeouts, and correlation ID propagation.
- Build reconciliation framework comparing row counts, hashes, financial totals, stock totals, lag, and staffed exception queues.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted payments, orders, and reservations complete on their original compatible state machine or enter explicit auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume.
10. Launch parallel pricing archaeology and place façade over legacy engine (depends on: 2, 7)
Treat the 200,000-line pricing module as behaviour-preservation, not rewrite. Run in parallel with foundation work. Do not rewrite from tribal knowledge.
- Form dedicated cross-functional squad: senior engineers, merchandising, finance, country representatives, support, QA. Protect capacity for full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual actions, tax inputs, and external dependencies. Identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces. Build golden-master corpus spanning countries, currencies, dates, segments, baskets, vouchers, stacking, tax, and edge cases (≥1,000 real orders per country).
- Put existing engine behind versioned façade. All new callers use façade even while delegating to legacy logic.
- Classify rules into independently movable slices, permanent delegates, and inactive rules. Produce machine-readable rule catalogue.
- Build shadow evaluation harness comparing candidate outputs with legacy for exact amount, currency, tax, discount, eligibility, and latency. Deliver signed-off rule specification document by month 4.
11. Modernise warehouse integration without changing contract (depends on: 3, 9)
Build robust adapter upfront before extracting inventory service. Preserve warehouse SFTP contract and reservation authority.
- Build adapter validating, journalling, deduplicating, acknowledging, retrying, and replaying inbound/outbound warehouse files. Warehouse contract remains unchanged.
- Publish inventory-change events and build availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Run adapter alongside legacy job. Reconcile every SKU, warehouse, file, and availability result. Handle delayed, duplicate, malformed files and replay scenarios under peak load.
- Prove adapter sustains 15-minute sync cycles under 12x peak demand for ≥4 months before extracting any inventory service. Keep monolith stock reservation and warehouse-export authority.
12. Wave 1: Extract search and catalogue read services (post-January) (depends on: 8, 9, 11)
Prove the complete extraction playbook on read-heavy, non-authoritative capabilities before touching the money path.
- Build search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls. Build catalogue read models for eight countries around one product identity from monolith data via outbox or replication.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, conversion, content availability, and response time against current Lucene and monolith for ≥one week.
- Shift traffic through employee cohort, low-risk country, and measured percentages (1% → 10% → 50% → 100%) with instant route rollback. Keep old Lucene warm as cold standby through next sale.
- Search and catalogue must not be authoritative for price or stock. They consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and practised rollback. Deploy independently at least weekly.
13. Wave 1: Extract inventory availability reads (Months 3–5) (depends on: 8, 9, 11, 12)
Separate warehouse file handling from customer-facing reads while preserving reservation authority and order correctness.
- Build inventory service consuming inventory-change events from warehouse adapter (S11). Create availability read model for storefront and search with explicit freshness, safety-stock, and oversell semantics.
- Shadow-compare every SKU and warehouse against monolith for ≥two weeks. Reconcile every discrepancy before traffic expansion. Prove no extra oversell versus today's 15-minute lag before any peak.
- Move storefront and search availability reads progressively (1% → 10% → 50% → 100%). Provide immediate fallback to monolith and replayable file-recovery process.
- Keep monolith stock reservation, allocation, and warehouse-export authority until order ownership design is complete.
14. Wave 1: Extract customer identity, profile, and loyalty slices (Months 3–5) (depends on: 8, 9, 12)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, retention rules, subject-access, deletion, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before any writes.
- Move profile writes through one idempotent command path with compatibility adapter. Preserve existing browser and mobile sessions without forced logouts or password resets.
- Model loyalty as auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial commands until reconciliation is consistently clean.
- Route traffic via flags (1% → 10% → 50% → 100%). Rollback is single flag flip restoring monolith auth. Maintain staffed exception process for data-subject requests.
15. Peak readiness gate 1: certify hybrid estate before first sale (depends on: 6, 12, 13, 14)
Certify whatever is live and every fallback path before January or July peak. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in six-week protection window. Feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom: gateway, caches, monolith, services, events, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service (search, catalogue, customer, inventory) to monolith and confirm monolith plus legacy search can absorb full reverted load.
- Run game days: kill pods, inject latency, take provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load. Pre-scale, warm caches, validate connection limits.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and support before entering protection window. Ship only what passed this gate.
16. Post-peak 1 review and roadmap adjustment (Month 3) (depends on: 15)
Evaluate progress against plan and adjust remaining waves if significant slippage occurred.
- Measure actual versus planned: Did pricing archaeology take 2 or 4 months? Did warehouse adapter pass reliability gate? Did any service exceed capacity? Which teams are at risk?
- Review outstanding roadmap features. Assess whether 30% migration capacity is sustainable given observed velocity.
- For any slip >20% of planned work, reforecast the programme and adjust timeline or throttle later waves.
- Formalise decisions on which capabilities will remain behind façades (delegating to monolith) if full ownership transfer cannot safely complete by month 12.
- Update steering committee, business sponsors, and affected teams with adjusted roadmap and risk profile.
17. Wave 2: Dual-run pricing rule slices and establish payment isolation (Months 4–9) (depends on: 10, 12, 13, 14, 15)
Extract highest-risk module in proven slices using documented rule set. Isolate payment providers before changing checkout.
- Implement well-understood pricing slices as versioned configuration, not hard-coded logic. Expose synchronous price-calculation API and asynchronous promotion evaluation.
- Shadow-evaluate all applicable live price requests. Comparator flags every discrepancy classified by financial impact. Require business/finance sign-off before live routing.
- Promote a slice only after ≥99.99% exact parity over ≥two full weeks including weekend, zero unresolved monetary differences, capacity evidence, and written merchandising and finance approval.
- Wrap each of three payment providers behind versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and provider-specific failure handling.
- Introduce durable payment-attempt ledger and daily reconciliation of authorisations, captures, refunds, chargebacks, settlements, and order states. Preserve country and payment-method routing.
- Validate using provider sandboxes, recorded non-sensitive outcomes, and fault injection. Never mirror live payment commands. Keep PCI scope stable. If full engine extraction is unsafe by month 12, the independently deployable façade plus proven slices is success.
18. Wave 2: Extract order-query, returns slices, and notifications (Months 5–8) (depends on: 9, 14)
Create independently deployable post-order value without splitting revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox pattern.
- Build order-query service for self-service, support, notifications, and selected back-office reads. Extract bounded returns workflows (initiation, tracking, notification) where ownership is explicit.
- Backfill historical orders with checksums and resumable batches. Reconcile order counts, state transitions, notifications, returns, and event lag daily during 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback. Retain order creation, payment capture coordination, cancellation, refund authority, and warehouse export in monolith until checkout gates pass.
19. Peak readiness gate 2: certify before second sale with full topology (depends on: 15, 16, 17, 18)
Repeat certification before second peak with more services live. Rehearse full-load reversion with pricing, payments, and order services.
- Enforce same six-week freeze before and two weeks after peak. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology: gateway, caches, monolith, services, pricing slices, payment adapters, inventory, customer, search, events, warehouse adapter, and database.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds. Warm caches, pre-scale, agree provider limits.
- Run disaster-recovery drills: provider outage, event lag/duplication, database failover, search fallback, warehouse file delay, flag rollback at peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks and exception queues.
- Obtain written go/no-go from all stakeholders before entering protection window.
20. Wave 3: Cart/checkout façades and progressive orchestration (Months 8–11) (depends on: 13, 14, 17, 18)
Strangle transactional path without big-bang rewrite. Independently deployable façade is valuable even if monolith executes writes.
- Define cart identity, guest-to-account merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, and idempotency keys.
- Build cart and checkout façades initially delegating to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, compensation paths, and support procedures for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Move cart reads and writes first under single command owner with reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration only after failure-mode analysis and 12x hybrid tests pass. Canary by country and payment method (1% → 10% → 50% → 100%). If ownership transfer not safe before next protection window, retain façade delegating to monolith.
21. Migrate back-office workflows and refactor storefront to services (Months 9–12) (depends on: 12, 14, 17, 18, 19, 20)
Move 300 staff by workflow and role, not by replacing entire admin system. Refactor storefront to service APIs.
- Deliver domain BFFs and screens first for catalogue, order-query, return-status, inventory, and customer. Preserve role-based access, segregation of duties, audit logs, country entitlements, and exception handling.
- Run old and new screens in parallel per workflow (≥30 days). Provide training, floor support, and one-click fallback. Retire legacy screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway instead of hitting monolith directly. Mobile switches to new API version with backward compatibility for two app-release cycles.
- Implement edge caching (CDN) for catalogue and search to protect services during 12x peaks. Validate all language/currency combinations. Remove direct SQL access to migrated data; replace with governed read models.
22. Transfer data ownership through reversible single-writer cutovers (Months 11–12) (depends on: 9, 12, 13, 14, 17, 18, 19, 20, 21)
Move write ownership one entity group at a time after services prove read parity and operational maturity. Each cutover is reversible state transition, not one-time migration.
- For each entity, document source of truth, writers, readers, stored procedures, backfill method, replication direction, reconciliation thresholds, and rollback point.
- Backfill with checksums and resumable batches. Validate dual reads. Then switch single command writer to service. Avoid unrestricted dual writes.
- Reconcile continuously by identifiers, row counts, hashes, financial totals, stock totals, and business state transitions. Any unresolved financial/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent service logic. Retain legacy compatibility through observation period.
- Schedule high-risk ownership transfers outside sales-protection windows with rollback rehearsal, staffed hypercare, and explicit business exception queue. After 30 days zero unplanned downtime with 100% service traffic and both peaks passed, begin selective decommissioning.
23. Consolidate sustainable hybrid and establish steady-state governance (depends on: 19, 21, 22)
Close year by retiring only genuinely obsolete paths. The correct outcome is a safe, operable service estate even if critical legacy command logic remains.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, capacity model, and tested rollback.
- Retire legacy path only after all consumers move, reconciliation clean, rollback-retention elapsed, and relevant peak or equivalent capacity test passed.
- Remove temporary replication, CDC pipelines, feature flags, endpoints, tables, procedures, and jobs through separate controlled changes—never as part of initial cutover.
- Archive data and code required for audit, tax, GDPR, and financial retention. Maintain documented read-only access where retention requires it.
- Measure residual direct database access, cross-domain coupling, deployment frequency, incident recovery, and operational toil. Publish funded follow-on roadmap for any core pricing, checkout, or order ownership that properly remained in monolith.
- Establish quarterly architecture reviews, API/event lifecycle governance, service scorecards, resilience testing, and disaster-recovery exercises.
--- PROPOSAL 2 (agent gpt-5.6-terra_refine_2, openai/gpt-5.6-terra) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has an approved and rehearsed rollback or recovery plan; read-route rollback completes within 5 minutes, and accepted financial or order commands complete through their original compatible state machine or an audited exception process.
- No first cutover, traffic expansion, payment change, write-owner transfer, or destructive schema change occurs from six weeks before through two weeks after either January or July sale.
- Each protected sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the actual hybrid routing mix and every fallback path pass 12x load, spike, soak, failover, game-day, and full-traffic-reversion tests.
- Feature delivery remains at least 80% of the agreed pre-programme baseline, with no programme-wide feature freeze.
- By month 12, search, catalogue reads, warehouse adapter and inventory availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade with proven slices, and cart/checkout façades are independently deployable, owned, observable, and supported.
- Every released capability has a named owning team, independent pipeline, weekly-or-better compatible release cadence, SLOs, dashboards, runbooks, on-call, capacity model, and tested rollback.
- No extracted service writes another service database. Each transferred entity group has exactly one command owner, and no new cross-context joins or stored-procedure coupling are introduced.
- Each approved ownership transfer has fewer than 0.01% unresolved non-financial record discrepancies and zero unresolved discrepancies for price, tax, payment, refund, order total, stock reservation, or loyalty ledger.
- Any customer-facing pricing slice achieves at least 99.99% exact parity across approved golden-master and live shadow cases for two full weeks, with zero unresolved monetary differences and written finance and merchandising approval.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated coverage; changed migration code has at least 80% coverage; every service boundary has contract tests.
- All three payment providers retain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Critical customer-journey failures are detected within 5 minutes, and migration-related severity-one recovery or rollback completes within 30 minutes.
- Inventory migration produces no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Storefront and mobile contracts remain compatible throughout, without a forced mobile release, forced logout, or password reset caused by migration.
- Back-office availability remains at least 99.9% during business hours, with legacy fallback during every workflow transition.
Steps (20):
1. Charter the programme and protect trading peaks
Set a revenue-protection charter before changing architecture. The year-one outcome is independently deployable capabilities with safe legacy delegation where ownership cannot yet move.
- Appoint a programme director, chief architect, SRE lead, and accountable business owners for pricing, finance, payments, warehouse, privacy, and country operations.
- Publish a month-by-month calendar using actual January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freezes, and mobile release dates.
- Protect each sale from six weeks before until two weeks after. During this window, prohibit first cutovers, traffic expansion, write-owner transfers, destructive schema changes, payment changes, and new infrastructure patterns.
- Reserve capacity across the five teams: 50% roadmap, 30% migration, and 20% reliability, quality, and unplanned work. Features continue, preferably behind flags.
- Ban big-bang rewrites, distributed transactions, uncontrolled dual writes, direct cross-service database writes, and irreversible migrations.
- Give operations authority to stop a rollout. Require a named command owner, business owner, rollback authority, runbook, and entry/exit gates for every production migration.
2. Baseline behaviour, coupling, data, and peak capacity (depends on: 1)
Create the factual baseline used to select extraction candidates and prove that a new path is safe.
- Trace the top 30 storefront, mobile, back-office, payment-webhook, warehouse-file, scheduled-job, reporting, and support journeys.
- Map Java modules, endpoints, all 350 tables, triggers, stored procedures, cross-module joins, file exchanges, and external dependencies.
- Classify each table and procedure by business concept, current writers and readers, personal-data class, retention, country use, and coupling risk.
- Measure normal and sale-period traffic by country, language, currency, channel, endpoint, payment method, and warehouse flow. Capture latency, errors, conversion, approval rate, database saturation, connection use, Lucene rebuild time, inventory lag, and recovery time.
- Define signed-off invariants: price, tax, promotion stacking, stock and reservation semantics, payment-to-order matching, refunds, loyalty ledger, warehouse completeness, and GDPR rights.
- Produce anonymised production-shaped fixtures, lawful request traces, and a repeatable 12x load profile with explicit headroom.
- Score candidates for business risk, coupling, testability, data-ownership feasibility, operational maturity, and rollback quality.
3. Set boundaries, ownership, and realistic year-one scope (depends on: 2)
Define a target architecture that avoids replacing one monolith with a distributed monolith. Separate independent deployment from transfer of transactional authority.
- Establish bounded contexts for edge and channel façades, catalogue, search, customer and loyalty, warehouse integration and inventory availability, pricing, payment adapters, cart and checkout, order query, returns, and back-office workflows.
- Assign an owning team, present command owner, future system of record, data classification, and on-call responsibility for each entity group.
- Define entity transition states: legacy command owner, replicated read model, shadow-validated route, service command owner with compatibility adapter, and legacy retired.
- Require one command owner at any moment. Replicas are read-only. Use transactional outbox, idempotency, compensations, reconciliation, and visible exception queues instead of distributed transactions.
- Set the year-one committed scope as deployable search, catalogue reads, warehouse adapter and availability reads, customer/profile slices, order-query and bounded-return slices, payment adapters, pricing façade plus proven slices, and cart/checkout façades.
- Treat core pricing, stock reservation, loyalty redemption, payment capture coordination, checkout, order creation, refunds, and physical database decomposition as conditional follow-on work unless evidence gates pass.
- Keep the Java 8 monolith stable. Use a current supported LTS for new services behind compatible interfaces. Do not make a Java upgrade or repository split a prerequisite.
4. Instrument journeys and establish operational control (depends on: 2)
Make both legacy and new paths observable before moving meaningful production traffic. Measure business correctness as well as technical health.
- Add correlation IDs, structured logs, distributed traces, RED metrics, real-user monitoring, synthetics, and immutable business audit events.
- Cover web, mobile, back office, scheduled jobs, warehouse exchange, payment callbacks, and service-to-service paths.
- Define SLOs and error budgets for browse, search, product detail, price quote, cart, checkout, payment confirmation, order lookup, inventory freshness, warehouse processing, and staff workflows.
- Build side-by-side legacy-versus-new dashboards segmented by country, language, currency, payment provider, traffic cohort, and release version.
- Alert on price mismatches, payment without order, order without payment, refund mismatch, loyalty imbalance, event lag, stock discrepancy, warehouse file failure, and search-quality drift.
- Test backup and restore, PostgreSQL failover, provider outage handling, incident communications, and escalation paths. Target critical journey detection within five minutes.
5. Build the paved road and harden monolith seams (depends on: 3, 4)
Create a minimum safe platform for independently deployable services while making the existing monolith easier to change safely.
- Deliver a service template with health checks, graceful shutdown, telemetry, configuration, secrets, service identity, database migrations, outbox support, API documentation, and idempotent consumer support.
- Create independent CI/CD pipelines with provenance, dependency and container scanning, unit, integration, contract, smoke, and performance gates.
- Introduce flags, kill switches, canary or blue-green delivery, and automatic rollout halt on SLO or reconciliation breaches.
- Provision runtime, caches, databases, gateway, and event capacity for 12x load plus headroom. Explicitly reserve PostgreSQL connection and CPU capacity for full fallback to the monolith.
- Apply infrastructure as code, least-privilege identities, encryption, secret rotation, PCI assessment, and GDPR controls.
- Enforce module walls and code ownership in the monolith. Add branch-by-abstraction façades around candidate domains.
- Ban new cross-domain joins, direct table access outside the designated domain module, and new stored-procedure coupling. Use additive expand-contract database changes only.
- Prove compatible online monolith deployment, session-safe connection draining, and rollback. Do not assume all routine monolith releases can immediately lose their maintenance window.
6. Create the executable safety net (depends on: 2, 4, 5)
Replace confidence based on 25% mostly-unit coverage with automated evidence focused on migration seams and revenue-critical outcomes.
- Build characterisation tests for existing APIs, stored procedures, scheduled jobs, pricing, checkout, payment callbacks, inventory, and returns before changing them.
- Create consumer-driven contract tests for mobile, storefront, back-office, payment-provider, warehouse, and service interfaces.
- Automate golden journeys across all countries, currencies, and languages: browse, search, quote, cart, checkout, success and failure payments, order, return, loyalty, and staff workflows.
- Require 100% scenario coverage of defined price, payment, order, refund, stock-reservation, and loyalty invariants before moving their command ownership.
- Require at least 80% coverage on changed migration code and affected service contracts. Do not use a blanket coverage target as a substitute for scenario evidence.
- Build a production-like environment with anonymised data, provider simulators, warehouse-file simulators, and repeatable 12x load, spike, soak, failover, and chaos tests.
- Make the critical regression suite complete in under 15 minutes, with deeper performance and resilience suites available for release gates.
7. Install the strangler edge and rollback semantics (depends on: 4, 5, 6)
Decouple clients from implementation location without forcing a mobile release or changing visible contracts. Route rollback must be configuration-only.
- Put a gateway and selective channel façade in front of existing storefront, mobile, and back-office endpoints with the monolith as the initial default.
- Preserve URLs, API versions, cookies, tokens, sessions, locales, currencies, headers, errors, and server-rendered behaviour.
- Route by endpoint, country, cohort, flag, and percentage. Add cache bypass, request draining, and safe cache-key design.
- Mirror only read-only requests or explicitly safe idempotent calls. Never mirror live checkout, payment, refund, order, or other customer-visible commands.
- Rehearse read-route rollback, gateway failure, session continuity, cache failure, and full-load reversion to legacy. Prove route rollback within five minutes.
- Define command rollback explicitly: already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.
8. Establish events, replication, and reconciliation as shared products (depends on: 3, 5, 6)
Build coexistence capabilities before moving data or command responsibility. Replication enables reads; it must not produce ambiguous writers.
- Deploy a governed event platform with schema compatibility checks, access controls, retention, replay, dead-letter handling, ownership, and capacity beyond projected peak volume.
- Add transactional outbox publication to new services and selected monolith write paths. Allow CDC only as a monitored transitional bridge with an owner and retirement date.
- Standardise versioned event contracts, correlation IDs, idempotency keys, out-of-order and duplicate handling, timeouts, retries, bulkheads, and circuit breakers.
- Provide resumable backfill, checkpoints, record hashes, counts, financial and stock totals, lag dashboards, and staffed exception queues.
- Build reconciliation per entity and business invariant. A financial, tax, payment, refund, stock, or loyalty mismatch blocks traffic expansion.
- Exercise event replay, poison events, duplicate delivery, delayed delivery, and data recovery at projected peak volume.
9. Adopt a mandatory extraction and cutover playbook (depends on: 7, 8)
Use one repeatable method for all domains so the five teams do not invent incompatible migration mechanics.
- Require the sequence: internal seam, replicated read model, backfill and reconciliation, shadow comparison, employee cohort, country or cohort canary, measured expansion, observation period, and optional single-writer transfer.
- Define quantitative promotion gates for latency, errors, conversion, search quality, price parity, approval rate, completion rate, inventory discrepancy, event lag, reconciliation, and support contacts.
- Require a cutover dossier with source of truth, writers, readers, procedures, consumers, backfill checkpoint, rollback boundary, in-flight command treatment, capacity proof, runbook, and hypercare staffing.
- Stop traffic expansion automatically for SLO, error-budget, reconciliation, or business-metric breach. Operations may stop any rollout.
- Retain legacy routes, compatibility adapters, data, and flags for at least one relevant peak or equivalent full-load certification before retirement.
- Allow service deployment to succeed without service write ownership. This is essential for pricing and checkout in year one.
10. Run pricing archaeology and deploy a legacy pricing façade (depends on: 3, 6, 8)
Treat the 200,000-line pricing module as behaviour preservation, not a rewrite. Start immediately because pricing evidence will determine the later scope.
- Form a protected pricing squad from senior engineers, merchandising, finance, country representatives, support, and QA.
- Inventory code, procedures, configuration, campaigns, overrides, jobs, manual actions, tax inputs, and country-specific exceptions.
- Capture privacy-safe decision traces and build a golden-master corpus covering dates, baskets, vouchers, stacking, customer segments, tax, currencies, inventory states, and campaign lifecycle cases for all markets.
- Put the existing evaluator behind a versioned pricing façade. All new callers use it even when it delegates in-process to legacy logic.
- Build an exact comparator for amount, currency, tax, discount, eligibility, explanation, promotion version, and latency.
- Produce a machine-readable rule catalogue. Classify rules as movable slices, deliberate legacy delegates, country-specific exceptions, or inactive rules.
- Obtain finance and merchandising acceptance of current observable behaviour by month 4. No candidate rule slice receives customer traffic before its own parity gate.
11. Wrap warehouse exchange without changing its contract (depends on: 8, 9)
Stabilise the 15-minute file integration before using it as a source for inventory availability. Reservation and allocation remain legacy-owned.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, quarantines, and replays inbound and outbound warehouse files while retaining the SFTP contract.
- Run the adapter in parallel with the existing job. Reconcile every file, SKU, warehouse, quantity, and outbound order export.
- Publish authoritative inventory facts through the event platform, with sequence, freshness, source-file, and correction metadata.
- Test delayed, duplicate, malformed, missing, and replayed files under peak load. Provide operational repair procedures and an exception queue.
- Prove stable operation for at least two complete inventory cycles at peak-like load before serving availability reads, and continue the legacy export and reservation paths.
- Establish explicit safety-stock, fulfilment-node, country, and stale-data policies with warehouse and commerce owners.
12. First-sale readiness gate (depends on: 7, 8, 10, 11)
Treat the first January or July sale inside the programme as a protection milestone. If the programme starts near a sale, production scope is restricted to foundations and only fully proven low-risk reads.
- Freeze new migration risk for the protected window defined in S1. Continue only reversible defect fixes and feature work behind dormant flags.
- Test the actual production topology at 12x load plus headroom, including gateway, cache, monolith, PostgreSQL, Lucene, event platform, warehouse exchange, and provider limits.
- Prove that every live service can revert and that the monolith, its database, and legacy search can absorb full returned traffic.
- Run game days for gateway failure, cache loss, PostgreSQL failover, event lag, warehouse-file delay, and payment-provider outage.
- Pre-scale infrastructure, warm caches and indexes, validate connection budgets, and confirm payment-provider rate limits and escalation contacts.
- Obtain written go/no-go approval from engineering, operations, commerce, finance, warehouse, payments, support, and country operations.
13. Extract catalogue reads and modern search (depends on: 9, 12)
Use read-heavy, non-authoritative capabilities as the first customer-facing proof of the migration playbook after the first protected sale.
- Build country and language catalogue read models from monolith-owned data through outbox or controlled replication. Keep product and content authoring in the monolith.
- Build search with incremental indexing, locale-aware analysis, index aliases, blue-green indexes, controlled reindexing, and explicit cache policy.
- Keep search non-authoritative for price and stock. It consumes versioned catalogue and availability data only.
- Shadow-compare content, localisation, media, ranking, facets, zero-result rate, latency, and conversion.
- Promote through staff traffic, low-risk market cohorts, then 1%, 10%, 50%, and 100% traffic only while gates remain green.
- Keep the legacy catalogue route and warm Lucene fallback through the next relevant sale. Give the owning team independent deployment, SLOs, dashboards, runbooks, and on-call.
14. Extract inventory availability reads and customer read slices (depends on: 11, 12, 13)
Move safe read capabilities while preserving authoritative transactional behaviour. Customer privacy and session continuity are hard requirements.
- Build inventory availability read models from warehouse facts, with explicit freshness, safety-stock, fulfilment-node, country, and stale-data semantics.
- Shadow-compare availability at SKU and warehouse level for at least two weeks. Reconcile all material differences before traffic growth.
- Progressively route storefront and search availability reads. Maintain immediate monolith fallback and retain reservation, allocation, adjustments, and warehouse export in the monolith.
- Define canonical customer identity, consent, retention, subject access, deletion, addresses, and country-specific privacy rules.
- Start customer work with replicated profile, address, consent, and loyalty-balance reads. Preserve existing sessions, cookies, and tokens without forced logout or password reset.
- Move profile writes only after clean reconciliation and through one idempotent command path. Treat loyalty as a ledger; defer accrual, redemption, and settlement until separately proven.
15. Deliver order-query, bounded returns, and payment adapters (depends on: 8, 9, 12, 14)
Extract post-order value and isolate provider complexity without splitting order creation or duplicating financial commands.
- Publish reliable order-lifecycle facts from the current command owner using the outbox. Backfill historical records in resumable batches with checksums.
- Build order-query read models for self-service, support, notifications, and selected back-office reads. Show freshness where eventual consistency applies.
- Extract only bounded returns capabilities with explicit ownership, such as initiation, status, labels, and notifications. Retain refund authority until financial ownership gates pass.
- Wrap each payment provider with a versioned adapter covering token handling, webhook verification, idempotent authorisation and capture, provider-specific retries, timeout policy, and error mapping.
- Create a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and linked order states daily.
- Validate adapters with provider sandboxes, recorded non-sensitive outcomes, fault injection, and controlled cohorts. Never shadow or mirror live payment commands.
- Preserve in-flight semantics: an accepted attempt retains its idempotency key and compatible completion path after any route rollback.
16. Prove pricing slices and introduce cart and checkout façades (depends on: 10, 14, 15)
Make the revenue path independently deployable before attempting to move its ownership. Preserve legacy execution for any rule or command that lacks proof.
- Implement only well-understood pricing slices as versioned decision tables or configuration with effective dates, approval workflow, and decision audit trails.
- Shadow-evaluate candidate price requests and compare every output with legacy. Promote a slice only after 99.99% exact parity across golden-master and two full weeks of live shadow traffic, zero unresolved monetary differences, capacity evidence, and written finance and merchandising approval.
- Keep an immediate per-slice route-back switch. Retain legacy price execution through at least the next relevant sale.
- Define cart identity, guest merge, expiry, country and currency changes, price snapshots, promotion recalculation, inventory checks, and client retry semantics.
- Introduce compatible cart and checkout façades that initially delegate all command execution to the monolith. Do not require a client release.
- Add durable checkout-attempt state, idempotency keys, compensations, and support tooling for payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Consider cart write ownership only after single-writer, backfill, reconciliation, failure-mode, and rollback gates pass. Keep core checkout orchestration delegated unless the same evidence is available.
17. Second-sale readiness gate (depends on: 13, 14, 15, 16)
Certify the expanded hybrid topology before the second January or July sale. The deployed routing mix, not an architecture diagram, is the test subject.
- Enter the protection window under the same restrictions as S12. If pricing or checkout gates are incomplete, keep façades delegating through the sale.
- Run full-path 12x load, spike, soak, failover, and rollback tests across CDN or cache, gateway, monolith, PostgreSQL, services, event platform, warehouse adapter, search, and payment paths.
- Test full traffic reversion from every live route. Verify cache warm-up, autoscaling, connection limits, provider quotas, and legacy capacity.
- Run game days for service loss, database failover, event duplication and delay, search fallback, warehouse-file delay, pricing failure, provider outage, and flag or gateway failure.
- Reconcile prices, orders, stock, payments, refunds, and loyalty outcomes at projected sale volume.
- Pre-scale, establish incident command and business-support staffing, and obtain formal cross-functional go/no-go approval.
18. Migrate back-office workflows by role (depends on: 13, 14, 15, 17)
Move the 300 staff users workflow by workflow rather than replacing the entire administration system. Staff safety and auditability take precedence over screen count.
- Deliver domain BFFs and initially read-only screens for catalogue, inventory, order query, return status, and customer support.
- Preserve role-based access, segregation of duties, approval controls, country entitlements, audit logs, exports, reporting needs, and operational exception handling.
- Run legacy and new screens in parallel for at least 30 stable days per workflow. Provide training, floor support, feedback capture, and one-click fallback.
- Move a staff command only when the underlying service is the proven single command owner and the approval and audit controls pass tests.
- Replace direct SQL reporting with governed read models or controlled exports as data domains move. Retain compliant historic read access where required.
- Refactor server-rendered storefront integration to use the gateway and service APIs progressively, while retaining compatibility for mobile clients through at least two app release cycles.
19. Transfer only evidence-backed write ownership (depends on: 9, 16, 17, 18)
After the final protected sale, make selective single-writer transfers where operational and business evidence supports them. Do not force a symbolic database split.
- For each candidate entity, complete a cutover dossier covering sources of truth, writers, readers, stored procedures, backfill, replication, retention, reconciliation, rollback, support, and accountable on-call team.
- Backfill with checksums, validate replicated reads, switch one command route, and observe under hypercare. Never use unrestricted dual writes.
- Start with low-risk ownership such as selected profile writes, catalogue administration, bounded return commands, or cart state where gates pass.
- Retain legacy ownership for pricing, stock reservation, checkout, order creation, payment capture, refunds, and loyalty redemption unless parity, failure-mode, reconciliation, capacity, and rollback evidence exists.
- Rewrite a stored procedure only after characterisation tests demonstrate equivalent behaviour. Keep compatible legacy tables and procedures through the rollback-retention period.
- Stop expansion for any unresolved financial, tax, payment, refund, stock, order-total, or loyalty discrepancy. Route new commands back only according to the pre-defined in-flight semantics.
20. Consolidate the sustainable hybrid estate and fund follow-on work (depends on: 18, 19)
End the year with an operable service estate and an honest residual-monolith roadmap. Remove only paths that have demonstrably become obsolete.
- Verify every released capability has a named team, independent pipeline, on-call, SLOs, dashboards, runbooks, capacity model, disaster-recovery procedure, security ownership, and rehearsed rollback or recovery.
- Retire a route, table, procedure, replication stream, job, or flag only after all consumers have moved, reconciliation is clean, the rollback-retention period has elapsed, and a relevant peak or equivalent full-load test has passed.
- Archive data and code required for tax, financial, audit, and GDPR retention. Preserve controlled read-only access where needed.
- Measure remaining cross-domain database access, synchronous dependency depth, event lag, deployment frequency, change-failure rate, recovery time, operational toil, and unresolved coupling.
- Publish a funded follow-on roadmap for any core pricing, checkout, order, stock-reservation, refund, loyalty, or database-ownership work that correctly remains in the monolith.
- Establish quarterly architecture reviews, API and event lifecycle governance, resilience exercises, capacity reviews, and business-invariant audits.
--- PROPOSAL 3 (agent grok-4.6_refine_3, xai/grok-4.6) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work across the 12 months.
- Every production step has a rehearsed rollback; routing rollback completes within 5 minutes; migration-related severity-one recovery completes within 30 minutes; accepted payments and orders are never reversed or duplicated.
- No first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion inside the January and July protection windows.
- January and July sales meet or beat pre-programme availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal load plus agreed headroom.
- Before each sale, the hybrid estate including monolith fallback and Postgres connection headroom passes full-path load and reversion tests at 12x plus headroom.
- Feature throughput stays at least 80% of the agreed baseline. No programme-wide feature freeze.
- By month 12, search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and returns slices, payment adapters, pricing façade plus any proven rule slices, and cart/checkout façades are independently deployable with named owners, SLOs, dashboards, and on-call from the existing five teams.
- Independently deployable unit count stays within what those five teams can operate; no extra on-call organisation is assumed.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass; otherwise the façade remains the independently deployable artefact.
- Pricing slices receive live traffic only after at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.
- For each ownership cutover, unresolved record discrepancies stay below 0.01%, with zero unresolved payment, refund, tax, loyalty-ledger, stock-reservation, or order-total discrepancies.
- Extracted services make zero writes to another service database and introduce zero new cross-context joins or stored-procedure coupling.
- The 1.2 TB PostgreSQL database is not physically split in year one; hybrid connection use stays inside the agreed budget, including during 12x peaks.
- Inventory availability migration causes no increase in oversell relative to the existing 15-minute warehouse synchronisation baseline.
- Mobile and storefront keep compatible endpoints throughout. No forced mobile release, forced logout, or password reset. Warehouse file contracts remain valid. PCI scope is not expanded.
- Routine compatible service releases deploy at least weekly without the monolith maintenance window. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Mean time to detect critical customer-journey failures is under 5 minutes.
- All three payment providers maintain at least their pre-programme approval rate, with zero migration-caused lost or duplicate payments.
- Back-office availability for 300 staff remains at least 99.9% during business hours across all eight countries, with legacy fallback during each workflow transition.
- Peak-load p99 checkout latency stays at or below 1.2 s and storefront p99 at or below 400 ms during both sales.
- A funded follow-on roadmap is published for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
Steps (22):
1. Charter around peaks, money, rollback, and five-team operability
Lock governance, capacity, and the retail calendar before any code moves. Feature work never stops. Only production risk is constrained.
- Appoint one programme lead, one chief architect, an operations lead, and business owners for pricing, finance, warehouse, payments, privacy, and country operations.
- Keep the five teams of eight on their current business areas. Add a thin platform pair for gateway, flags, events, CI, and data tooling.
- Reserve capacity as **50% roadmap**, 30% migration, and 20% quality and unplanned work. Only steering may rebalance.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider freeze periods, and mobile release trains.
- Protect each sale: no first-time cutover, ownership transfer, destructive schema change, payment change, new CDC load, or traffic expansion from six weeks before through two weeks after.
- If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.
- Ban big-bang rewrites, physical database splits, unrestricted dual-writes, distributed transactions, and irreversible cutovers.
- Do not create more independently deployable units than the five teams can operate and on-call. Give operations veto on search, stock, checkout, and payments.
2. Baseline the live estate and freeze business invariants (depends on: 1)
Measure the running system before changing it. This baseline is the capacity, correctness, and rollback reference for every later step.
- Trace storefront, mobile, back-office, warehouse files, payment webhooks, scheduled jobs, and support journeys through modules, endpoints, all 350 tables, stored procedures, and external systems.
- Record normal and sale-peak traffic by country, language, currency, page type, payment method, and warehouse flow.
- Capture p50/p95/p99, errors, conversion, approval rate, Postgres saturation and connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by writer, readers, sensitivity, retention, GDPR obligations, and cross-module joins. Flag tables with more than two writers as highest risk.
- Capture invariants as testable assertions: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, and warehouse export completeness.
- Produce a coupling heat map, an extraction scorecard, anonymised production-shaped fixtures, and a repeatable 12x load profile.
3. Set honest year-one boundaries mapped to five teams (depends on: 2)
Independently deployable capabilities are the goal. Full monolith retirement is not a 12-month promise.
- Define domains and map each to one of the five existing teams. Search stays with catalogue. Payments stay with checkout. Inventory stays with warehouse integration.
- One system of record per entity group. A service may hold a replicated read model. It must never write another service's database.
- Prohibit distributed transactions. Use one command owner, outbox, idempotency, compensation, reconciliation, and staffed exception queues.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces.
- Year-one in-scope if evidence allows: search, catalogue reads, warehouse adapter and availability reads, customer and loyalty slices, order-query and bounded returns, payment adapters, pricing façade plus proven rule slices, cart and checkout façades, and back-office read workflows.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission.
- Transfer transactional command ownership only when parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade is the independently deployable artefact.
4. Instrument journeys and define error budgets (depends on: 2)
Make the existing estate observable before any production traffic moves. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, traces, RED metrics, business events, synthetics, and real-user monitoring across web, mobile, and back-office.
- Define SLOs for browse, search, product page, price quote, cart, checkout, payment, order confirmation, inventory freshness, warehouse exchange, and back-office.
- Alert on customer and financial outcomes: price mismatch, payment/order mismatch, inventory discrepancy, event lag, search zero-result drift, failed warehouse files, and Postgres connection exhaustion.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, and payment provider.
- Test backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced.
- Target five-minute detection for critical journey failure.
5. Build a thin paved road and remove the maintenance window (depends on: 3, 4)
Do not reorganise the five teams. Make the current repository and runtime safer than the fortnightly train.
- Add code owners and module walls in the current repo first. Split repositories only after CI already works that way.
- Provide a service template: health, readiness, graceful shutdown, telemetry, auth, config, secrets, migrations, outbox, and idempotent consumers.
- Build CI/CD with provenance, scanning, unit, integration, contract, smoke, and performance checks.
- Implement flags, canary or blue/green, automated SLO-based rollback, and a deployment freeze control for sales windows.
- Prove **online backward-compatible monolith deploys** with connection draining so routine compatible releases no longer need the 30-minute window.
- Size runtime, caches, event platform, and databases for 12x demand plus headroom, including a Postgres connection budget for the hybrid estate.
- Centralise PCI scope, secret rotation, least-privilege identities, and GDPR controls before customer or payment traffic uses a new path.
- Ban new CDC, extra connection pools, and non-essential consumers from going live on the primary during a protection window.
6. Build the behavioural safety net and 12x harness (depends on: 2, 4, 5)
Unit coverage at 25% is not a net. Protect behaviour on the seams you will cut.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office.
- Add characterisation tests around stored procedures and pricing before modifying them.
- Add consumer-driven contracts on every mobile and storefront endpoint. Do not force a mobile release to extract a backend.
- Require 100% automated coverage of defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios before their ownership can change.
- Build a production-like performance environment with provider and warehouse simulators and anonymised fixtures for eight countries, three currencies, and four languages.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before each sale and each major traffic expansion.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
Create seams before you create processes. The monolith remains the primary system for most of the year.
- Enforce package boundaries with architecture tests and code ownership. Ban new cross-module joins and new stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer, and payment-provider logic.
- Wrap high-risk access behind façades even while it still runs in-process.
- Use expand-contract schema changes only. Additive first. Destructive later, with evidence all readers moved.
- Add kill switches to every new monolith-to-service integration.
- New features still ship, but they must use the new seams.
8. Place a strangler edge with minute-scale rollback (depends on: 5, 6, 7)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact.
The storefront is server-rendered. The mobile app hits the same endpoints. Both must keep working without a forced release.
- Put a reverse proxy or API gateway in front of existing HTML and API endpoints without changing initial behaviour.
- Route by path, country, cohort, flag, and percentage. Default every route to the monolith.
- Preserve headers, sessions, cookies, the four languages, three currencies, and eight countries.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands or payment requests.
- Rollback is a **route change**, not a redeploy. It must complete in minutes, including in-flight draining.
- Test cache bypass, session continuity, SSR cache correctness, and full-load reversion to the monolith before any business endpoint moves.
- Gateway p99 overhead must stay under 50 ms.
9. Stand up events, outbox, and a reconciliation product (depends on: 3, 5, 7)
Build reusable coexistence patterns before moving data or command responsibility. Do not put unbounded CDC on the 1.2 TB primary.
- Deploy an event backbone sized beyond the 12x sale profile, with schema governance, compatibility checks, retention, replay, dead letters, and named consumer ownership.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC only where an outbox cannot yet be added, with a dated retirement plan.
- Build a reconciliation product: counts, hashes, money totals, stock totals, lag, and staffed exception queues.
- Standardise anti-corruption adapters, timeouts, retries, bulkheads, circuit breakers, correlation IDs, and idempotency keys.
- Define entity states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, then legacy-retired.
- Rollback rule: route new writes to one compatible command owner. Preserve writes already accepted. Never discard or blindly reverse financial records.
- Treat backfill of large historical tables as a first-class capacity risk. Use resumable checksummed batches, not a one-shot copy of 1.2 TB.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
Every extraction follows the same stages: seam and façade, replicated read model, shadow comparison, canary by country or cohort, observation, optional single-writer transfer, then retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Unresolved money differences are not accepted.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare from the existing five teams.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.
11. Start pricing archaeology and façade the legacy engine (depends on: 2, 6, 7)
Treat pricing as a behaviour-preservation programme first. Do not rewrite 200,000 lines from tribal knowledge.
Start this in parallel with platform work from month one.
- Form a dedicated squad with senior engineers, merchandising, finance, country ops, support, and QA. Protect its capacity for the full programme.
- Inventory code, stored procedures, configuration tables, overrides, jobs, manual back-office actions, and external inputs for price, tax, discount, voucher, and promotion decisions.
- Capture privacy-safe production decision traces. Build a golden-master corpus across countries, currencies, dates, segments, baskets, stacking, tax, and inventory conditions, with at least 1,000 real orders per country.
- Put the existing engine behind a versioned **pricing façade**. New callers use this façade even while it delegates to legacy logic.
- Classify rules into independently movable slices. Dead rules that have not fired in 24 months stay documented, not rewritten.
- New promo features implement against the façade. Keep the legacy engine deployable as rollback through the next two sales.
12. Wrap warehouse files without changing the warehouse (depends on: 6, 9)
The 15-minute file exchange is a hard external contract. Do not pretend the new path is more real-time than the source.
- Build an adapter that validates, journals, deduplicates, acknowledges, and replays inbound and outbound files without changing the SFTP contract.
- Publish inventory-change events from the adapter. The adapter becomes the system of record for what the warehouse committed.
- Handle delayed, duplicate, malformed, and missing files. Quarantine poison files. Prove replay under peak volume.
- Keep reservation, allocation, and warehouse-export command authority in the monolith.
- Run the adapter beside the legacy job until reconciliation is clean. Do not extract customer-facing availability until delayed-file and peak-load tests pass.
13. Certify the first peak on the real hybrid estate (depends on: 5, 6, 8, 9)
Certify whatever is live, and every fallback, before the first of January or July that falls in the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers in the protection window. Feature work may continue behind flags.
- Load-test the live routing mix at least 12x observed baseline plus agreed headroom, including gateway, caches, monolith, any live services, events, search, payments, warehouse files, and Postgres connections.
- Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load, including connection headroom.
- Run game days for provider timeout, event lag, flag revert, search fallback, stock-file delay, and database failover.
- Disable or throttle CDC and non-essential consumers during the sale if they compete for Postgres connections.
- Staff hypercare from the existing five teams. Do not assume extra people appear for sale week.
- Require written go/no-go from engineering, ops, commerce, finance, warehouse, and support. If Season 1 is incomplete, ship only what passed this gate.
14. Extract search and catalogue read models (depends on: 10)
Prove the playbook on live customer traffic with read-heavy capabilities off the payment path.
If the first sale is inside 16 weeks, do this after Peak 1. Otherwise start as soon as the playbook and protection calendar allow.
- Index search from catalogue and related events, not from a nightly dump. Support incremental updates, aliases, and blue/green indexes.
- Build country and language catalogue read models for eight markets around one product identity. Keep product authoring in the monolith initially.
- Shadow-compare ranking, facets, locale analysis, zero-result rate, content, availability display, latency, and conversion against current Lucene and monolith reads.
- Shift traffic through employee, low-risk cohort, country, and percentage stages with instant route rollback.
- Search and catalogue reads must not become authoritative for price or stock.
- Keep the old Lucene index warm through the next sale as standby.
- Add edge caching for catalogue and search responses to protect origin during 12x peaks.
15. Extract inventory availability reads (depends on: 10, 12)
Separate customer-facing availability from reservation authority after the warehouse adapter is proven.
- Build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics that match today's 15-minute lag, not a fictional real-time promise.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's lag before a sale.
- Provide immediate fallback to monolith availability and a replayable file-recovery process.
16. Extract customer reads and bounded loyalty with GDPR (depends on: 10)
Move identity-adjacent capabilities in slices. Avoid inconsistent account state across countries and channels.
- Define canonical identity, session compatibility, consent, retention, subject access, deletion, and access-control rules first.
- Start with replicated profile and loyalty-balance reads. Move profile writes through one idempotent command path only after daily reconciliation is clean.
- Represent loyalty as an auditable ledger. Migrate balance inquiry before accrual or redemption.
- Migrate sessions without forced logouts or password resets. Web and mobile keep current cookies or tokens.
- Subject-access and deletion must work in both systems during transition. Keep a staffed exception process.
17. Reforecast after the first peak (depends on: 13)
Use evidence, not the original slide, to set Season 2 scope. A late pricing archaeology or an overloaded on-call model is a reason to shrink, not to improvise.
- Compare planned versus actual: pricing archaeology progress, adapter reliability, search quality, team capacity, incident load, and roadmap throughput.
- If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.
- Formalise which capabilities will remain façades that delegate to the monolith through month 12.
- Recalculate the Postgres connection budget and on-call load for the expanded hybrid. Update steering, sponsors, and the five teams.
- Do not start checkout orchestration or live pricing slices unless this review says the operating model can absorb them.
18. Dual-run proven pricing slices and isolate payment providers (depends on: 11, 13, 17)
Checkout keeps monolith prices until the money path is clean. Do not shadow live payment commands.
- Extract only well-understood pricing slices. Compare exact amount, currency, tax, discount, explanation, eligibility, and latency.
- Require at least 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by merchandising and finance.
- Shift by slice and country. Keep a per-slice route-back switch and the legacy engine through the next sale.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorise/capture, timeout policy, and a payment ledger.
- Reconcile authorisations, captures, refunds, chargebacks, settlements, and order states daily. Keep PCI scope inside the existing boundary.
- In-flight attempts keep the same idempotency key and completion path on rollback. Agree peak rate limits and outage runbooks with all three providers.
19. Deliver order-query slices and cart/checkout façades (depends on: 15, 16, 18)
Create independently deployable post-order value and strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Publish reliable order lifecycle events from the current command owner through the outbox.
- Build an order query service for self-service, support, notifications, and selected back-office reads, with freshness labels and monolith fallback.
- Extract bounded workflows such as return initiation and return-status tracking where ownership is explicit. Keep refund authority in the monolith.
- Define cart identity, guest merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add checkout idempotency keys, a durable attempt state machine, explicit compensation paths, and support procedures for ambiguous payment, stock, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation. Move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- If ownership transfer is not safe before the next protected window, retain the façade delegating to the monolith.
20. Certify the second peak and rehearse full-load reversion (depends on: 13, 18, 19)
Repeat certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices and checkout façade.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale, agree provider rate limits, and staff a war room from the five teams.
- Game days must include payment-provider outage, event delay or duplication, database failover, and flag or route rollback at expected peak load.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
21. Move back-office by workflow and transfer writes only where proven (depends on: 19, 20)
Move the 300 staff users by workflow and role, not by replacing the whole admin application. Year-end success is a smaller, honest hybrid.
- Start with read-only catalogue, order-query, return-status, and inventory views on governed APIs. Keep legacy screens one click away.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, and operational exception handling. Train per screen group. Run old and new in parallel for at least 30 stable days.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, retention, reconciliation, and rollback.
- Backfill with checksums. Dual-read validate. Then switch one writer. Avoid unrestricted dual-writes. Do not delete tables, procedures, or flags as part of initial ownership transfer.
- Begin with low-risk read-model ownership. Transfer inventory reservation, loyalty redemption, pricing commands, and core order ownership only after their evidence gates and outside sales windows.
- Remove direct SQL reporting access to migrated data. Replace with governed read models.
22. Hand over a durable hybrid and a funded follow-on (depends on: 21)
Close the year by removing only genuinely obsolete paths. Safety evidence takes precedence over a symbolic monolith shutdown.
- Confirm each independently deployable service has a named team, on-call, SLOs, dashboards, runbooks, capacity model, DR procedure, and tested rollback.
- Retire temporary replication, legacy endpoints, Lucene, jobs, tables, procedures, and flags only after consumer inventory, clean reconciliation, a relevant peak or equivalent test, and the rollback-retention period.
- Archive required legacy data for audit and GDPR. Keep documented read-only access where retention requires it.
- Measure residual direct database access, cross-context coupling, synchronous dependency depth, event lag, deployment frequency, change-fail rate, recovery time, and operational toil.
- Publish the funded follow-on roadmap for any core pricing, checkout, order, reservation, refund, or loyalty ownership that correctly remained in the monolith.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
--- PROPOSAL 4 (agent deepseek-v4-pro_refine_4, deepseek/deepseek-v4-pro) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration across 12 months; read-route rollback within 5 minutes, severity-one recovery within 30 minutes.
- No first cutover, write-owner change, destructive schema, payment change or traffic expansion in six-week pre and two-week post January and July sales windows.
- Both sales meet pre-migration baseline for availability, conversion, payment approval, order throughput, inventory accuracy and p99 latency at 12x peak.
- Feature delivery remains at least 80% of baseline; no feature freeze.
- By month 12, search, catalogue reads, inventory availability, customer/profile, order-query/returns, payment adapters, pricing façade with proven slices, cart/checkout façades are independently deployable with owners, SLOs, dashboards, runbooks, on-call.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity and rollback gates pass; otherwise façade remains delivery artefact.
- All extracted services have zero direct writes to another service DB, no new cross-context joins, one command owner.
- Pricing slices receive live traffic only after ≥99.99% exact parity over golden-master and two weeks shadow, all differences signed by finance/merchandising.
- Unresolved record discrepancies <0.01%, zero unresolved monetary/stock/loyalty discrepancies at each cutover.
- Critical price/payment/order/refund/stock/loyalty invariants have 100% automated scenario coverage; changed migration code ≥80% coverage; contract tests at every boundary.
- Three payment providers maintain pre-programme approval rates; no payment loss or duplicate charge.
- Mobile/storefront endpoints compatible; warehouse file contract unchanged; no forced mobile release or logout.
- Routine compatible releases at least weekly; mean time to revert bad service release <10 min via flag/route.
Steps (23):
1. Charter the migration programme and protect peak trading windows
Establish accountable governance and protect non-negotiable constraints. Appoint programme lead, chief architect, operations lead, domain owners for pricing, finance, warehouse, payments, privacy and country operations.
- Publish a 12-month calendar marking six-week freeze before and two weeks after each January and July sale with no first cutovers, write-owner changes, destructive schema changes, payment changes or traffic expansion.
- Reserve capacity: 50% roadmap, 30% migration, 20% quality and operational work. Only steering may rebalance.
- Ban big-bang rewrites, shared-database-first splits, uncontrolled dual writes, distributed transactions and irreversible cutovers.
- Create weekly steering, risk register and dependency board with operations veto on search, stock, checkout and payments.
2. Establish technical and business baseline with full dependency mapping (depends on: 1)
Measure the live system before changing it. Baseline is the reference for capacity, correctness and rollback.
- Trace top 30 customer and back-office journeys through modules, tables, stored procedures, files and integrations; record p50/p95/p99, errors, approval rates, database load, Lucene rebuild time, inventory lag and recovery times at normal and 12x peak.
- Classify all 350 tables and procedures by writer, readers, retention, GDPR obligations and cross-module coupling.
- Capture business invariants: exact price and tax, promotion stacking, stock reservation, no duplicate payment or order, refund and loyalty ledger integrity, warehouse export completeness.
- Produce anonymised production-shaped data and a repeatable 12x load profile.
- Score extraction candidates by coupling, risk, change frequency, data ownership feasibility and expected value.
3. Define target architecture, bounded contexts and data ownership rules (depends on: 2)
Define bounded contexts and pragmatic target architecture. Independently deployable services are the goal; full monolith retirement is not a 12-month promise.
- Define contexts: edge/storefront, catalogue, search, pricing/promotions, cart, checkout, payments, orders, inventory, customer/loyalty, returns and back-office.
- Assign one system of record and owning team per entity group; services may replicate but never directly write another service's database.
- Prohibit distributed transactions; mandate outbox, idempotent consumers, compensating actions, reconciliation and business exception queues.
- Sequence extraction by risk and coupling: read-heavy and async seams first; pricing and checkout delayed until dual-run evidence.
- Define entity transition states: monolith-owned, replicated read, dual-read validation, service-owned with compatibility adapter, legacy-retired.
4. Build observability, SLOs and error-budget controls (depends on: 2)
Make the monolith and all future services observable before moving traffic. Define SLOs and alert on business outcomes.
- Add correlation IDs, structured logs, RED metrics, distributed traces, real-user monitoring and synthetic journeys.
- Define SLOs per domain: storefront p99 < 400 ms, search p95 < 300 ms, checkout p99 < 1.2 s, payment p99 < 2 s, inventory freshness < 15 min.
- Build side-by-side legacy vs replacement dashboards by country, currency, language, cohort, provider and release.
- Alert on price mismatch, payment/order mismatch, stock discrepancy, event lag, failed warehouse file, search zero-result drift.
- Establish error-budget policy: any extraction step breaching its SLO is automatically rolled back.
- Immutable audit events for pricing, payments, stock and order state changes.
5. Build delivery platform: CI/CD, feature flags, canary and runtime (depends on: 3, 4)
Provide a paved road for independently deployable services. Make deployment safer than the current fortnightly monolith train.
- Deliver service template with health checks, graceful shutdown, OpenTelemetry, auth, config, secrets, migrations, outbox and idempotent message handling.
- Create per-service CI/CD with provenance, scanning, unit, integration, contract, smoke and performance gates; financial changes require approval.
- Introduce feature flags, canary, blue-green, automated SLO rollback and deployment freeze control for sales windows.
- Provision Kubernetes or managed runtime with namespaces per context, autoscaling and quotas sized for 12x plus headroom.
- Centralise secrets, service identity, encryption, PCI scope and GDPR controls.
- Prove online, backward-compatible monolith deploys so routine releases no longer need the 30-minute window.
6. Deploy strangler gateway with instant route rollback (depends on: 4, 5)
Decouple clients from monolith internals while keeping current contracts intact. Rollback is a route change, not a redeploy.
- Place a gateway in front of storefront, mobile and back-office endpoints without changing initial behaviour.
- Route by path, country, cohort, feature flag and percentage; default remains monolith.
- Preserve cookies, sessions, headers, locale, currencies, mobile API and server-rendered storefront behaviour; no forced mobile release.
- Mirror only safe reads or explicitly idempotent non-financial requests; never duplicate payments or customer-visible commands.
- Rehearse instant route rollback, in-flight draining, session continuity, cache bypass and full-load reversion to monolith; rollback within 5 minutes.
- Measure gateway overhead < 50 ms p99 before moving endpoints.
7. Stabilize monolith through modularization and seams (depends on: 2, 3, 4)
Create internal seams before extracting processes. The monolith remains primary production system for most of the programme.
- Enforce package boundaries with ArchUnit tests and code ownership; ban new cross-module joins and stored-procedure coupling.
- Introduce branch-by-abstraction interfaces around search, catalogue, pricing, inventory, customer and payment-provider logic.
- Wrap high-risk database access behind repository or application interfaces.
- Use expand-contract schema changes only; additive first, destructive only after all readers moved.
- Add kill switches to every monolith-to-service integration; new features must use the new seams.
- Raise regression coverage on touched code to at least 60% before extraction.
8. Establish event backbone, outbox, CDC and reconciliation framework (depends on: 3, 5, 7)
Build the coexistence spine: events, outbox, CDC, and reconciliation. Services subscribe to facts; they do not call each other's databases.
- Deploy Kafka with schema registry, versioned topics, dead-letter queues, replay and consumer ownership; size beyond 12x profile.
- Add transactional outbox publishing to selected monolith writes and all new services; use CDC only where outbox not yet possible with dated retirement plan.
- Implement resumable backfill, checksums, lag monitoring, row counts, hashes, financial totals, stock totals and staffed exception queues.
- Standardise idempotent consumers, anti-corruption adapters, circuit breakers, bulkheads, retries and correlation IDs.
- Define one-writer rule: monolith write wins on conflict until ownership deliberately transferred.
- Test replay, duplicates, delayed events and poisoned messages at projected peak volume.
9. Strengthen characterisation, contract and 12x load testing (depends on: 2, 4, 5, 7)
Replace confidence based on 25% unit coverage with automated behavioural evidence. Focus on revenue-critical and migration-affected paths.
- Record golden journeys for browse, price, cart, checkout, payment success/failure, order, return, loyalty and back-office.
- Add characterisation tests around APIs, stored procedures, pricing rules and checkout flows before modifying them.
- Add consumer-driven contract tests (Pact/Spring Cloud Contract) for every module that will become separate services.
- Require 100% automated scenario coverage for price, payment, order, refund, stock reservation and loyalty invariants before ownership changes; 80% coverage on changed migration code.
- Build production-like environment with anonymised data, provider and warehouse simulators, all 8 countries/3 currencies/4 languages.
- Automate load, soak, spike, failover and chaos tests using observed 12x sale profile.
10. Conduct pricing archaeology and build golden-master corpus (depends on: 2, 7, 9)
Treat pricing as a behaviour-preservation programme. Do not rewrite 200k lines from tribal knowledge; run archaeology in parallel.
- Form dedicated cross-functional squad with senior engineers, merchandising, finance, country representatives, support and QA.
- Inventory all pricing/promotion code, stored procedures, configuration tables, overrides, jobs, manual actions and external inputs; identify dead rules not fired in 24 months.
- Capture privacy-safe production decision traces and build golden-master corpus with at least 1,000 real orders per country, covering dates, segments, baskets, vouchers, stacking and tax.
- Put existing engine behind a versioned pricing façade; new callers use façade even while delegating in-process.
- Build shadow comparator for exact amount, currency, tax, discount, eligibility, explanation and latency.
- Deliver signed-off rule specification document by month 4 that all teams agree represents current behaviour.
11. Modernise warehouse integration without changing warehouse contract (depends on: 3, 8, 9)
Modernise warehouse integration without changing warehouse contract. Publish inventory events while preserving reservation authority.
- Build adapter that validates, journals, deduplicates, acknowledges, retries and replays inbound/outbound SFTP files; warehouse contract unchanged.
- Publish inventory-change events to Kafka and build availability read model with explicit freshness, safety stock, fulfilment node, country and oversell semantics.
- Run adapter alongside legacy job; reconcile per SKU, warehouse, file and availability result.
- Handle delayed, duplicate, malformed files and replay under peak load.
- Keep monolith stock reservation and warehouse export authority; new service handles reads only.
- Prove adapter stability and reliability for at least 4 months before any inventory read service extraction.
12. Wave 1 - Extract search and catalogue read services (depends on: 6, 8, 9)
Prove the extraction playbook on read-heavy, non-authoritative capabilities. Replace nightly Lucene rebuild and serve catalogue reads.
- Build catalogue read models from monolith-owned data via outbox or controlled replication; keep authoring in monolith initially.
- Deploy search service with incremental indexing, index aliases, blue/green indexes, locale-aware analysis and explicit cache policy.
- Shadow-compare ranking, facets, zero-result rate, localisation, latency and conversion against legacy for at least one week.
- Shift traffic 1% → 10% → 50% → 100% by country and cohort; keep legacy path and warm Lucene standby through next sale.
- Search/catalogue never authoritative for price or stock; they consume versioned read models from owners.
- Give owning team independent pipeline, SLOs, dashboards, runbooks, on-call and practised rollback.
13. Wave 1 - Extract inventory availability reads (depends on: 6, 8, 9, 11, 12)
Separate warehouse file handling from customer-facing inventory reads while preserving reservation authority.
- Build inventory availability service consuming events from warehouse adapter (S11); own read model for storefront and search.
- Shadow-compare availability for every SKU and warehouse against monolith for at least two weeks; reconcile every discrepancy before expansion.
- Move reads progressively by country; keep reservation, allocation and warehouse export command authority in monolith.
- Provide immediate fallback to monolith availability and replayable file recovery process.
- Prove no extra oversell versus existing 15-minute lag before any sale.
- Keep monolith read path live through next sale.
14. Wave 1 - Extract customer identity and loyalty balances (depends on: 6, 8, 9, 12)
Extract customer identity, consent and loyalty balances in bounded slices. Preserve sessions and GDPR rights.
- Define canonical customer identity, session compatibility, consent model, retention, subject access, deletion and access controls across 8 countries.
- Start with replicated profile, address, consent and loyalty-balance reads; compare records daily before moving writes.
- Move profile writes through one idempotent command path with compatibility adapter; no forced logouts or password resets.
- Model loyalty as auditable ledger; move balance inquiry before accrual or redemption.
- Route via flags 1% → 10% → 50% → 100%; rollback is single flag flip restoring monolith auth.
- Maintain staffed exception process for subject-access and loyalty mismatches.
15. Pre-sale readiness gate: certify hybrid estate before first peak (depends on: 4, 5, 9, 12, 13, 14)
Certify whatever is live and every fallback before the first of January or July inside the programme. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases for six weeks before and two weeks after the peak; feature work continues behind flags.
- Load-test live routing mix at 12x observed baseline plus agreed headroom including gateway, caches, monolith, services, events, search, warehouse adapter and provider simulators.
- Rehearse reversion of every live service to monolith and confirm monolith plus legacy search/Postgres can absorb reverted load.
- Run game days: provider timeout, CDC lag, flag rollback, search fallback, warehouse file delay, database failover.
- Pre-scale, warm caches, agree provider rate limits, staff war room.
- Obtain written go/no-go from engineering, operations, commerce, finance, warehouse, payments and support.
16. Wave 2 - Dual-run and prove pricing rule slices behind façade (depends on: 10, 12, 13, 14, 15)
Run candidate pricing evaluator in shadow until it matches monolith on live baskets; checkout keeps monolith prices until money path clean.
- Implement well-understood rule slices as versioned configuration or decision tables from S10; encode rules as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live requests; compare exact amount, currency, tax, discount, eligibility, explanation and latency.
- Alert on any mismatch; require business and finance sign-off before live routing.
- Require at least 99.99% parity over two full weeks including weekend, zero unresolved monetary differences, capacity evidence.
- Promote by rule slice, country and promotion type; retain per-slice route-back switch and legacy evaluator through next sale.
- If full engine extraction unsafe, the façade plus proven slices is success.
17. Wave 2 - Wrap payment providers and introduce financial reconciliation (depends on: 6, 8, 9, 15)
Wrap payment providers behind versioned adapters and introduce financial reconciliation before changing checkout orchestration. Do not shadow live payments.
- Build adapter per provider with token handling, webhook verification, idempotent authorise/capture, timeout policy, retries and provider-specific fallback.
- Add durable payment attempt ledger and reconcile authorisations, captures, refunds, chargebacks, settlements and order states daily.
- Validate with provider sandboxes, recorded non-sensitive outcomes, controlled internal cohorts and fault injection.
- Preserve country and payment-method routing and customer-facing response semantics.
- Define in-flight rollback: accepted attempts retain idempotency key and completion path; only new attempts route differently.
- Agree peak rate limits, escalation contacts and outage runbooks with all three providers. Keep PCI scope stable.
18. Wave 2 - Build order-query service and bounded returns workflows (depends on: 8, 13, 14, 15)
Create independently deployable post-order value without splitting order creation transaction.
- Publish reliable order lifecycle events from current command owner through outbox.
- Build order-query read model for self-service, support, notifications and selected back-office reads; display freshness labels.
- Extract bounded returns workflows: initiation, tracking, notifications and non-financial enrichment.
- Reconcile order counts, state transitions, returns, refunds and event lag daily.
- Retain order creation, cancellation, capture coordination, refund authority and warehouse export in monolith until checkout cutover gate passes.
- Backfill historical orders with checksums and resumable batches; run 60-day dual-read validation; keep legacy fallback.
19. Wave 2 - Introduce cart and checkout façades with progressive orchestration (depends on: 13, 14, 16, 17, 18)
Introduce cart and checkout façades and migrate only proven orchestration. Independent deployability of façade is valuable even if monolith executes write.
- Define cart identity, guest merge, session persistence, currency/country transitions, promotion snapshots, inventory-check semantics, cart expiry.
- Build checkout façade initially delegating to monolith; route web/mobile gradually with response compatibility.
- Add checkout durable attempt state, idempotency keys, compensation paths and support procedures for ambiguous payment, stock, order outcomes.
- Move cart reads/writes first with one command owner and reconciliation; move checkout orchestration only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order write failure, customer retry.
- Canary by internal cohort, low-risk country, payment method; expand only when conversion, approval, completion, price parity, stock discrepancy and support thresholds met.
- If ownership transfer not safe before protected window, retain façade delegating to monolith.
20. Pre-sale readiness gate: certify expanded hybrid estate before second peak (depends on: 15, 16, 17, 18, 19)
Repeat and extend capacity certification before the second sale. Do not enter the window with unproven checkout, payment or pricing traffic shifts.
- Enforce same six-week freeze; no first cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on current topology including live pricing slices, checkout façade, order queries, inventory, customer and search.
- Confirm price parity, payment approval, order throughput and inventory discrepancy within thresholds.
- Run disaster-recovery drills: provider outage, event delay/duplication, database failover, search fallback, warehouse delay, flag rollback at peak load.
- Warm caches, pre-scale, agree provider limits, staff war room.
- Obtain formal written sign-off from all stakeholders before entering protection window.
21. Wave 3 - Migrate back-office by workflow and refactor storefront to service layer (depends on: 12, 13, 14, 16, 18, 19, 20)
Migrate back-office by workflow and refactor storefront to service layer. Move 300 staff users without disrupting operations.
- Deliver domain BFFs/screens first for catalogue reads, order query, return status, inventory views, customer support.
- Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, exports and exception handling.
- Run old and new screens in parallel per workflow; provide training, floor support and one-click fallback; retire screen only after 30 stable days.
- Refactor server-rendered storefront to call services via gateway; mobile switches to new API with backward compatibility for two app-release cycles.
- Implement edge caching/CDN for catalogue/search to protect services at 12x.
- Remove direct SQL access to migrated data; replace with governed read models.
22. Wave 3 - Transfer write ownership through reversible single-writer cutovers (depends on: 8, 12, 13, 14, 16, 17, 18, 19, 21)
Transfer data ownership one entity group at a time through reversible single-writer cutovers. Never use unrestricted dual writes.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill, replication direction, reconciliation thresholds and rollback point.
- Backfill with checksums, validate dual reads, then switch single command writer to service.
- Reconcile continuously by id, row counts, hashes, financial totals, stock totals and business state; unresolved money/stock discrepancy halts expansion.
- Rewrite stored procedures only when characterisation harness proves equivalent logic; retain legacy compatibility through observation.
- Schedule high-risk transfers outside sales windows with rollback rehearsal, staffed hypercare and explicit business exception queue.
- Begin low-risk read-model ownership; transfer pricing, inventory reservation or core order ownership only after evidence gates.
23. Decommission legacy paths and establish steady-state governance (depends on: 20, 21, 22)
Close the year by removing only provably obsolete paths and making hybrid estate sustainable.
- Verify every independent capability has named owner, pipeline, SLOs, dashboards, runbooks, on-call, capacity model, DR procedure and tested rollback.
- Retire legacy route, table, procedure, replication stream or flag only after all consumers moved, reconciliation clean, rollback retention elapsed and relevant peak passed.
- Archive required data for audit, tax, financial and GDPR; maintain read-only access where required.
- Measure residual direct DB access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, change failure rate, recovery time and toil.
- Publish funded follow-on roadmap for any core pricing, checkout, order, reservation or loyalty ownership still in monolith.
- Conduct programme review; update architecture governance, API/event lifecycle, resilience testing and quarterly capacity reviews.
--- PROPOSAL 5 (agent qwen3.8-max_refine_5, alibaba/qwen3.8-max) ---
Estimated complexity: high
Success metrics: - Zero unplanned customer-facing downtime attributable to migration work during the 12-month programme.
- Every production migration has a documented and rehearsed rollback. Read-route rollback completes within 5 minutes. Migration-related severity-one recovery completes within 30 minutes.
- No first-time cutover, write-ownership transfer, destructive schema change, payment change, or traffic expansion occurs inside the defined January and July six-week sales-protection windows.
- Each January and July sale meets or exceeds the pre-programme baseline for availability, conversion, payment approval, order throughput, and inventory accuracy at 12x observed normal demand plus agreed headroom.
- Before each sale, the current hybrid topology and full rollback-to-legacy paths pass 12x load, spike, soak, failover, and game-day tests with formal written sign-off.
- Feature delivery remains at least 80% of the agreed pre-programme roadmap baseline. No programme-wide feature freeze occurs.
- By month 12, search, catalogue reads, warehouse/inventory availability, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades are independently deployable with named owners, pipelines, SLOs, dashboards, runbooks, and on-call coverage.
- Transactional write ownership transfers only where specific parity, reconciliation, failure-mode, capacity, and rollback gates pass. Unproven pricing, checkout, or order commands remain safely delegated through independently deployable façades.
- Every migrated capability has zero direct writes to another service database, zero new cross-context joins, and governed versioned APIs or events for integration.
- Every ownership cutover has one command owner. Unrestricted dual writes and distributed transactions are not used.
- Unresolved record discrepancies are below 0.01% at each approved ownership cutover, with zero unresolved discrepancies for money, payment, refund, order total, stock reservation, or loyalty ledger.
- Each migrated pricing rule slice achieves at least 99.99% exact parity over approved golden-master and live shadow cases, with every accepted difference approved by merchandising and finance.
- Critical price, payment, order, refund, stock-reservation, and loyalty scenarios have 100% automated scenario coverage. Changed migration code has at least 80% coverage. Every service boundary has contract tests.
- All three payment providers maintain at least their pre-programme approval rate, with no payment loss or duplicate charge attributable to migration.
- Critical customer-journey failures are detected within 5 minutes. Mean time to revert a bad service release is under 10 minutes via flags or routing.
- Routine compatible releases for extracted services occur at least weekly without the monolith maintenance window. Deployment frequency per service reaches at least weekly, trending toward daily where risk is low.
- Mobile and storefront keep compatible endpoints throughout. No mobile-app release is required for a backend migration. Warehouse file contracts remain valid.
- Back-office availability for 300 staff is at least 99.9% during business hours across all eight countries. Zero forced logouts or password resets during migration.
- Peak-load capacity is sustained at 12x normal traffic with p99 checkout latency at or below 1.2 s and p95 storefront latency at or below 400 ms during January and July sales.
Steps (23):
1. Charter programme, define peak calendar, and lock team capacity
Establish the governance and non-negotiables before any technical change. The programme goal is independently deployable domain capabilities with safe coexistence, not a forced monolith shutdown in 12 months.
- Appoint one accountable programme lead, one chief architect, an operations/SRE lead, and business owners for pricing, finance, warehouse, payments, privacy, and each of the eight countries.
- Publish the 12-month calendar in week one. Map real January and July sale dates, country campaigns, warehouse stocktakes, payment-provider maintenance windows, and mobile release trains.
- Protect each sale with a hard window: **no first-time cutover, write-ownership transfer, destructive schema change, payment-provider change, or traffic expansion for six weeks before through two weeks after** each January and July peak. Feature work continues behind dormant flags.
- Reserve capacity per team: 50% business roadmap, 30% migration, 20% quality and operational resilience. Only the steering committee may rebalance. No programme-wide feature freeze.
- Keep the five teams of eight on their current business areas. Add a thin platform pair (2–3 engineers) for gateway, flags, events, CI, and data tooling. Do not reorganise teams mid-programme.
- Ban big-bang rewrites, shared-database-first splits, unrestricted dual writes, distributed transactions, and irreversible cutovers. Every production step requires a named command owner, a tested rollback, and operations approval.
- Give operations veto authority on search, stock, checkout, and payment routes. Name rollback authority for every production step.
- Create a weekly steering forum, a daily migration dependency board, a decision log, a risk register, and a formal escalation path.
2. Baseline architecture, data, traffic, and business invariants (depends on: 1)
Measure the live estate before changing it. This baseline is the capacity, correctness, and rollback reference for every later wave.
- Trace the top 30 customer, mobile, back-office, warehouse-file, payment-webhook, scheduled-job, and support journeys through Java modules, endpoints, all 350 PostgreSQL tables, stored procedures, triggers, file exchanges, and external providers.
- Record normal and sale-peak traffic by country, language, currency, channel, page type, payment method, and warehouse flow. Capture p50/p95/p99 latency, error rates, conversion, payment approval, database saturation, connection usage, Lucene rebuild time, 15-minute inventory lag, and recovery time.
- Classify every table and procedure by owning concept, writers, readers, sensitivity, retention, GDPR obligations, and cross-module coupling. Flag tables with more than two writers as highest-risk.
- Capture non-negotiable invariants as testable assertions: exact price and tax per country, promotion stacking, stock reservation, no duplicate payment or order, refund integrity, loyalty ledger, warehouse export completeness, and GDPR subject rights.
- Produce a coupling heat map and an extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, operational maturity, testability, and rollback quality.
- Capture anonymised production-shaped data and a documented 12x load profile with agreed headroom. This becomes the fixture source for all later test environments.
3. Define target architecture, domain boundaries, ownership model, and honest year-one scope (depends on: 2)
Agree a pragmatic target based on bounded contexts and clear data ownership. Independently deployable capabilities with proven rollback are the goal. Full monolith retirement is not a 12-month promise.
- Define bounded contexts: edge/storefront, catalogue, search, pricing and promotions, customer and loyalty, inventory and warehouse integration, cart, checkout, payment adapters, orders, returns, and back-office workflows.
- Assign one accountable team and one system of record per entity group. A service may hold a replicated read model but **must never write another service's database**.
- Prohibit distributed transactions. Mandate one command owner per entity, transactional outbox, idempotent consumers, compensating actions, reconciliation, and business exception queues.
- Define entity transition states: monolith-owned → replicated read → shadow-validated → service-owned with compatibility adapter → legacy-retired. Every cutover must pass through these states in order.
- Define API and event standards: versioning, schema compatibility, correlation IDs, idempotency keys, timeouts, retries, authentication, audit events, and deprecation rules.
- Set year-one exit scope: independently deployable search, catalogue reads, inventory availability and warehouse adapter, customer/profile slices, order-query and bounded returns, payment adapters, pricing façade with proven rule slices, and cart/checkout façades.
- Explicit non-goals: big-bang pricing rewrite, physical split of the 1.2 TB database, Java 8 upgrade as a prerequisite, forced mobile release, warehouse-contract change, and monolith decommission within 12 months.
- Transactional write ownership transfers only where parity, reconciliation, failure-mode, capacity, and rollback gates pass. Otherwise the façade remains the independently deployable artefact.
4. Instrument the estate and establish operational control (depends on: 2)
Make the monolith and all future services observable before moving any production traffic. You cannot extract what you cannot see.
- Add correlation IDs, structured logs, RED metrics, distributed traces, business events, real-user monitoring, and synthetic transaction journeys across storefront, mobile, back-office, warehouse exchange, and payment providers.
- Define SLOs and error budgets per domain: storefront p99 < 400 ms, search p95 < 300 ms, cart p95 < 500 ms, checkout p99 < 1.2 s, payment confirmation p99 < 2 s, inventory freshness < 15 min, back-office p95 < 2 s.
- Build side-by-side dashboards for legacy and replacement paths, sliced by country, currency, language, traffic cohort, payment provider, and release version.
- Alert on customer and financial outcomes: price mismatch, payment-without-order, order-without-payment, stock discrepancy, failed warehouse file, event lag, search zero-result drift, and Postgres connection exhaustion.
- Implement immutable audit events for pricing changes, promotion decisions, payments, order state, stock adjustments, customer-data access, and administrative actions.
- Establish an error-budget policy: any extraction step that breaches its SLO budget is automatically rolled back.
- Test current backup, restore, database failover, provider outage handling, and incident communications before service traffic is introduced. Target five-minute detection for critical journey failures.
5. Build the delivery platform: CI/CD, feature flags, progressive delivery, and secure runtime (depends on: 3, 4)
Provide a paved road for independently deployable services that makes deployment safer than the current fortnightly monolith train.
- Deliver a service template with health checks, readiness probes, graceful shutdown, OpenTelemetry, configuration, secrets, service identity, database migrations, outbox publishing, API documentation, and idempotent message handling.
- Create per-service CI/CD pipelines with build provenance, dependency and container scanning, unit, integration, contract, smoke, and performance checks. Environment promotion and approval controls are mandatory for financial changes.
- Implement a feature-flag platform wired into the monolith. Every new or changed code path ships behind a flag. Support dark launch, canary, blue-green, country and cohort targeting, and instant kill.
- Implement automated SLO-based rollback for canary and blue-green deployments. Provision a production-grade runtime (Kubernetes or managed equivalent) with namespaces per bounded context, autoscaling, pod disruption budgets, and resource quotas sized for 12x peak plus headroom.
- Provision isolated development, integration, staging, performance, and production environments through infrastructure as code.
- Centralise secrets, certificate rotation, least-privilege service identities, encryption, vulnerability management, PCI scope assessment, and GDPR data-handling controls.
- Prove online, backward-compatible monolith deploys with connection draining so routine compatible releases no longer need the 30-minute maintenance window.
6. Create the behavioural safety net: characterisation, contracts, and 12x load harness (depends on: 4, 5)
Replace confidence based on 25% unit coverage with automated evidence focused on behaviour, affected risk, and revenue-critical paths.
- Record golden journeys for browse, price, cart, checkout, payment success and failure, order, return, loyalty, and back-office. Automate as regression tests runnable in under 15 minutes.
- Add characterisation tests around stored procedures, pricing rules, checkout flows, and scheduled jobs before modifying or replacing them.
- Establish consumer-driven contracts (Pact or Spring Cloud Contract) for every mobile, storefront, back-office, provider, and service boundary. Preserve existing mobile contracts without requiring an app release.
- Require 100% automated scenario coverage for defined money, stock, refund, loyalty, and payment invariants before their ownership can change. Require 80% coverage on changed migration code.
- Build a production-like performance environment with anonymised data, payment-provider simulators, warehouse-file simulators, and repeatable country, currency, language, tax, and promotion fixtures for all eight countries.
- Automate load, soak, spike, failover, and chaos tests using the observed 12x sale profile. Run them before every traffic expansion and every sale.
- Use mutation testing to identify the highest-risk untested paths. Prioritise checkout, payment, and inventory flows.
7. Modularise the live monolith without stopping features (depends on: 3, 5, 6)
The monolith remains the primary production system for most of the programme. Create internal seams before extracting. New features may not add cross-module coupling.
- Enforce package and dependency boundaries with ArchUnit tests, code owners, and mandatory review for cross-domain changes.
- Introduce branch-by-abstraction façades around search, catalogue, pricing, inventory, customer, and payment-provider logic. Wrap high-risk database access behind repository and application interfaces.
- Ban new cross-module joins, direct table access outside the designated domain module, and new stored-procedure coupling.
- Apply expand-contract schema migrations only. Additive, backward-compatible changes deploy first. Destructive changes require evidence all readers have moved.
- Add kill switches to every new monolith-to-service integration. New features use the façades and flags so roadmap delivery helps rather than bypasses the migration.
- Raise regression coverage on any module before it is touched. Use the golden journeys from S6 as the baseline.
- Keep the monolith on Java 8. Start new services on a current LTS behind stable interfaces. Do not couple the Java upgrade to the migration.
8. Deploy the strangler gateway with minute-scale rollback (depends on: 4, 5, 6)
Decouple web, mobile, and back-office clients from monolith internals while keeping current contracts intact. Rollback becomes a route change, not a redeploy.
- Place a reverse proxy or API gateway in front of existing endpoints without changing initial functional behaviour.
- Route by path, country, cohort, header, flag, and percentage. Default every route to the monolith until promotion criteria are met.
- Preserve cookies, tokens, sessions, headers, the four languages, three currencies, eight countries, server-rendered storefront behaviour, and mobile API versions. Do not require a mobile-app release.
- Mirror only safe read-only requests or explicitly idempotent shadow calls. Never duplicate customer-visible commands, payment requests, or checkout submissions.
- Implement instant route rollback to the monolith: a configuration change, not a redeploy, completing within five minutes including in-flight request draining.
- Test cache bypass, session continuity, connection draining, and full-load reversion to the monolith before moving any business endpoint.
- Measure baseline response equivalence and gateway latency overhead. Gateway must add less than 50 ms p99 overhead.
9. Stand up the event backbone, outbox, CDC, and reconciliation product (depends on: 3, 5, 7)
Build the coexistence spine that decouples services and enables safe data and command transition. Services subscribe to facts. They do not call each other's databases.
- Deploy an event platform (Kafka or equivalent) with topics per bounded context, a schema registry with backward-compatibility enforcement, retention, replay, dead-letter processing, and named consumer ownership. Size beyond the 12x sale profile.
- Add transactional outbox publishing to new writes and selected monolith modules. Use CDC (Debezium) only where an outbox cannot yet be added, with a dated retirement owner and plan.
- Provide controlled backfill, checkpoints, resumable replication, lag monitoring, hashes, counts, stock and money totals, and record-level exception queues.
- Standardise anti-corruption adapters, idempotent consumers, duplicate-event handling, circuit breakers, bulkheads, timeout policies, and correlation ID propagation.
- Define write rollback semantics: routing new commands back is insufficient. Previously accepted commands must complete through their original compatible state machine or be handled by an explicit, auditable exception workflow.
- Test replay, duplicated events, delayed events, poisoned messages, and reconciliation at projected peak volume before any production traffic uses the backbone.
10. Codify one extraction playbook every team must use (depends on: 6, 8, 9)
Stop inventing a new cutover method per domain. One playbook makes five teams safer and faster.
- Every extraction follows the same stages: seam and façade → replicated read model → shadow comparison → canary by country or cohort → observation → optional single-writer transfer → retain rollback.
- Promotion criteria are quantitative: error rate, latency, conversion, search quality, price parity, payment approval, order completion, inventory discrepancy, support contacts, and reconciliation lag.
- Shadow never duplicates payments or other customer-visible commands. Mirror only safe reads.
- Stop traffic expansion automatically if reconciliation or SLO thresholds are breached. Financial discrepancies require immediate investigation.
- High-risk ownership moves happen only outside sales-protection windows, with a rollback rehearsal and staffed hypercare.
- Stored procedures leave only when the characterisation harness has an equivalent in service code.
- Retain legacy routes, flags, and compatibility adapters through at least one relevant sale period after full traffic migration.
- Document rollback authority, hypercare staffing, and exception handling for every stage.
11. Start pricing archaeology and deploy a legacy pricing façade (depends on: 2, 7)
Treat the 200,000-line pricing module as a behaviour-preservation programme. Do not rewrite from tribal knowledge. Start this in parallel with platform work.
- Form a dedicated squad of senior engineers, merchandising, finance, country representatives, support, and QA. Protect its capacity for the full programme.
- Inventory all rules, stored procedures, configuration tables, overrides, scheduled jobs, manual back-office actions, tax inputs, and external dependencies. Identify dead rules that have not fired in 24 months.
- Capture privacy-safe production decision traces. Build a golden-master corpus covering products, segments, countries, currencies, dates, carts, vouchers, stacking, tax, inventory conditions, and edge cases with at least 1,000 real orders per country.
- Put the existing engine behind a versioned pricing façade. All new callers use the façade even while it delegates in-process to legacy logic.
- Classify rules into independently movable slices: universal, country-specific, and campaign/temporary. Produce a machine-readable rule catalogue.
- Build a shadow evaluation harness that compares candidate outputs with the legacy engine for exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Deliver a signed-off rule specification document that all five teams agree represents current observable behaviour by month 4.
12. Wave 1: Extract search as the first independently deployable service (depends on: 9, 10)
Replace the nightly Lucene rebuild with a read-heavy service off the money path. This proves the playbook on live customer traffic.
- Build a search service indexed incrementally from catalogue and inventory events. Support locale-aware analysis, index aliases, blue/green indexes, and explicit cache controls.
- Shadow-compare ranking, facets, zero-result rate, locale behaviour, latency, and conversion against current Lucene before any live routing.
- Shift traffic through employee cohort, low-risk country, and measured percentage stages (1% → 10% → 50% → 100%) with instant route rollback.
- Search must not become authoritative for price or stock. It consumes versioned read models from their owners.
- Keep the old Lucene index warm as a cold standby through the next relevant sale.
- Give the owning team an independent pipeline, SLOs, dashboards, runbooks, on-call rotation, and a practised rollback.
- Deploy independently at least weekly. Prove rollback to monolith search completes within five minutes.
13. Wave 1: Extract catalogue read models (depends on: 12)
Serve product, media, categories, and localisation from a catalogue read service. Command ownership stays in the monolith until merchandising has a proven path.
- Build country and language read models for eight markets around one product identity. Feed from monolith-owned data via outbox or controlled replication.
- Shadow-compare content, availability display, locale fields, media URLs, and response latency against the monolith before any live percentage.
- Cut storefront and mobile read traffic via the gateway after parity holds. Keep a cache bypass and monolith fallback.
- Stop new cross-module catalogue joins. Route all catalogue access through the read service or its compatibility adapter.
- Do not move authoring tools until reads are operationally boring.
- Retain the monolith catalogue route through at least one relevant sale as fallback.
- Introduce edge caching (CDN) for catalogue responses to protect services during 12x peaks.
14. Wave 1: Wrap warehouse files and extract inventory availability reads (depends on: 9, 10)
Separate warehouse file exchange from customer-facing availability without changing the warehouse contract and without moving reservation authority.
- Build an adapter that validates, journals, deduplicates, acknowledges, retries, and replays inbound and outbound warehouse files. The warehouse SFTP contract remains unchanged.
- Publish inventory-change events and build an availability read model with explicit freshness, safety-stock, fulfilment-node, country, and oversell semantics.
- Shadow-compare every availability result against the monolith. Reconcile per SKU, warehouse, and order state before traffic expansion.
- Move storefront and search availability reads progressively. Leave reservation, allocation, and warehouse-export authority in the monolith.
- Prove no extra oversell versus today's 15-minute lag before a sale. Test delayed, duplicate, malformed, and replay scenarios under peak load.
- Provide immediate read fallback to monolith availability and a replayable file-processing recovery process.
15. Wave 1: Extract customer reads and bounded loyalty with GDPR compliance (depends on: 9, 10)
Move identity-adjacent capabilities in bounded slices, preserving session continuity and privacy rights across eight countries.
- Define canonical customer identity, session compatibility, consent model, data-retention rules, subject-access and deletion workflows, and access-control rules first.
- Start with replicated profile, address, consent, and loyalty-balance reads. Compare records and balances daily before moving any writes.
- Move profile writes through one idempotent service command path with a compatibility adapter. Preserve existing browser and mobile sessions. No forced logouts or password resets.
- Model loyalty as an auditable ledger. Move balance inquiry before accrual or redemption. Retain legacy financial-impacting commands until reconciliation is consistently clean.
- Ensure subject-access and deletion work in both monolith and service during transition. Maintain a staffed exception process for mismatched requests.
- Route traffic via flags starting at 1% → 10% → 50% → 100%. Rollback is a single flag flip restoring monolith auth.
16. Peak readiness gate 1: certify the hybrid estate before the first sale (depends on: 6, 8, 12, 13, 14, 15)
Certify whatever is live, and every fallback, before the first of January or July that falls inside the 12-month period. A service is not ready if its rollback target cannot take the traffic.
- Freeze new cutovers and traffic increases in the six-week protection window. Feature work continues behind flags.
- Load-test the live routing mix at 12x observed baseline plus agreed headroom, including gateway, caches, monolith, services, event platform, search, warehouse adapter, payment simulators, and database.
- Prove traffic reversion from each live service to the monolith and confirm the monolith plus legacy search and Java 8/Postgres can absorb the full reverted load.
- Run game days: kill pods, inject latency, take a payment provider offline, simulate event lag, replay warehouse files, test flag rollback at peak load.
- Conduct incident-command exercises, stakeholder communications rehearsals, and customer-support drills.
- Pre-scale infrastructure, warm caches and indexes, validate connection limits, and confirm provider rate-limit agreements.
- Obtain formal written go/no-go from engineering, operations, commerce, finance, warehouse, payments, and customer support before entering the protection window.
- If Season 1 is incomplete, ship only what passed this gate. Everything else waits.
17. Wave 2: Dual-run and prove pricing rule slices behind the façade (depends on: 11, 13, 14, 16)
Run a candidate evaluator in shadow until it matches the monolith on live baskets. Checkout keeps monolith prices until the money path is clean.
- Implement well-understood rule slices as versioned configuration or decision tables with explicit effective dates and auditable approval. Encode rules from S11 as configuration, not hard-coded logic.
- Shadow-evaluate all applicable live price requests without changing the customer result. Compare exact amount, currency, tax, discount, eligibility, explanation, and latency.
- Alert on any mismatch. Classify financial impact. Require business and finance sign-off before live routing of each slice.
- Require at least 99.99% exact parity over two full weeks including a weekend, zero unresolved monetary discrepancies, capacity evidence, and written merchandising and finance approval for each slice.
- Promote by rule slice, country, promotion type, and percentage. Retain a per-slice route-back switch and the legacy evaluator through the next relevant sale.
- Keep unproven country-specific, campaign, or legacy rules delegated through the façade. Do not force equivalence by silently accepting financial differences.
- If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices. That is success, not failure.
18. Wave 2: Isolate payment providers and create financial reconciliation (depends on: 6, 9, 10)
Make payment behaviour independently deployable before changing checkout orchestration. Do not duplicate live financial commands for shadow testing.
- Wrap each of the three payment providers behind a versioned adapter with token handling, webhook verification, idempotent authorisation and capture, timeout policy, controlled retries, and provider-specific failure handling.
- Add a durable payment-attempt state machine and ledger. Reconcile authorisations, captures, refunds, chargebacks, settlements, and order state daily.
- Validate using provider sandboxes, recorded non-sensitive production outcomes, controlled internal cohorts, and fault injection. Never mirror live payment commands.
- Preserve country and payment-method routing plus customer-facing response semantics during adoption.
- Define in-flight rollback behaviour: an accepted attempt retains its idempotency key and original completion path. Only new attempts use a rolled-back route.
- Agree peak rate limits, escalation contacts, and outage runbooks with all three providers.
- Keep PCI and provider contracts stable. Wrap, do not rewrite.
19. Wave 2: Deliver order-query slices, notifications, and bounded returns (depends on: 9, 14, 15)
Create independently deployable post-order value without splitting the revenue-critical order-creation transaction.
- Publish reliable order lifecycle events from the current command owner through the outbox pattern.
- Build an order-query read model for self-service, customer support, notifications, and selected back-office reads. Display freshness labels where eventual consistency applies. Preserve monolith fallback.
- Extract bounded workflows: return initiation, return tracking, notification delivery, and non-financial enrichment where ownership and compensations are clear.
- Reconcile order counts, state transitions, notification delivery, returns, refunds, and event lag continuously against the legacy system.
- Retain order creation, cancellation, payment capture coordination, refund authority, and warehouse order export under their existing command owner until the checkout cutover gate is met.
- Backfill historical orders with checksums and resumable batches. Run reconciliation during a 60-day dual-run window.
- Keep legacy query and workflow routes available for immediate fallback during the observation period.
20. Wave 3: Introduce cart and checkout façades, then migrate only proven orchestration (depends on: 14, 15, 17, 18)
Strangle the transactional path without a big-bang rewrite. Independent deployability of the façade is valuable even if the monolith still executes the write.
- Define cart identity, guest-to-account merge, session persistence, currency and country changes, promotion snapshots, inventory-check semantics, and cart expiry.
- Introduce cart and checkout façades that initially delegate to legacy commands. Route web and mobile gradually with response compatibility.
- Add durable checkout-attempt state, idempotency keys, explicit compensation paths, and support procedures for ambiguous stock, payment, and order outcomes.
- Move cart reads and writes first, with one command owner and reconciliation of active, abandoned, merged, and promotional carts.
- Move checkout orchestration one country and payment method at a time only after payment adapters, pricing slices, inventory semantics, failure-mode tests, and 12x hybrid tests pass.
- Move checkout only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.
- Canary by internal cohort, low-risk country, payment method, and percentage. Expand only when conversion, approval, completion, price parity, stock discrepancy, latency, and support-contact thresholds are met.
- If ownership transfer is not safe before a protected window, retain the independently deployable façade delegating to the monolith. Never make a first transaction ownership cutover during a sales-protection window.
21. Peak readiness gate 2: certify before the second sale and rehearse full-load reversion (depends on: 16, 17, 18, 19, 20)
Repeat and extend capacity certification before the second sale with more services in the path. Do not enter the window with unproven checkout, payment, or pricing traffic shifts.
- Enforce the same six-week protection window. No first-time cutovers or traffic experiments.
- Re-run 12x hybrid load and rollback-to-monolith tests on the then-current topology, including any live pricing slices, checkout façade, order queries, inventory, customer, and search services.
- Confirm price parity, payment approval, order throughput, and inventory discrepancy stay within agreed thresholds.
- Warm caches, pre-scale infrastructure, agree provider rate limits, and staff a war room.
- Run disaster-recovery drills: payment-provider outage, event delay or duplication, database failover, search fallback, warehouse file delay, and flag or route rollback at expected peak load.
- Conduct incident-command and customer-support rehearsals. Verify runbooks, dashboards, and exception queues.
- After the sale, compare actuals to forecasts and freeze lessons into the final wave.
- Obtain formal written sign-off from all stakeholders before entering the protection window.
22. Migrate back-office workflows by role and transfer proven write ownership (depends on: 13, 14, 15, 19, 21)
Move the 300 staff users by workflow and role, not by replacing the entire administration application. Transfer writes as controlled state transitions.
- Deliver domain BFFs and screens first for catalogue reads, order query, return status, inventory views, and customer support. Preserve role-based access, segregation of duties, audit logs, country entitlements, approval controls, and operational exception handling.
- Run old and new screens in parallel per workflow. Provide training, floor support, feedback capture, and one-click fallback during adoption. Retire a legacy screen only after at least 30 stable days and business-owner acceptance.
- For each entity group, document source of truth, writers, readers, stored procedures, backfill method, replication direction, retention, reconciliation thresholds, and rollback mechanics.
- Backfill with checksums. Validate dual reads. Then switch the single command writer to the service. Avoid unrestricted dual writes.
- Rewrite stored procedures only after characterisation evidence proves an equivalent implementation. Preserve procedure and table rollback compatibility through the observation period.
- Schedule high-risk ownership transfers outside protection windows with a rollback rehearsal, full hypercare staffing, and an explicit business exception queue.
- Remove direct SQL reporting access to migrated data. Move reports to governed read models or controlled reporting exports.
23. Consolidate proven services, retire obsolete paths, and hand over steady-state governance (depends on: 21, 22)
Close the year by removing only genuinely obsolete paths and making the hybrid estate sustainable. Safety evidence takes precedence over a symbolic monolith shutdown.
- Verify each independently deployable capability has named ownership, independent pipeline, SLOs, dashboards, runbooks, on-call coverage, disaster-recovery procedure, capacity model, and tested rollback or recovery path.
- Retire a legacy path only after all consumers have moved, reconciliation is clean, rollback-retention has elapsed, and at least one relevant peak or equivalent capacity test has passed.
- Archive required data and code for audit, tax, financial, and GDPR obligations. Maintain documented read-only access where retention requires it.
- Remove temporary replication, flags, endpoints, tables, procedures, and jobs through separate controlled changes, never as part of the initial cutover.
- Measure residual direct database access, cross-domain coupling, synchronous dependency depth, event lag, deployment frequency, incident recovery, and operational toil.
- Publish the funded follow-on roadmap for any pricing, checkout, order, inventory reservation, or data ownership transfer that properly remained in the monolith after 12 months.
- Conduct a post-migration review against business outcomes, incident history, delivery lead time, cost, and peak performance.
- Keep instant rollback in place. Do not declare the programme done if sales protection, money integrity, or revertability was traded away.
You do not know which of them was voted for, and you must not guess it: judge them on their merits. Your answer has these parts:
- "summary": two or three sentences on what the final round offers, as a whole.
- "assessments": one object per final proposal, with "proposal" (its number), "fitness" ("strong", "adequate" or "weak" for the task as stated), "strengths" and "weaknesses" (lists of concrete points: steps, order, metrics, realism, risk handling).
- "ranking": the numbers of the final proposals from best to worst.
- "ranking_reasons": why that order, naming what separates each one from the next.
- "versus_initial": one object per initial proposal, comparing YOUR FIRST CHOICE with it: "proposal" (its number in round 0), "verdict" ("better" if your first choice is better than that initial proposal, "worse" or "similar"), "why" and "how" (in what concrete ways).
- "improved_over_initial": true if your first choice is better than EVERY initial proposal.
- "improvement_summary": what the deliberation added or lost with respect to the initial proposals, overall.
- "process_evaluation": an evaluation of the process itself, not a narration: whether the convergence between agents was earned by better arguments or was mere imitation, whether the agents criticised each other's ideas or just copied them, whether anyone questioned the task's premises, and what was lost along the way.
- "process_issues": a list of concrete problems you observed in the process.
- "suggestions": a list of concrete changes that would make the process produce a better plan.
[VOTE COMPARISON]
[SYSTEM]
You are an expert reviewer of multi-agent planning processes.
Several LLM agents drafted plans for a task, refined them over a number of rounds while seeing each other's proposals, and finally voted for the best one.
Be exhaustive but precise: name concrete steps, ideas and metrics, never generalities. Judge plans by their fitness for the task as stated, their realism, their completeness, the soundness of their order and dependencies, how measurable their success is and how they handle things going wrong.
You are an impartial evaluator, not a chronicler: assess the proposals and the process on their merits, never rationalise what happened or assume that the outcome was right.
After your analysis, answer in the requested structure.
Every text field you write will be read by a busy person, so write for them: short sentences, one idea each, in short paragraphs. Text fields accept Markdown: separate paragraphs with a blank line, use a bullet list when you enumerate things and plain paragraphs when you explain or argue, and bold at most one key phrase per paragraph. A text of more than three sentences must be split into paragraphs; never deliver a single unbroken block of text.
[HUMAN]
Task given to the agents: "A mid-size European fashion retailer runs its e-commerce on a 10-year-old monolith: Java 8 / Spring, about 2 million lines, one PostgreSQL database of 1.2 TB with 350 tables and heavy use of stored procedures and cross-module joins. It serves 8 countries, 3 currencies and 4 languages, with about 40,000 orders a day and peaks of 12x during sales. The monolith contains: the storefront (server-rendered, plus a separate mobile app hitting the same endpoints), catalogue and search (a Lucene index rebuilt nightly), pricing and promotions (the most complex module, 200,000 lines, with country-specific rules nobody fully understands), cart and checkout with three payment providers, order management, inventory synchronised every 15 minutes with the warehouse system via file exchange, customer accounts and loyalty, returns, and a back-office used by 300 staff. Deployments happen every two weeks as a single artefact with a 30-minute maintenance window; test coverage is 25% and mostly unit tests. Five teams of 8 developers, each organised around a business area but all committing to the same repository.
Plan the migration to independently deployable services over 12 months with no feature freeze, no unplanned downtime and the ability to roll back every step, preserving the peak-season capacity (sales in January and July must not be put at risk)."
You assessed the proposals of the final round without knowing the vote, and ranked them from best to worst as: 3, 2, 5, 1, 4. Your reasons were:
Proposal 3 edges ahead because it combines the three most important operational safeguards in one plan: the five-team operability constraint, the conditional throttle if the programme starts near a sale, and the explicit ban on new CDC/connection-pool load during protection windows. It also has a concrete reforecast step (S17) with measurable triggers. Proposal 2 is a close second; its command-rollback semantics and standalone extraction-playbook step are the most precise in the round, but it lacks a reforecast mechanism and merges inventory and customer reads into one step. Proposal 5 is third: it is the most detailed and cross-referenced, but its refusal to revise in round 4 means it missed the conditional throttle, the reforecast step, and the connection-budget safeguard that Proposals 1–3 added. Proposal 1 is fourth: its reforecast step and 4-month warehouse burn-in are genuine strengths, but the ≥60% monolith-reduction metric contradicts its own conditional-scope language, and the cart/checkout window (months 8–11) is dangerously compressed. Proposal 4 is last: it is competent and granular but lacks a reforecast step, a five-team operability check, SSR cache handling, and Postgres connection-budget management, making it the least operationally grounded of the five.
The vote is now revealed. Each voter received the same final proposals and chose one:
claudeHaiku4.5_voter_1 (anthropic/claude-haiku-4-5) voted for proposal 3. Justification: Proposal 3 most directly addresses the hard constraint of the five existing teams by explicitly capping independently deployable unit count to what those teams can operationally support and including a reforecasting step (S17) to shrink scope if migration capacity exceeds 30% or feature delivery drops below 80%, making it the most realistic and achievable plan for this complex migration while maintaining all safety and rollback requirements.
gpt-5.6-terra_voter_2 (openai/gpt-5.6-terra) voted for proposal 5. Justification: Proposal 5 is the most complete and coherent staged strangler plan. It combines explicit peak-window protection, reversible routing and single-writer controls, quantified parity and reconciliation gates, realistic façade-first treatment of pricing and checkout, and concrete readiness gates before both sales while preserving feature delivery.
grok-4.6_voter_3 (xai/grok-4.6) voted for proposal 3. Justification: It is the plan that best matches the real constraints: five teams, a 1.2 TB Postgres monolith that must not be split, and January/July peaks that cannot take first-time risk. It keeps independent deployability without forcing write-ownership, throttles Season 1 if a sale is inside 16 weeks, caps on-call and connection use, and reforecasts after the first peak before touching pricing or checkout.
deepseek-v4-pro_voter_4 (deepseek/deepseek-v4-pro) voted for proposal 3. Justification: Proposal 3 best balances safety and progress by explicitly protecting the first peak with a throttle mechanism, mapping services to the existing five teams to avoid operational overload, inserting a data-driven reforecast after the first peak, and using guarded façades and reversible write transfers with reconciliation and rollback throughout.
qwen3.8-max_voter_5 (alibaba/qwen3.8-max) voted for proposal 3. Justification: Proposal 3 best balances completeness with operability: it explicitly acknowledges the 1.2 TB Postgres connection-budget constraint, keeps all independently deployable units within the existing five-team on-call capacity, and includes a formal post-peak reforecast step that protects against overcommitment in Season 2. Its success metrics are the most thorough—covering peak latency, inventory oversell, PCI scope stability, and a funded follow-on roadmap—while its step dependencies and extraction playbook remain coherent and realistic for a no-freeze, rollback-safe 12-month programme.
The selected plan is proposal 3 (4 of 5 votes).
Your answer has these parts:
- "agrees": true if the selected plan is your first choice, false otherwise.
- "comment": two to five sentences confronting the vote with your ranking. If they differ, say on which criteria the voters and you weigh the proposals differently, and whether the voters' justifications reveal a bias (length, confidence, style, position in the list). If they agree, say whether the voters' justifications rest on the same merits you found or on others. Do not revise your ranking.
[ROUND 0]
{"round_summary": "All five agents converge on the strangler-fig pattern with feature flags, canary routing, and event-driven data transition, but diverge sharply on extraction sequence, pricing-risk handling, and ambition for monolith retirement. Proposal 5 is the most aggressive, targeting zero monolith lines in 12 months and seven extraction waves with concrete tooling choices (Debezium, Kafka, Elasticsearch, Pact). Proposal 2 is the most conservative, treating pricing as a dedicated discovery stream and explicitly allowing partial extraction if parity cannot be proven. Proposals 1 and 4 follow a more traditional sequential extraction with explicit peak-readiness gates, while Proposal 3 emphasises monolith modularisation in place and a strict freeze calendar around sales windows.", "proposals": [{"proposal": 1, "summary": "A 23-step plan that builds Kubernetes infrastructure, a strangler proxy, and observability in the first two months, then extracts services in a low-to-high-risk order: catalogue/search, customer accounts, returns, pricing, inventory, payments. Pricing is treated as a dedicated audit and rebuild stream starting early in parallel with infrastructure work. The plan ends with a 48-hour pre-peak rehearsal, load testing at 12x, and a go/no-go gate before each sales period.", "approach": "Infrastructure-first, sequential extraction with pricing audit running in parallel"}, {"proposal": 2, "summary": "A 20-step plan that front-loads governance, baseline measurement, and production safety before any extraction. It sequences five waves from read-only catalogue/search through to cart/checkout, explicitly excluding pricing from early waves and treating it as a bounded-slice discovery stream. It mandates sales protection windows (four weeks before and through January/July), prohibits distributed transactions, and requires formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and support.", "approach": "Risk-averse, wave-based extraction with explicit sales protection windows and pricing deferral"}, {"proposal": 3, "summary": "A 25-step plan that starts with monolith modularisation in place (package-level bounded contexts, branch-by-abstraction) before creating any new processes. It enforces a hard freeze calendar around sales (six weeks before, two weeks after), extracts search first as a read-heavy low-risk seam, and uses a dual-run shadow harness for pricing before any traffic shift. The plan includes explicit steps for cart-state migration, checkout canary by country and payment method, and back-office UI migration screen-by-screen.", "approach": "Modularise-in-place first, strict sales calendar, dual-run pricing shadow before cutover"}, {"proposal": 4, "summary": "A 19-step plan that starts with bounded-context decomposition and CI/CD automation, then extracts customer accounts as a pilot, followed by catalogue/search, pricing with months-long shadow comparison, inventory, cart/checkout, and orders. It inserts two explicit peak-readiness gates (steps 12 and 16) that freeze cutovers four weeks before each sales period. The plan targets 60% monolith code reduction by month 12 and requires 80% test coverage on changed code.", "approach": "Pilot-first extraction with dual peak-readiness gates and shadow-mode pricing validation"}, {"proposal": 5, "summary": "A 20-step plan organised in seven extraction waves, targeting complete monolith retirement (zero lines in production) by month 12. It specifies concrete tooling: Debezium for CDC, Kafka for events, Elasticsearch to replace Lucene, Pact for contract tests, and Gatling/k6 for load testing. Pricing gets a dedicated six-step analysis and shadow-mode extraction (steps 13-14) with a 0.01% discrepancy threshold over two weeks before traffic shift. The plan includes storefront BFF modernisation and a 30-day zero-traffic verification before decommissioning.", "approach": "Aggressive full-retirement target with seven waves, concrete tooling, and zero-monolith end state"}]}
[ROUND 1]
{"round_summary": "All five proposals converged strongly toward a shared architecture: strangler gateway, event backbone with outbox/CDC, pricing archaeology before extraction, dual peak-readiness gates, and honest acknowledgment that full monolith retirement may not be achievable in 12 months. The refinement round produced materially better plans overall, with Proposals 2 and 3 standing out for risk realism and Proposal 1 remaining the weakest due to overly aggressive scope commitments. The principal divergence remaining is whether the 12-month target demands full monolith decommission (Proposals 1, 5) or accepts a residual monolith behind façades (Proposals 2, 3).", "converging": true, "proposals": [{"proposal": 1, "assessment": "mixed", "what_changed": "The proposal adopted the governance-and-peak-calendar framing, pricing archaeology workstream, and warehouse adapter pattern from other round-0 proposals, which are genuine improvements. However, it retained unrealistic end-state commitments: decommissioning the monolith to under 100k lines and assigning all 350 tables to single services by month 12. The step descriptions are thin compared to peers, and the sequencing still places cart/checkout extraction after only one peak gate, compressing the riskiest work into the final quarter.", "improvements": ["Added explicit peak-season blackout protocol (step 1) with named freeze windows, adopted from Proposals 2 and 3.", "Introduced a dedicated pricing archaeology workstream (step 10) running in parallel with infrastructure, matching the approach of Proposals 3 and 5.", "Added a warehouse adapter step (step 11) that preserves the existing file contract, borrowed from Proposal 2's step 12.", "Added two explicit peak readiness gates (steps 14, 18) rather than a single end-of-programme test.", "Success metrics now include pricing parity at 99.99% and reconciliation thresholds, aligning with Proposal 2's rigor."], "regressions": ["Still commits to reducing the monolith to under 100k lines and decommissioning it fully by month 12, which contradicts the honest-scope lesson adopted by Proposals 2 and 3.", "Step descriptions are one-to-two sentences each, far less detailed than the 5–10 bullet sub-steps in Proposals 2, 3, and 5, making execution guidance vague.", "Cart/checkout extraction (step 19) depends only on peak gate 2, leaving no explicit failure-mode analysis or compensation-path design step before touching the revenue path.", "No explicit step for monolith modularisation or architecture tests before extraction begins; step 7 mentions it in one sentence but provides no mechanism."], "taken": [{"from_proposal": 2, "steps": [1], "what": "Sales-protection windows with a six-week freeze before and two weeks after January/July peaks.", "why": "Adopted as step 1's peak-season blackout protocol and reiterated in steps 14 and 18 as explicit gate conditions."}, {"from_proposal": 2, "steps": [12], "what": "Warehouse adapter that preserves the existing file contract while publishing inventory events.", "why": "Adopted as step 11, keeping the warehouse system unchanged and feeding inventory-updated events to Kafka."}, {"from_proposal": 3, "steps": [17], "what": "Pricing archaeology: capture production decision traces and build a golden-master corpus before any extraction.", "why": "Adopted as step 10, a parallel workstream starting in month 1 that produces a signed-off rule specification."}, {"from_proposal": 3, "steps": [18], "what": "Dual-run shadow comparison for pricing with a discrepancy threshold before live traffic.", "why": "Adopted in step 17: shadow mode with a 0.01% discrepancy threshold over two weeks before canary shifting."}, {"from_proposal": 4, "steps": [5], "what": "Feature-flag platform and progressive delivery as a prerequisite for all extractions.", "why": "Adopted in step 4, placing CI/CD and flags early and making every later wave depend on them."}, {"from_proposal": 5, "steps": [14], "what": "Shadow-mode pricing comparison with a 4–6 week observation window and 0.01% discrepancy gate.", "why": "Adopted in step 17 with the same threshold and weekend-inclusive observation period."}], "rejected": [{"from_proposal": 2, "steps": [3], "what": "Explicit statement that full monolith retirement is not a 12-month promise and that pricing/checkout may remain behind façades.", "why": "Proposal 1 commits to decommissioning the monolith to under 100k lines by month 12 (step 23), rejecting the honest-scope position."}, {"from_proposal": 3, "steps": [3], "what": "Honest 12-month scope: independently deployable services are the goal; full monolith retirement is not promised.", "why": "Proposal 1's success metrics include 'Monolith code reduced from 2M lines to <100k lines' and step 23 decommissions the monolith entirely."}]}, {"proposal": 2, "assessment": "improved", "what_changed": "The refinement sharpened the proposal's already strong risk discipline by adding an explicit peak calendar step (step 4), a dedicated payment-adapter step (step 16) separated from checkout, and a clearer back-office migration path (step 20). The 12-month scope is now explicitly bounded: façades and proven slices count as success, and a funded follow-on roadmap covers anything not safely transferred. The step count dropped from 20 to 22 but each step gained more actionable sub-bullets and clearer entry/exit criteria.", "improvements": ["Added step 4 (peak calendar and release-control policy) making the January/July constraint an executable artefact with permitted-work definitions.", "Separated payment-provider adapters (step 16) from checkout orchestration (step 18), reducing blast radius and allowing provider isolation before touching the transaction path.", "Added step 20 for incremental back-office migration by workflow and role, with parallel operation and training.", "Step 3 now explicitly defines a year-one exit scope and states that legacy pricing and order creation may remain behind façades.", "Step 19 (data ownership cutovers) adds automatic halt on reconciliation threshold breach and explicit prohibition on deleting data during initial transfer.", "Success metrics now include 'no first-time cutover inside sales-protection windows' as a measurable constraint."], "regressions": ["Step count increased from 20 to 22, adding some structural complexity without adding new domain coverage.", "The proposal no longer has a single explicit 'select and sequence extraction waves' step; sequencing is now distributed across steps 11–18, making the overall wave structure slightly harder to read at a glance."], "taken": [{"from_proposal": 1, "steps": [15], "what": "Event-driven pricing and cart synchronisation: publish promotion lifecycle events and have cart recalculate totals.", "why": "Incorporated into step 17 (cart and checkout façades) as promotion-snapshot and inventory-check semantics, though with less event-detail than Proposal 1's step 15."}, {"from_proposal": 3, "steps": [2], "what": "Hard engineering blackout: no extractions, schema splits, or traffic switches in the six weeks before a sale.", "why": "Adopted as step 4's peak calendar with a six-week-before, two-week-after protection window and explicit permitted-work list."}, {"from_proposal": 3, "steps": [9], "what": "Modularise the monolith in place with compile-time architecture tests and a ban on new cross-module joins.", "why": "Adopted in step 7, adding ArchUnit-style package boundaries, branch-by-abstraction, and expand-contract schema rules."}, {"from_proposal": 4, "steps": [11], "what": "Production-like staging environment with payment-provider and warehouse-file simulators.", "why": "Adopted in step 9 (quality assurance) as a production-like performance environment with provider and warehouse simulators."}], "rejected": [{"from_proposal": 1, "steps": [23], "what": "Full monolith decommission to under 100k lines by month 12.", "why": "Proposal 2 explicitly states in step 3 and step 22 that legacy components are retained where removal would weaken safety, and a funded follow-on roadmap covers remaining work."}, {"from_proposal": 5, "steps": [20], "what": "Monolith codebase reduced to 0 lines in production by end of month 12.", "why": "Proposal 2 step 22 retires only proven-obsolete paths and explicitly retains legacy where removal creates unjustified risk."}]}, {"proposal": 3, "assessment": "improved", "what_changed": "The refinement consolidated the original 25 steps into 23 with tighter grouping and added two explicit peak-certification steps (21, 22) that were previously implicit. The honest-scope position is now stated bluntly in step 3: 'Full monolith retirement is not a 12-month promise.' The pricing section (steps 15–16) is sharper, separating archaeology from dual-run slice migration. The team model step (4) now specifies a 50/30/20 capacity split, making the no-freeze commitment concrete.", "improvements": ["Two explicit peak-certification steps (21, 22) with game-day scenarios, formal go/no-go, and monolith-reversion load tests.", "Step 3 now states explicitly that pricing engine, checkout write path, and core OMS may still delegate to the monolith at month 12.", "Step 4 adds a concrete 50/30/20 capacity split and names the platform-pair role.", "Step 10 adds entity transition states (monolith-owned → replicated read → dual-read → service-owned → retired) as a governance model.", "Step 20 (single-writer ownership cutovers) adds automatic halt on reconciliation breach and explicit stored-procedure retirement criteria.", "Success metrics now include mobile/storefront endpoint compatibility and warehouse file-contract preservation as measurable constraints."], "regressions": ["The original proposal's explicit 'Extract cart' and 'Extract checkout' steps (19, 20) are merged into a single step 18, losing some granularity on cart-state migration and session handling.", "The original's step 22 (returns, loyalty, back-office) is split across steps 17 and 23 but the back-office migration path is less detailed than in Proposal 2's step 20 or Proposal 5's step 18."], "taken": [{"from_proposal": 2, "steps": [3], "what": "Transition states for each entity: monolith-owned, replicated read model, shadow-validated, service-owned, legacy-retired.", "why": "Adopted in step 10 as the entity transition-state model governing all data moves."}, {"from_proposal": 2, "steps": [12], "what": "Warehouse adapter that validates, deduplicates, and acknowledges files without changing the warehouse contract.", "why": "Adopted in step 13, preserving the file contract and adding shadow-comparison before traffic shift."}, {"from_proposal": 2, "steps": [19], "what": "Load-test traffic reversion to the monolith and confirm the monolith can absorb reverted load.", "why": "Adopted in step 21: 'Prove traffic reversion to the monolith and that Java 8 plus 1.2 TB Postgres can absorb reverted load.'"}, {"from_proposal": 2, "steps": [19], "what": "Formal peak-readiness sign-off from engineering, operations, commerce, finance, warehouse, and support.", "why": "Adopted in steps 21 and 22 as the go/no-go authority list."}], "rejected": [{"from_proposal": 1, "steps": [23], "what": "Full monolith decommission and reduction to under 100k lines by month 12.", "why": "Step 3 states 'Full monolith retirement is not a 12-month promise' and step 23 funds leftover work as a follow-on roadmap."}, {"from_proposal": 5, "steps": [20], "what": "Monolith codebase reduced to 0 lines in production by end of month 12.", "why": "Step 23 explicitly retains legacy where removal creates unjustified commercial risk and measures residual coupling rather than mandating zero."}]}, {"proposal": 4, "assessment": "improved", "what_changed": "The refinement added a migration charter with peak calendar (step 1), a dedicated monolith-modularisation step (9), and two explicit peak-readiness gates (steps 20, 21) that were previously generic. The pricing section is now split into discovery (step 15) and extraction behind façade (step 16), matching the archaeology-first pattern from Proposals 2, 3, and 5. The data-transition playbook (step 8) is new and adds entity transition states and automatic halt thresholds. The plan is more realistic about sequencing but still targets eight independently deployable capabilities by month 12, which is ambitious.", "improvements": ["Added step 1 (charter, governance, peak calendar) with a 50/30/20 capacity split and explicit non-negotiables.", "Added step 9 (modularize monolith) with ArchUnit tests, expand-contract rules, and a ban on new cross-module joins.", "Split pricing into discovery (step 15) and extraction (step 16), with a golden-master harness and 99.99% parity gate.", "Added step 8 (data-transition playbook) with entity transition states, reconciliation thresholds, and rehearsed rollback.", "Two explicit peak gates (steps 20, 21) with six-week blackouts, 12x load tests, and monolith-reversion validation.", "Step 11 (staging and load-test harness) is new and specifies anonymized production-scale data with provider and warehouse simulators."], "regressions": ["Step 16 (pricing extraction) depends on step 20 (pre-January peak readiness), creating a circular risk: if the January peak is in month 1, pricing extraction cannot start until after it, compressing the timeline.", "The back-office extraction (step 19) is bundled with returns, giving less attention to the 300-staff migration than Proposal 2's dedicated step 20.", "The original proposal's explicit 'Extract back-office capabilities' step with incremental screen migration is compressed into a single sub-bullet in step 19."], "taken": [{"from_proposal": 2, "steps": [3], "what": "Transition states for each entity and prohibition on distributed transactions, replaced by outbox, idempotency, and reconciliation.", "why": "Adopted in steps 3 and 8, defining monolith-owned through legacy-retired states and banning distributed transactions."}, {"from_proposal": 2, "steps": [19], "what": "Load-test traffic reversion to the monolith and confirm fallback capacity before each peak.", "why": "Adopted in steps 20 and 21 as explicit reversion tests with monolith and legacy search absorbing full load."}, {"from_proposal": 3, "steps": [1], "what": "Migration charter signed by all teams with non-negotiables and a published 12-month calendar.", "why": "Adopted as step 1, including the ban on big-bang rewrites and the requirement for a tested rollback per step."}, {"from_proposal": 3, "steps": [9], "what": "Modularise the monolith in place with compile-time walls and a ban on new cross-module joins.", "why": "Adopted as step 9, adding ArchUnit tests, branch-by-abstraction, and expand-contract schema rules."}, {"from_proposal": 3, "steps": [20], "what": "Single-writer ownership cutovers with automatic halt on reconciliation breach.", "why": "Adopted in step 8's data-transition playbook, which defines thresholds that automatically halt traffic expansion."}, {"from_proposal": 5, "steps": [14], "what": "Deep pricing archaeology with golden-master corpus, machine-readable rule catalogue, and dead-code identification.", "why": "Adopted in step 15, including the cross-functional squad, production decision traces, and signed-off rule specification."}], "rejected": [{"from_proposal": 3, "steps": [3], "what": "Honest 12-month scope: full monolith retirement is not promised; pricing and checkout may remain behind façades.", "why": "Proposal 4's success metrics commit to eight independently deployable capabilities and step 22 decommissions the monolith after 30 days of zero traffic, targeting fuller retirement than Proposal 3 accepts."}]}, {"proposal": 5, "assessment": "improved", "what_changed": "The refinement restructured the original 20 steps into 22 with clearer wave numbering, added a dedicated resilience-patterns step (9), and expanded the pricing section (steps 14–15) with a golden-master harness and dual-run comparison. The data-ownership cutover step (19) is new and adds entity transition states, automatic halt thresholds, and stored-procedure retirement criteria. The proposal retains its ambitious end-state (full monolith decommission) but now sequences it behind two peak gates and a 30-day zero-traffic observation, making it more realistic in execution if not in target.", "improvements": ["Added step 9 (inter-service communication and resilience patterns) with circuit breakers, bulkheads, fallbacks, and chaos testing.", "Expanded pricing into two steps: archaeology (14) and extraction behind dual-run (15), with a 0.01% discrepancy gate and 90-day rollback retention.", "Added step 19 (data ownership cutovers) with entity transition states, reconciliation thresholds, and stored-procedure retirement via characterization harness.", "Added step 20 (progressive traffic migration and rollback drills) with quantitative promotion criteria per stage.", "Success metrics now include inventory reconciliation accuracy ≥ 99.9%, zero oversell incidents, and back-office availability ≥ 99.9%.", "Step 1 now includes a 50/30/20 capacity split and explicit ban on big-bang rewrites and irreversible cutovers."], "regressions": ["Still commits to full monolith decommission (step 22: 'zero production requests route to the monolith for 30 consecutive days'), which is riskier than the honest-scope position of Proposals 2 and 3.", "Success metric 'Monolith codebase reduced by at least 60%' is less precise than the original's '0 lines in production' but still commits to a decommission target that may not be achievable if pricing or checkout parity is not proven.", "Step 18 bundles back-office and storefront modernisation into one step, making it the longest and most complex step in the plan with 11 sub-bullets covering two distinct audiences (300 staff and millions of customers)."], "taken": [{"from_proposal": 1, "steps": [8], "what": "Event-driven backbone with Kafka topics per bounded context and transactional outbox publishing.", "why": "Adopted in step 8, adding Debezium CDC, schema registry, and idempotent consumers on top of the outbox pattern."}, {"from_proposal": 2, "steps": [1], "what": "Reserve team capacity at 50% roadmap, 30% migration, 20% quality/operational work.", "why": "Adopted verbatim in step 1 as the capacity allocation model."}, {"from_proposal": 2, "steps": [2], "what": "Baseline: trace journeys through modules, tables, stored procedures, and external dependencies; classify all 350 tables.", "why": "Adopted in step 2, adding static-analysis tooling (jQAssistant, ArchUnit) and an extraction scorecard."}, {"from_proposal": 2, "steps": [7], "what": "Stabilise the monolith with architecture tests, expand-contract schema rules, and a ban on new cross-module joins.", "why": "Adopted in step 7, adding ArchUnit tests, code ownership, and kill switches around monolith-to-service integrations."}, {"from_proposal": 2, "steps": [12], "what": "Warehouse adapter that validates, deduplicates, and acknowledges files; shadow-compare availability before traffic shift.", "why": "Adopted in step 13, adding freshness targets, oversell tolerance, and a proof of no extra oversell before a sale."}, {"from_proposal": 2, "steps": [17], "what": "Load-test the full hybrid path at 12x plus headroom and test traffic reversion to the monolith.", "why": "Adopted in step 21, adding autoscaling validation (90-second scale-up) and chaos experiments."}, {"from_proposal": 2, "steps": [18], "what": "Progressive traffic migration through dark launch, shadow, employee cohort, country, and percentage stages with quantitative promotion criteria.", "why": "Adopted in step 20 with the same stage progression and explicit metrics per stage."}, {"from_proposal": 2, "steps": [19], "what": "Transfer data ownership one entity group at a time with reconciliation thresholds and automatic halt.", "why": "Adopted in step 19, adding stored-procedure retirement via characterization harness and expand-contract schemas."}, {"from_proposal": 3, "steps": [4], "what": "Team model: five domain teams with a shared platform pair; migration is a sprint percentage, not a freeze.", "why": "Adopted in step 1, assigning each team a bounded context and creating a platform guild of 2–3 senior engineers."}, {"from_proposal": 3, "steps": [9], "what": "Modularise the monolith with compile-time walls and a ban on new cross-module joins or stored-procedure coupling.", "why": "Adopted in step 7, adding ArchUnit tests and a ban on new features reaching into another team's tables."}, {"from_proposal": 3, "steps": [17], "what": "Pricing archaeology: capture production decision traces, build a golden-master corpus, freeze behavioural snapshots.", "why": "Adopted in step 14, adding a machine-readable rule catalogue, dead-code identification, and a signed-off rule specification."}, {"from_proposal": 4, "steps": [2], "what": "Baseline: measure normal and sale-peak throughput, latency, database load, and recovery time.", "why": "Adopted in step 2, adding Lucene rebuild duration and warehouse file lag to the baseline measurements."}, {"from_proposal": 4, "steps": [3], "what": "Define synchronous API rules, asynchronous event rules, versioning, idempotency, and error-handling conventions.", "why": "Adopted in step 3 as part of the target architecture definition."}, {"from_proposal": 4, "steps": [5], "what": "Feature-flag platform with per-user, per-country, per-percentage routing and dark-launch capability.", "why": "Adopted in step 5, adding Unleash/LaunchDarkly/Flagsmith and automated rollback on SLO breach."}], "rejected": [{"from_proposal": 2, "steps": [3], "what": "Explicit statement that full monolith retirement is not a 12-month promise; pricing and checkout may remain behind façades.", "why": "Proposal 5 commits to full monolith decommission in step 22 and targets 60% codebase reduction as a success metric."}, {"from_proposal": 3, "steps": [3], "what": "Honest 12-month scope: independently deployable services are the goal; the monolith may still delegate for pricing and checkout.", "why": "Proposal 5 targets all 350 tables owned by exactly one service and zero cross-service joins by month 12, rejecting the residual-monolith position."}]}]}
[ROUND 2]
{"round_summary": "All five proposals converged strongly toward a shared vocabulary: peak-protection windows, façade-first pricing and checkout, single-writer cutovers, and an honest year-one scope that may leave the monolith partially intact. The most ambitious agents (Proposals 2, 3) adopted explicit non-goals and conditional success criteria, while the more prescriptive ones (1, 4, 5) retained numeric targets and full decommission plans. The principal remaining divergence is whether month-12 success is defined as 'independently deployable façades with proven rollback' or as 'monolith reduced ≥ 60 % with daily deploys'.", "converging": true, "proposals": [{"proposal": 1, "assessment": "mixed", "what_changed": "The rewrite adds stronger safety language (≤5-min rollback, error-budget auto-rollback, immutable audit events) and adopts the façade-first checkout pattern visible in Proposals 2 and 3. However, it retains aggressive end-state metrics—'≥ 60 % monolith reduction', '8 + independently deployable services', 'daily deploy cadence'—that contradict the conditional, evidence-gated philosophy the other proposals adopted. The tension between 'retain legacy pricing behind façade if parity is unproven' (S16) and 'monolith reduced ≥ 60 %' (success metric) is unresolved.", "improvements": ["Explicit ≤ 5-minute rollback SLA and error-budget auto-rollback policy (S4, S22)", "Adopts façade-first checkout with monolith delegation as default (S17), matching the safer pattern from Proposals 2 and 3", "Adds immutable audit events for pricing, payments, stock, and admin actions (S4)", "Peak readiness gates (S15, S19) now include explicit game-day scenarios (provider offline, event lag, warehouse file replay)", "Warehouse adapter step (S11) now includes delayed/duplicate/malformed file testing"], "regressions": ["Retains 'monolith codebase reduced ≥ 60 %' as a hard metric, conflicting with the conditional scope language added to S16 and S23", "S10 (pricing archaeology) lacks the explicit 'dead-rule identification' (rules not fired in 24 months) that Proposal 3 added to reduce scope", "S23 still promises full decommission and 'zero production requests route to monolith for 30 days', which may be unrealistic given the conditional pricing and checkout language in S16–S17", "No explicit non-goals list; the plan still implies full monolith retirement is the default expectation"], "taken": [{"from_proposal": 2, "steps": [17, 18], "what": "Façade-first cart and checkout that initially delegates to monolith commands, with ownership transfer only after evidence gates pass.", "why": "S17 now explicitly builds a checkout façade that delegates to monolith and only moves orchestration after failure-mode analysis and 12x tests, mirroring Proposal 2 S17–S18."}, {"from_proposal": 2, "steps": [19], "what": "Single-writer data ownership cutovers as controlled state transitions with reconciliation thresholds that halt expansion.", "why": "S21 adopts the entity-by-entity cutover model with automatic halt on reconciliation breach, closely matching Proposal 2 S19."}, {"from_proposal": 3, "steps": [15], "what": "Explicit statement that if full pricing extraction is not safe in 12 months, the façade plus proven slices constitutes success.", "why": "S16 now includes 'If full engine extraction is not safe inside 12 months, the independently deployable artefact is the façade plus proven slices', directly echoing Proposal 3 S16."}, {"from_proposal": 4, "steps": [16, 21], "what": "Peak readiness gates as formal certification steps with go/no-go sign-off from engineering, ops, commerce, finance, warehouse, and support.", "why": "S15 and S19 now name the full stakeholder sign-off panel, matching Proposal 4 S20–S21."}, {"from_proposal": 5, "steps": [4, 17], "what": "Specific SLO numbers (storefront p99 < 400 ms, checkout p99 < 1.2 s) and error-budget auto-rollback policy.", "why": "S4 adopts the exact latency thresholds and automatic rollback on SLO breach from Proposal 5 S4."}], "rejected": [{"from_proposal": 3, "steps": [3], "what": "Explicit non-goals list (no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise).", "why": "Proposal 1 retains 'Monolith codebase reduced ≥ 60 %' and 'decommission monolith' as hard metrics and a final step, rejecting the explicit non-goal framing."}, {"from_proposal": 2, "steps": [3], "what": "Year-one exit scope defined as 'independently deployable façades' with transactional ownership transfer only where gates pass, explicitly accepting a smaller outcome.", "why": "Proposal 1's success metrics still demand '8+ independently deployable services' and 'daily deployment cadence', implying a more complete decomposition than Proposal 2's conditional scope."}]}, {"proposal": 2, "assessment": "improved", "what_changed": "The revision tightens the conditional-scope philosophy throughout: the year-one target is now explicitly 'independently deployable capabilities, not an unsafe promise to fully retire every monolith transaction'. Payment isolation (S15) is elevated to a standalone step before checkout migration, and the pricing step now requires business and finance sign-off per rule slice. The plan drops the separate 'peak calendar' step and folds it into governance (S1), reducing step count from 22 to 21 without losing content.", "improvements": ["Payment-provider adapters (S15) are now a standalone step with explicit in-flight rollback semantics: accepted attempts keep their idempotency key and completion path", "Pricing façade step (S10) adds machine-readable rule catalogue and business/finance sign-off on current observable behaviour before any slice moves", "Year-one exit scope (S3) is now explicit and conditional: 'Transactional command ownership transfers only when evidence gates pass'", "S8 adds explicit write-rollback semantics: previously accepted commands must complete through their original state machine, not be blindly reversed", "S21 now requires a funded follow-on roadmap for anything that correctly remained in the monolith"], "regressions": ["Removing the standalone peak-calendar step (former S4) makes the freeze-window rules slightly harder to locate; they are now embedded in S1 bullet text", "S6 (test and capacity evidence) drops the explicit mutation-testing mention that the round-1 version included for pricing and checkout paths"], "taken": [{"from_proposal": 3, "steps": [6], "what": "100% automated scenario coverage for defined price, payment, order, refund, stock-reservation, and loyalty-ledger scenarios as a gate before ownership transfer.", "why": "S6 now requires '100% scenario coverage for defined money, stock, refund, and loyalty invariants', matching Proposal 3 S6."}, {"from_proposal": 3, "steps": [17], "what": "Pricing slices receive live traffic only after ≥ 99.99% exact parity on golden-master and production-shadow cases, with every accepted difference signed by business and finance.", "why": "S16 adopts the exact parity threshold and dual sign-off requirement from Proposal 3 S16–S17."}, {"from_proposal": 4, "steps": [9], "what": "Strangler gateway step explicitly preserving server-rendered storefront and mobile API contracts without requiring a mobile release.", "why": "S9 now states 'Preserve cookies, tokens, headers, localization, currencies, error contracts, cache semantics, and mobile API versions', closely matching Proposal 4 S6."}, {"from_proposal": 4, "steps": [17], "what": "Checkout façade with durable attempt state machine, idempotency keys, and explicit compensation paths before any ownership transfer.", "why": "S17 now includes 'durable checkout-attempt state, idempotency keys, explicit compensation paths', matching Proposal 4 S17."}], "rejected": [{"from_proposal": 1, "steps": [23], "what": "Hard metric of 'monolith codebase reduced from 2 million lines to < 100k lines' and full decommission as a year-one target.", "why": "Proposal 2 explicitly states 'Retain the legacy pricing engine, order creation, and checkout command path behind compatible façades if their safety gates are not met by month 12' and S21 publishes a funded follow-on roadmap instead."}, {"from_proposal": 5, "steps": [22], "what": "Hard metric of 'monolith codebase reduced by at least 60%' as a success criterion.", "why": "Proposal 2's success metrics contain no monolith-size reduction target; the focus is on independent deployability and evidence gates."}]}, {"proposal": 3, "assessment": "improved", "what_changed": "The plan is restructured around two explicit 'seasons' aligned to the January and July peaks, making the calendar constraint operational rather than aspirational. A new unified extraction playbook (S10) eliminates per-domain improvisation. The honest-scope philosophy is strengthened with explicit non-goals (S3) and a conditional throttle ('If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only'). The step count drops from 23 to 22 while gaining clarity.", "improvements": ["New S10 codifies a single extraction playbook with quantitative promotion criteria, eliminating per-domain improvisation across five teams", "S3 adds explicit non-goals: no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise", "S3 adds a conditional throttle: if the first sale is < 16 weeks away, Season 1 shrinks to search plus warehouse adapter only", "S11 adds dead-rule identification: rules not fired in 24 months are documented but not rewritten, reducing scope", "S22 explicitly states 'Do not declare the programme done if sales protection, money integrity, or revertability was traded away'"], "regressions": ["The two-season structure makes the plan less granular for teams working on parallel workstreams; pricing archaeology (S11) and search (S12) have no explicit month numbers", "S4 merges CI/CD, flags, and platform into one step, losing the separate Kubernetes sizing detail that round-1 S6 had"], "taken": [{"from_proposal": 2, "steps": [5], "what": "Five-minute detection target for critical journey failures as an explicit operational metric.", "why": "S5 now includes 'Establish a five-minute detection target for critical journey failure', matching Proposal 2 S4."}, {"from_proposal": 2, "steps": [12], "what": "Warehouse adapter that journals, validates, deduplicates, acknowledges, retries, and replays files, with the adapter running alongside the legacy job during transition.", "why": "S14 adopts the parallel-run adapter model with reconciliation from Proposal 2 S12."}, {"from_proposal": 2, "steps": [21], "what": "Peak certification includes written sign-off from engineering, ops, commerce, finance, warehouse, and support, and game days must cover provider outage, event delay, database failover, and flag/route rollback.", "why": "S16 and S20 now list the full sign-off panel and specific game-day scenarios, matching Proposal 2 S20."}, {"from_proposal": 4, "steps": [17], "what": "Back-office migration by workflow and role, starting with read-only views and moving commands only after service ownership is proven.", "why": "S21 adopts the incremental back-office model from Proposal 4 S19, including parallel operation and direct-SQL-access removal."}], "rejected": [{"from_proposal": 1, "steps": [23], "what": "Target of reducing monolith code from 2 million lines to < 100k and decommissioning the monolith within 12 months.", "why": "S3 explicitly lists 'monolith decommission' as a non-goal, and S22 states 'Retain legacy where removal would weaken safety. Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.'"}, {"from_proposal": 5, "steps": [22], "what": "Hard metric of 'monolith codebase reduced by at least 60%' and 'remaining monolith no longer owns migrated data'.", "why": "Proposal 3's success metrics contain no monolith-size target; S22 measures residual coupling but does not set a percentage reduction goal."}]}, {"proposal": 4, "assessment": "improved", "what_changed": "The revision consolidates the original 23 steps into 21 by merging the resilience-patterns step into the event-backbone step and splitting the single peak gate into two explicit gates (S18, S20) aligned to January and July. Data-ownership cutovers (S19) are now explicitly scheduled after the second peak, reducing risk. The plan adds a back-office step (S17) that was missing in round 1. Success metrics now include '10 core capabilities independently deployable', up from 8, which is more ambitious but supported by the step structure.", "improvements": ["Two explicit peak gates (S18 for first peak, S20 for second) replace a single generic gate, with specific service lists per gate", "S19 (data ownership cutovers) is now explicitly placed after the second peak, reducing risk during sales windows", "New S17 adds incremental back-office migration with BFF, parallel operation, and role-based access, filling a gap in round 1", "S15 (cart/checkout façade) now explicitly separates deployability from ownership transfer, matching the safer pattern from Proposals 2 and 3", "Success metrics add 'each table has exactly one owning service by month 12', making data ownership measurable"], "regressions": ["Dropping the standalone inter-service communication and resilience-patterns step (round-1 S9) loses explicit circuit-breaker, bulkhead, and fallback-strategy guidance; these are now only implied in S8", "S14 (pricing extraction) depends on S18 (first peak gate), creating a circular-ish dependency: pricing shadow mode needs peak certification, but peak certification lists pricing as a service to test", "The '10 core capabilities independently deployable' metric is more aggressive than the conditional language elsewhere in the plan, creating tension"], "taken": [{"from_proposal": 2, "steps": [12], "what": "Warehouse adapter that journals, validates, deduplicates, acknowledges, retries, and replays files, with reconciliation per SKU and warehouse before traffic shift.", "why": "S12 adopts the detailed adapter validation and reconciliation model from Proposal 2 S12."}, {"from_proposal": 2, "steps": [20], "what": "Peak certification includes game days for provider outage, event delay/duplication, database failover, cache failure, and flag/gateway failure, with written sign-off from all stakeholders.", "why": "S18 and S20 now list specific game-day scenarios and the full sign-off panel, matching Proposal 2 S20."}, {"from_proposal": 3, "steps": [9], "what": "Strangler edge step explicitly preserving mobile API compatibility and stating 'no mobile release should be required for a backend cutover'.", "why": "S7 now includes 'Keep the existing storefront and mobile API contracts stable; no mobile release should be required', matching Proposal 3 S9."}, {"from_proposal": 3, "steps": [18], "what": "Order-query slices and payment-provider adapters as independently deployable capabilities before checkout orchestration changes.", "why": "S15 and S16 separate payment adapters and order query from checkout, matching Proposal 3 S18's sequencing."}, {"from_proposal": 5, "steps": [4, 5], "what": "Specific SLO numbers (storefront p99 < 400 ms, checkout p99 < 1.2 s) and error-budget auto-rollback policy.", "why": "S4 adopts the latency thresholds and error-budget policy from Proposal 5 S4."}], "rejected": [{"from_proposal": 3, "steps": [3], "what": "Explicit non-goals list including 'no monolith decommission' as a year-one promise.", "why": "Proposal 4 retains S21 'Retire obsolete paths' and includes 'Monolith codebase reduced by at least 60%' as a success metric, keeping decommission as an expected outcome."}, {"from_proposal": 2, "steps": [3], "what": "Year-one exit scope defined as façades with conditional ownership transfer, explicitly accepting that legacy pricing and checkout may remain delegated.", "why": "Proposal 4's success metric demands '10 core capabilities independently deployable' and 'each table has exactly one owning service by month 12', implying more complete decomposition."}]}, {"proposal": 5, "assessment": "mixed", "what_changed": "The plan adds three new steps: pricing archaeology (S13), order-query/returns slices (S15), and payment-provider adapters (S16), filling gaps from round 1. The second peak gate (S22) is now explicit. However, the plan retains aggressive metrics ('monolith reduced ≥ 60%', 'daily deploy per service') alongside conditional language ('façade plus proven slices is success'), creating internal tension. The step count grows to 23, the highest in the round, and some steps (S19, S20) are very long with many sub-bullets that could be split.", "improvements": ["New S13 (pricing archaeology) adds golden-master corpus with '≥ 1,000 real orders per country', dead-rule identification, and machine-readable rule catalogue", "New S15 (order query and returns slices) separates post-order value from the transactional checkout path, matching Proposals 2 and 3", "New S16 (payment adapters) isolates provider complexity before checkout changes, with explicit in-flight rollback semantics", "S22 adds explicit second-peak certification with disaster-recovery drills and post-sale lessons", "S14 adds 'If full engine extraction is not safe inside 12 months, the façade plus proven slices is success, not failure'"], "regressions": ["Success metrics retain 'monolith codebase reduced by at least 60%', conflicting with the conditional pricing and checkout language in S14 and S17", "S19 (back-office and storefront) is overloaded: it covers back-office BFF, storefront refactor, mobile API migration, CDN caching, and E2E validation in one step", "The plan has 23 steps with some very long sub-bullet lists (S1, S13, S19, S20), making it harder for five teams to parse and assign ownership", "S23 (decommission) still promises 'zero production requests route to monolith for 30 consecutive days', which conflicts with the conditional scope language"], "taken": [{"from_proposal": 2, "steps": [12], "what": "Warehouse adapter with journal, validate, deduplicate, acknowledge, and replay capabilities, running alongside the legacy job during transition.", "why": "S11 now includes the full adapter validation sequence and parallel-run reconciliation from Proposal 2 S12."}, {"from_proposal": 2, "steps": [16], "what": "Pricing slices require ≥ 99.99% exact parity on golden-master and production-shadow cases before live traffic, with business and finance sign-off per slice.", "why": "S14 adopts the exact parity threshold, two-week shadow window, and per-slice sign-off from Proposal 2 S16."}, {"from_proposal": 3, "steps": [15], "what": "Customer extraction starts with replicated profile and loyalty-balance reads; loyalty is modelled as an auditable ledger with balance inquiry before accrual or redemption.", "why": "S12 now explicitly sequences loyalty as 'balance inquiry before accrual or redemption, using a ledger model', matching Proposal 3 S15."}, {"from_proposal": 3, "steps": [17], "what": "Cart and checkout façades initially delegate to legacy commands; ownership transfer only after failure-mode analysis covers payment timeout, duplicate callback, stock loss, order-write failure, and customer retry.", "why": "S17 now includes the explicit failure-mode checklist and façade-first pattern from Proposal 3 S19."}], "rejected": [{"from_proposal": 3, "steps": [3], "what": "Explicit non-goals list: no big-bang pricing rewrite, no physical DB split, no Java 8 upgrade prerequisite, no forced mobile release, no monolith decommission as a year-one promise.", "why": "Proposal 5 retains 'Monolith codebase reduced by at least 60%' and S23 decommission as hard targets, rejecting the non-goal framing."}, {"from_proposal": 2, "steps": [3], "what": "Year-one exit scope defined as independently deployable façades with conditional ownership transfer, explicitly accepting that legacy pricing and checkout may remain delegated.", "why": "Proposal 5's success metrics include 'monolith codebase reduced by at least 60%' and 'remaining monolith no longer owns migrated data', implying more complete decomposition than Proposal 2's conditional scope."}]}]}
[ROUND 3]
{"round_summary": "All five proposals converged strongly on a shared vocabulary and structure: an honest year-one scope that accepts façades as valid outcomes, a seasonal cadence gated by two formal peak-certification steps, and a single extraction playbook. The main remaining differentiator is conservatism about timing and write-ownership transfer: Proposals 2 and 3 remain the most cautious, Proposal 1 adds explicit programme re-forecasting, and Proposals 4 and 5 lean toward a fuller 23-step programme with more ambitious decommission targets.", "converging": true, "proposals": [{"proposal": 1, "assessment": "mixed", "what_changed": "Proposal 1 adds genuinely new programme-management ideas (decision trees for migration delay, a Month-3 strategic review, a 4-month warehouse-adapter burn-in gate) and restructures the calendar around explicit month labels. However, it removes the dedicated progressive traffic migration step from its previous version and the standalone peak readiness gate 1, folding traffic management and certification into other steps. The result is richer in programme control but thinner in operational execution detail.", "improvements": ["Step 15 (Post-peak 1 strategic review) introduces a formal re-forecast mechanism if migration slips exceed 20% of planned capacity, absent from all other proposals", "Step 11 requires the warehouse adapter to operate for at least 4 months before inventory read extraction, adding a concrete reliability gate", "Success metrics add a post-peak reforecast threshold and warehouse-adapter stability duration, making programme adaptability measurable", "Step 1 explicitly documents decision trees for migration delay scenarios (pricing archaeology taking 4 months instead of 2)"], "regressions": ["Removed the standalone progressive traffic migration step (previous S22) that provided a detailed stage-by-stage traffic playbook with quantitative promotion criteria", "Removed peak readiness gate 1 as a distinct step; the January peak is handled only through the strategic review in S15, losing explicit load-test and reversion-rehearsal detail for the first peak", "Removed the standalone storefront BFF refactoring detail (CDN, edge caching, mobile backward-compatibility enforcement) that was in previous S20", "Success metric deployment frequency weakened from 'at least daily per service' to 'at least weekly per service'"], "taken": [{"from_proposal": 3, "steps": [10], "what": "The explicit extraction playbook codified as a single mandatory process for all teams, including the rule that write rollback differs from route rollback.", "why": "Proposal 1 embeds the same staged extraction pattern (seam, shadow, canary, observation, optional write transfer) across steps 12-14 and 16-20, and adds the write-rollback distinction in step 23."}, {"from_proposal": 2, "steps": [3], "what": "The explicit non-goals list and the principle that a façade delegating to the monolith is an acceptable year-one outcome.", "why": "Proposal 1 adds a success metric stating the pricing façade plus proven slices is the accepted artefact if full extraction is unsafe, mirroring Proposal 2's conditional year-one scope."}, {"from_proposal": 5, "steps": [2], "what": "The extraction scorecard using coupling, change rate, data-ownership feasibility, business risk, and rollback quality as scoring dimensions.", "why": "Proposal 1 step 2 reproduces the same scorecard dimensions verbatim."}], "rejected": [{"from_proposal": 3, "steps": [3], "what": "The explicit rule to keep the monolith on Java 8 and start new services on a current LTS, with Java 8 upgrade listed as a non-goal.", "why": "Proposal 1 does not mention Java 8 at all; it neither prohibits nor mandates the upgrade, leaving the technology choice unspecified."}, {"from_proposal": 2, "steps": [9], "what": "The principle that a September start leaves too little time before January for major domain extraction, limiting pre-January scope to operational foundations.", "why": "Proposal 1 schedules Wave 1 extractions (search, catalogue, inventory, customer) in Months 2-4 which could overlap January, and does not explicitly constrain pre-January scope."}]}, {"proposal": 2, "assessment": "improved", "what_changed": "Proposal 2 consolidates 21 steps into 18 by merging related activities (instrumentation with testing, paved road with monolith modularisation, pricing slices with cart/checkout façades). It adds a concrete September-to-August calendar example and sharpens command-rollback semantics. The compression improves readability without losing substantive content, and the January gate (S9) is now more explicit about limited pre-January scope.", "improvements": ["Step 9 explicitly acknowledges a September start leaves limited pre-January time and restricts first-season scope to operational foundations and rehearsed read improvements", "Step 6 adds explicit in-flight command semantics: accepted commands remain on their original compatible state machine; only new commands may be routed back", "Steps 4 and 5 merge observability, testing, paved road, and monolith modularisation into two dense steps, reducing coordination overhead while preserving all content", "Success metrics add explicit inventory-oversell baseline comparison and mobile/storefront contract compatibility as standalone metrics"], "regressions": ["Merging steps reduces traceability: the previous separate 'Create test, contract, and capacity evidence' step (S6) is now embedded in S4, making it harder to assign ownership and track completion", "The previous explicit 'Do not make Java modernization or repository splitting a prerequisite' guidance is compressed into a single clause in S5, losing emphasis", "Previous step 14 (order views, notifications, bounded returns) is merged into S13 with less detail on freshness labels and cross-border return validation"], "taken": [{"from_proposal": 3, "steps": [1, 3], "what": "The explicit non-goals list (big-bang pricing rewrite, physical database split, Java 8 upgrade, forced mobile release, warehouse-contract change, monolith decommission) and the conditional throttle if the first sale is fewer than 16 weeks away.", "why": "Proposal 2 step 3 includes a conditional scope statement and step 9 restricts pre-January activity, reflecting the same protective throttle logic."}, {"from_proposal": 5, "steps": [2], "what": "The extraction scorecard dimensions: coupling, business risk, change rate, data ownership feasibility, testability, and rollback quality.", "why": "Proposal 2 step 2 reproduces the same scorecard criteria."}], "rejected": [{"from_proposal": 1, "steps": [15], "what": "A formal post-peak strategic review with capacity re-forecasting if migration slips exceed 20%.", "why": "Proposal 2 has no equivalent re-forecast mechanism; it handles slippage implicitly through conditional gates but does not define a formal review checkpoint or slip threshold."}, {"from_proposal": 4, "steps": [23], "what": "The target of monolith codebase reduction by at least 60% and the remaining monolith no longer serving customer traffic for migrated domains.", "why": "Proposal 2 explicitly avoids decommission targets and states the correct outcome is a safe, operable service estate even if critical legacy command logic remains; no percentage reduction metric appears."}]}, {"proposal": 3, "assessment": "improved", "what_changed": "Proposal 3 makes two structural improvements: it merges the separate search and catalogue extraction steps into a single Season 1 step (S12), and it consolidates the final back-office, write-ownership, and steady-state handover into one closing step (S20). It adds a Postgres connection budget to the paved-road step and PCI scope protection to metrics. The result is tighter at 20 steps without losing substance.", "improvements": ["Step 5 adds an explicit Postgres connection budget for the hybrid estate, addressing a concrete capacity risk when services share the 1.2 TB database", "Success metrics add 'PCI scope is not expanded' as an explicit constraint, preventing scope creep during payment-adapter extraction", "Step 12 merges search and catalogue into one extraction step, reducing coordination overhead and acknowledging they share the same playbook and fallback path", "Step 15 adds 'Staff hypercare from the existing five teams. Do not assume extra people appear for sale week,' a realistic staffing constraint absent from other proposals"], "regressions": ["Merging search and catalogue into one step (S12) loses the previous version's explicit sequencing where search was extracted first to validate the platform before catalogue; now both are treated simultaneously", "The final step (S20) combines back-office migration, write-ownership transfer, and steady-state governance, making it very dense and harder to schedule within the remaining timeline", "Removed the previous explicit 'If the first sale is fewer than 16 weeks away, throttle Season 1 to search plus the warehouse adapter only' from the charter step; it remains in S1 but is less prominent"], "taken": [{"from_proposal": 2, "steps": [8], "what": "The explicit write-rollback semantics: routing a command back is insufficient; previously accepted commands must complete through their original compatible state machine or enter an auditable exception workflow.", "why": "Proposal 3 step 10 (extraction playbook) now includes the rule 'Write rollback is not the same as route rollback. Accepted payments, orders, reservations, and refunds complete on their original compatible path.'"}, {"from_proposal": 5, "steps": [2], "what": "The extraction scorecard dimensions including coupling, change rate, data-ownership feasibility, business risk, operational maturity, and rollback quality.", "why": "Proposal 3 step 2 mentions a coupling heat map and extraction scorecard, consistent with the scoring approach."}], "rejected": [{"from_proposal": 1, "steps": [23], "what": "The target of monolith codebase reduction by at least 60% and decommission of monolith infrastructure.", "why": "Proposal 3 explicitly lists monolith decommission as a non-goal in step 3 and step 20 states 'Year-end success is a smaller, honest hybrid, not a dark monolith at any cost.'"}, {"from_proposal": 4, "steps": [19], "what": "Scheduling data ownership transfer only after the second peak (post-July), with a dedicated step for entity-by-entity write cutovers.", "why": "Proposal 3 handles write ownership in the final consolidated step (S20) with a conditional 'only after their evidence gates' approach, not as a dedicated post-second-peak step."}]}, {"proposal": 4, "assessment": "mixed", "what_changed": "Proposal 4 restructures from 21 to 23 steps, adding dedicated steps for strangler gateway (S6), monolith modularisation (S7), and payment adapters (S17). It adopts the honest year-one scope and façade-as-success language from other proposals. However, it retains the aggressive success metric of 'at least 10 core capabilities independently deployable' and 'monolith codebase reduced by at least 60%', which conflict with the conservative tone adopted by most other proposals. The step numbering introduces a dependency anomaly where S19 (data ownership) depends on S20 (peak gate 2).", "improvements": ["Step 6 (strangler gateway) is now a dedicated step with explicit traffic-mirroring rules, rollback rehearsal, and latency-overhead measurement, previously embedded in other steps", "Step 17 (payment adapters) is separated from checkout, matching the consensus that provider isolation precedes orchestration changes", "Step 3 now includes explicit entity transition states and the honest year-one exit scope, adopting the conditional-ownership language", "Success metrics add back-office availability and zero forced logouts as explicit constraints"], "regressions": ["Step 19 (data ownership transfer) depends on step 20 (peak readiness gate 2), creating a circular-feeling dependency where ownership transfer is scheduled after the second peak but the peak gate depends on services being live", "The success metric 'at least 10 core capabilities independently deployable' and 'monolith codebase reduced by at least 60%' are more aggressive than the honest scope stated in step 3, creating internal inconsistency", "Removed the previous version's explicit 'Execute progressive traffic migration with measured increments' step; traffic management is now distributed across extraction steps without a unified playbook", "Step 21 (back-office and storefront) combines two substantial workstreams that were previously more clearly separated"], "taken": [{"from_proposal": 1, "steps": [9, 11, 12, 13, 14, 15], "what": "The wave-based extraction structure with search/catalogue first, then customer/inventory, then pricing, then checkout, with explicit shadow-comparison and traffic-shifting percentages.", "why": "Proposal 4 steps 12-14 mirror Proposal 1's wave structure and include the same 1% → 10% → 50% → 100% progression and shadow-comparison periods."}, {"from_proposal": 3, "steps": [3], "what": "The explicit non-goals list and the principle that the façade is the independently deployable artefact if full extraction is unsafe.", "why": "Proposal 4 step 3 and success metrics adopt the conditional language: 'otherwise the façade remains the independently deployable artefact.'"}, {"from_proposal": 5, "steps": [3, 5], "what": "The explicit year-one exit scope listing independently deployable search, catalogue reads, inventory availability, customer/profile slices, order-query, payment adapters, pricing façade, and cart/checkout façades.", "why": "Proposal 4 step 3 reproduces this scope list and step 5 includes the same paved-road components."}], "rejected": [{"from_proposal": 3, "steps": [1], "what": "The explicit rule to keep the monolith on Java 8 and start new services on a current LTS, with Java 8 upgrade as a non-goal.", "why": "Proposal 4 does not mention Java 8 or LTS anywhere; it leaves the technology choice unspecified."}, {"from_proposal": 2, "steps": [9], "what": "The principle that a September start limits pre-January scope to operational foundations only, deferring unproven service routes.", "why": "Proposal 4 schedules Wave 1 extractions (S12-S14) without explicitly gating them against the first peak, and peak gate 1 (S15) comes after extraction rather than constraining it."}]}, {"proposal": 5, "assessment": "improved", "what_changed": "Proposal 5 undergoes the most substantial restructuring, moving from a grok-4.6-influenced seasonal structure to a comprehensive 23-step programme that integrates ideas from all four other proposals. It adds a dedicated extraction playbook step (S10), explicit static-analysis tooling (jQAssistant, ArchUnit), mutation testing, and a Postgres connection budget. The result is the most detailed and cross-referenced proposal, though at the cost of length.", "improvements": ["Step 10 codifies a single extraction playbook with quantitative promotion criteria, automatic stop on reconciliation breach, and explicit write-rollback semantics, adopted from Proposal 3", "Step 2 adds specific static-analysis tools (jQAssistant, ArchUnit, custom SQL scripts) and identifies tables with more than two writers as highest-risk", "Step 6 adds mutation testing to identify highest-risk untested paths, prioritising checkout, payment, and inventory", "Step 8 specifies gateway latency overhead must be less than 50 ms p99, a concrete measurable constraint", "Step 1 adds a conditional throttle: if the first sale is fewer than 14 weeks from programme start, restrict the first wave to search, warehouse adapter, and observability only"], "regressions": ["At 23 steps with dense bullet lists, the proposal is the longest and hardest to schedule; some steps (S22, S23) combine multiple substantial workstreams", "The success metric 'monolith codebase reduced by at least 60%' conflicts with the honest year-one scope stated in step 3, which explicitly lists monolith decommission as a non-goal", "Step 11 (pricing archaeology) depends on steps 2 and 7, but step 7 (monolith modularisation) depends on steps 3, 5, and 6, creating a longer critical path before pricing work can start compared to Proposal 3 where pricing starts at step 11 depending only on steps 2, 6, 7", "The previous version's explicit 'Keep five domain teams and a thin paved-road platform' step is compressed into a clause in S1, losing emphasis on team stability"], "taken": [{"from_proposal": 3, "steps": [7, 9, 10, 11, 12, 13, 14, 15, 17, 20], "what": "The overall seasonal structure, extraction playbook, pricing-façade-first approach, warehouse adapter separation, customer-slice extraction, and the principle that the façade is success if full extraction is unsafe.", "why": "Proposal 5 mirrors Proposal 3's structure closely: S10 is the playbook, S11 is pricing archaeology, S12-S15 are Season 1 extractions, S17 is pricing dual-run, S20 is checkout façade. The language and sequencing are nearly identical."}, {"from_proposal": 2, "steps": [4, 15, 14, 17, 19], "what": "The merged observability-and-testing step, the explicit write-rollback semantics, the payment-adapter isolation pattern, and the back-office-by-workflow migration.", "why": "Proposal 5 S4 combines instrumentation and safety net; S9 includes write-rollback semantics; S18 isolates payment adapters; S22 migrates back-office by workflow."}, {"from_proposal": 1, "steps": [2, 9, 15], "what": "The baseline step structure with coupling heat map and extraction scorecard, the testing step with mutation testing, and the warehouse adapter as a prerequisite for inventory extraction.", "why": "Proposal 5 S2 includes the scorecard; S6 includes mutation testing; S14 requires the warehouse adapter before inventory reads."}], "rejected": [{"from_proposal": 1, "steps": [15], "what": "A formal post-peak strategic review with a 20% slip threshold triggering programme re-forecast.", "why": "Proposal 5 has no equivalent re-forecast mechanism; it handles slippage through conditional gates but does not define a formal review checkpoint or quantitative slip threshold."}, {"from_proposal": 4, "steps": [23], "what": "The aggressive target of monolith codebase reduction by at least 60% as a hard success metric.", "why": "Proposal 5 includes this metric but simultaneously lists monolith decommission as a non-goal in step 3, creating an internal tension it does not resolve; the 60% figure appears inherited rather than deliberately chosen."}]}]}
[ROUND 4]
{"round_summary": "All five proposals converged further on the same structural spine: charter, baseline, observability, platform, gateway, events, pricing archaeology, two peak gates, and a closing consolidation step. The most notable change is the formal extraction playbook (adopted from Proposals 3 and 5) now appearing explicitly in Proposal 2, while most agents refined wording, tightened dependencies, and added operational details such as Postgres connection budgets and SSR cache handling. Proposals are now very close in substance; the main remaining differentiators are granularity (23 steps vs. 20), the explicitness of the reforecast checkpoint, and how teams are mapped to deployable units.", "converging": true, "proposals": [{"proposal": 1, "assessment": "improved", "what_changed": "Proposal 1 restructured from 23 to 23 steps but reorganised waves and added a post-peak-1 reforecast checkpoint (S16) that was absent in its round-3 version. It adopted the explicit extraction-playbook concept from Proposals 3 and 5, tightened success metrics with latency thresholds and deployment-frequency targets, and merged pricing dual-run with payment isolation into a single wave step for tighter sequencing. The rewrite also adds a gateway latency overhead cap (<50 ms p99) and a monolith-codebase-reduction metric (≥60%), both new measurable commitments.", "improvements": ["Added a dedicated post-peak-1 reforecast step (S16) with a >20% slippage trigger, borrowing the adaptive-roadmap idea from Proposal 3's S17.", "Added explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms peak-latency targets and a ≥60% monolith-codebase-reduction metric, making success more measurable.", "Merged pricing dual-run and payment isolation into a single wave step (S17) with clear sequencing and dependency on the peak gate, reducing inter-step ambiguity.", "Added gateway latency overhead cap (<50 ms p99) in S8, a concrete operational guardrail absent in the round-3 version.", "Added mutation-testing guidance in S6 to prioritise highest-risk untested paths."], "regressions": ["Removed the explicit 'warehouse adapter must prove stability for ≥4 months before inventory extraction' gate as a standalone metric; it is now embedded in S11 prose but no longer a numbered success criterion.", "Dropped the explicit 'Post-peak strategic review formally reforecasts if migration slips exceed 20%' success-metric line that was present in the round-3 version's metrics list; the trigger now lives only in S16 body text."], "taken": [{"from_proposal": 3, "steps": [17], "what": "Post-peak reforecast step that compares planned vs. actual progress and can shrink later waves.", "why": "Adopted as S16 with a >20% slippage threshold and explicit decisions on façade delegation, mirroring the grok proposal's adaptive-roadmap checkpoint."}, {"from_proposal": 5, "steps": [10], "what": "Codified extraction playbook with quantitative promotion gates and automatic stop on SLO or reconciliation breach.", "why": "Integrated into S12–S14 wave steps as the standard canary progression (1%→10%→50%→100%) with instant route rollback, matching the qwen playbook structure."}, {"from_proposal": 4, "steps": [15, 19, 20], "what": "Peak readiness gates with explicit game-day scenarios and written go/no-go sign-off.", "why": "Adopted in S15 and S19 with the same freeze, load-test, reversion, and sign-off structure, adding incident-command rehearsals."}, {"from_proposal": 5, "steps": [8], "what": "Gateway p99 overhead cap of <50 ms as a measurable deployment criterion.", "why": "Added to S8 as a hard threshold before any endpoint migration, matching the qwen proposal's gateway step."}], "rejected": []}, {"proposal": 2, "assessment": "improved", "what_changed": "Proposal 2 restructured from 18 to 20 steps, adding a dedicated extraction playbook (S9), a separate warehouse-adapter step (S11), and splitting the first-sale gate from the second more cleanly. It also added an explicit 'executable safety net' step (S6) with a 15-minute regression-suite target and a command-rollback semantics definition in S7. The rewrite is tighter on in-flight financial-command treatment and adds a PostgreSQL connection-budget reservation for full monolith fallback in S5.", "improvements": ["Added a mandatory extraction and cutover playbook (S9) with a cutover dossier requirement, quantitative gates, and explicit statement that service deployment can succeed without write ownership.", "Added explicit command-rollback semantics in S7: accepted commands stay on their original state machine; only new commands route back.", "Added PostgreSQL connection and CPU capacity reservation for full monolith fallback in S5, a concrete capacity guardrail.", "Added a 15-minute critical-regression-suite target in S6, making test-cycle time measurable.", "Split warehouse adapter (S11) from inventory availability reads (S14) for clearer sequencing and a two-cycle stability proof before serving reads."], "regressions": ["Removed the explicit 'monolith codebase reduced ≥60%' success metric that appeared in the round-3 version's metrics list.", "Removed the explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms latency targets from the success-metrics block; they now appear only inside SLO definitions in S4."], "taken": [{"from_proposal": 3, "steps": [10], "what": "One extraction playbook with quantitative promotion criteria, automatic stop on breach, and explicit write-vs-route rollback distinction.", "why": "Adopted as S9 with a cutover dossier, the same stage sequence, and the statement that deployment can succeed without ownership transfer."}, {"from_proposal": 5, "steps": [10], "what": "Playbook requirement that stored procedures leave only when the characterisation harness has an equivalent in service code.", "why": "Included verbatim in S9 as a gate for procedure retirement."}, {"from_proposal": 4, "steps": [15], "what": "Peak readiness gate with explicit game-day scenarios including CDC lag, flag rollback, and warehouse file delay.", "why": "Adopted in S12 with the same scenario list and written go/no-go structure."}, {"from_proposal": 5, "steps": [22], "what": "Back-office migration by workflow with 30-day parallel run and one-click fallback.", "why": "Adopted in S18 with the same 30-day stability criterion, training, and floor-support language."}], "rejected": []}, {"proposal": 3, "assessment": "improved", "what_changed": "Proposal 3 restructured from 20 to 22 steps, splitting the warehouse adapter from inventory reads (S12, S15), adding a dedicated reforecast step (S17), and merging order-query with cart/checkout façades into a single step (S19). It added a Postgres connection-budget metric, an explicit ban on new CDC load during protection windows, and a five-team operability constraint on the number of independently deployable units. The rewrite is more operationally grounded, explicitly staffing hypercare from existing teams and banning assumptions about extra headcount.", "improvements": ["Added explicit five-team operability constraint: independently deployable unit count must not exceed what five teams can operate and on-call (S1, S3, success metrics).", "Added Postgres connection budget as a success metric and a ban on new CDC or non-essential consumers during protection windows (S5, S13).", "Added a dedicated reforecast step (S17) with a >30% capacity or <80% feature-throughput trigger to shrink Season 2.", "Split warehouse adapter (S12) from inventory availability reads (S15) with an explicit two-cycle stability proof.", "Added SSR cache correctness to gateway testing (S8), addressing the server-rendered storefront specifically.", "Added edge caching for catalogue and search in S14 to protect origin during 12x peaks."], "regressions": ["Removed the explicit '≥1,000 real orders per country' golden-master corpus size from S11; it now says 'at least 1,000 real orders per country' but only in the pricing step, not as a success metric.", "Removed the explicit 'warehouse adapter proves stability for ≥4 months' gate; replaced with 'two complete inventory cycles at peak-like load' in S12, which is less specific in calendar time."], "taken": [{"from_proposal": 1, "steps": [11], "what": "Warehouse adapter must prove stability for a defined period before inventory read extraction.", "why": "Adapted as 'two complete inventory cycles at peak-like load' in S12, a shorter but operationally equivalent stability gate."}, {"from_proposal": 2, "steps": [19], "what": "Back-office migration by workflow with role-based access, segregation of duties, and 30-day parallel run.", "why": "Adopted in S21 with the same 30-day criterion, training, and one-click fallback language."}, {"from_proposal": 4, "steps": [14], "what": "Customer extraction with canonical identity, session compatibility, consent, and loyalty-balance reads before writes.", "why": "Adopted in S16 with the same slice sequence and no-forced-logout constraint."}, {"from_proposal": 5, "steps": [17], "what": "Pricing dual-run with 99.99% parity over two full weeks including a weekend, per-slice route-back, and façade-as-success fallback.", "why": "Adopted in S18 with the same parity threshold, sign-off requirement, and explicit statement that the façade plus proven slices is success."}], "rejected": []}, {"proposal": 4, "assessment": "improved", "what_changed": "Proposal 4 restructured from 23 to 23 steps but reorganised waves, adding a dedicated order-query step (S18) and splitting pricing dual-run from payment isolation into separate steps (S16, S17). It tightened the charter step with operations veto language, added a gateway overhead cap, and made the warehouse adapter stability gate explicit (≥4 months). The rewrite also adds a 'raise regression coverage on touched code to at least 60%' threshold in S7, a new quantitative gate for monolith preparation.", "improvements": ["Added operations veto on search, stock, checkout, and payments in S1, making the rollback authority explicit at charter level.", "Added gateway p99 overhead <50 ms as a measurable gate in S6 before any endpoint migration.", "Added explicit '≥4 months adapter stability' gate in S11 before inventory read extraction, the most specific calendar commitment across all proposals.", "Added 'raise regression coverage on touched code to at least 60%' in S7, a new quantitative monolith-preparation gate.", "Split pricing dual-run (S16) from payment isolation (S17) for clearer dependency management and separate sign-off gates."], "regressions": ["Removed the explicit 'monolith codebase reduced ≥60%' success metric present in the round-3 version.", "Removed the explicit p99 checkout ≤1.2 s and p95 storefront ≤400 ms latency targets from the success-metrics block; they appear only in SLO definitions in S4.", "Removed the post-peak-1 reforecast step that was present in the round-3 version (S15); no adaptive checkpoint exists between the two peak gates."], "taken": [{"from_proposal": 1, "steps": [3, 4, 5], "what": "Target architecture, observability, and delivery platform structured as three consecutive foundation steps with the same dependency chain.", "why": "Adopted as S3, S4, S5 with nearly identical content and dependency ordering, matching the claude-haiku foundation sequence."}, {"from_proposal": 2, "steps": [1], "what": "Charter step with operations authority to stop a rollout and named rollback authority per domain.", "why": "Adopted in S1 with the same operations-veto and rollback-authority language."}, {"from_proposal": 5, "steps": [17, 19], "what": "Pricing dual-run with 99.99% parity, per-slice route-back, and legacy evaluator retained through next sale; order-query with 60-day dual-run window.", "why": "Adopted in S16 and S18 with the same parity threshold, sign-off structure, and 60-day reconciliation window."}], "rejected": [{"from_proposal": 3, "steps": [17], "what": "Dedicated post-peak-1 reforecast step that can shrink Season 2 scope based on evidence.", "why": "Proposal 4 has no equivalent reforecast checkpoint between the two peak gates; it proceeds linearly from gate 1 (S15) through wave 2 without an explicit decision point."}]}, {"proposal": 5, "assessment": "unchanged", "what_changed": "Proposal 5 is essentially identical to its round-3 version. The tool reports 23 steps kept, 0 added, 0 removed. Minor wording adjustments appear in S1 (added 'operations/SRE lead' title, added 'daily migration dependency board') and S2 (added 'connection usage' to baseline metrics), but no structural, sequencing, or metric changes occurred. The proposal was already the most detailed in round 3 and the agent made no substantive revision in response to peer proposals.", "improvements": ["Minor: added 'connection usage' to baseline metrics in S2, making Postgres connection monitoring explicit from the start.", "Minor: added 'operations/SRE lead' title in S1, clarifying the operational accountability role."], "regressions": [], "taken": [], "rejected": []}]}
[FINAL]
{"summary": "All five final-round proposals have converged on the same architecture: a strangler gateway, event backbone with outbox/CDC, pricing archaeology behind a façade, two explicit peak-readiness gates, a unified extraction playbook, and an honest year-one scope that accepts independently deployable façades as success even when write ownership stays in the monolith. The differentiation that remains is granularity (20–23 steps), the sharpness of reforecast mechanisms, explicit five-team operability constraints, and a few unique operational details like Postgres connection budgets, SSR cache handling, and command-rollback semantics.", "assessments": [{"proposal": 1, "fitness": "strong", "strengths": ["Step 16 (post-peak-1 reforecast) is unique among the five and genuinely valuable: it forces a go/no-go on Season 2 scope based on observed velocity, pricing archaeology progress, and warehouse adapter reliability.", "Step 11 mandates a ≥4-month warehouse-adapter burn-in before extracting inventory reads, the longest and most conservative stability gate in the round.", "Success metrics explicitly include a gateway p99 overhead cap (<50 ms) and a monolith-codebase-reduction metric (≥60%) that anchors the year-one scope.", "Step 9 defines write-rollback semantics clearly: accepted payments and orders complete on their original state machine or enter an audited exception workflow, not just a route flip.", "Step 17 combines pricing dual-run and payment isolation into one wave, reducing sequencing gaps between the two most money-sensitive extractions."], "weaknesses": ["The ≥60% monolith-reduction metric in the success criteria contradicts the conditional-scope philosophy adopted in steps 3, 17, and 23; if pricing stays behind a façade, 60% is unreachable.", "Step 20 (cart/checkout façades, months 8–11) leaves only one month before the year-end consolidation in step 23, compressing the riskiest orchestration work into a tight window.", "No explicit five-team operability constraint on the number of independently deployable units; the plan lists ~10 capabilities without checking whether five teams of eight can on-call them all.", "Step 12 (Wave 1) depends on step 11 (warehouse adapter), which itself requires ≥4 months of burn-in; if the programme starts in September, Wave 1 cannot begin before January, colliding with the peak.", "Missing an explicit post-sale lessons-learned freeze step; step 23 mentions publishing a follow-on roadmap but does not mandate comparing actuals to forecasts after the second sale."]}, {"proposal": 2, "fitness": "strong", "strengths": ["The command-rollback semantics in step 7 are the most precise in the round: 'already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.'", "Step 9 (mandatory extraction playbook) is a standalone step with quantitative promotion gates, a cutover dossier template, and an explicit rule that 'service deployment can succeed without service write ownership', which is the correct year-one framing.", "Step 12 (first-sale gate) explicitly handles the case where the programme starts near a sale: 'production scope is restricted to foundations and only fully proven low-risk reads.'", "Step 5 reserves PostgreSQL connection and CPU capacity for full monolith fallback, a concrete operational detail the other proposals mention less precisely.", "Step 16 (pricing slices and cart/checkout façades) explicitly requires finance and merchandising sign-off per rule slice before live routing, and separates cart-write ownership from checkout-orchestration transfer with distinct evidence gates."], "weaknesses": ["At 20 steps, the plan is the shortest; some operational detail (e.g., Postgres connection budget, SSR cache handling) is folded into broader steps and could be missed by an executing team.", "No explicit reforecast step after the first peak; step 17 (second-sale gate) does not include a formal scope adjustment mechanism if Season 1 overran.", "Step 14 combines inventory availability reads and customer read slices into one step, which conflates two different risk profiles (stock accuracy vs. GDPR/session continuity).", "The plan does not name a concrete tool or technology for the event backbone, contract testing, or search replacement, which could slow the platform team's initial decisions.", "Step 19 (write ownership transfer) is placed after the second peak but before the closing consolidation; if the second peak falls in late July, only ~4 months remain for ownership transfers and step 20, which is tight."]}, {"proposal": 3, "fitness": "strong", "strengths": ["Step 1 explicitly constrains the number of independently deployable units to what five teams of eight can operate and on-call, and bans assumptions about extra headcount. No other proposal does this as clearly.", "Step 1 includes a conditional throttle: 'If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.' This is the most realistic calendar-aware guard.", "Step 5 bans new CDC, extra connection pools, and non-essential consumers from going live on the primary Postgres during a protection window, a concrete operational safeguard absent from other proposals.", "Step 17 (reforecast after first peak) is explicit and ties scope reduction to measurable triggers: 'If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.'", "Step 8 addresses SSR cache correctness explicitly ('Test cache bypass, session continuity, SSR cache correctness'), which matters for a server-rendered storefront.", "The plan explicitly states that the 1.2 TB PostgreSQL database is not physically split in year one, removing an entire class of risk."], "weaknesses": ["At 22 steps the plan is dense; steps 19 (order-query + cart/checkout façades) and 21 (back-office + write ownership) each combine two significant workstreams, which could obscure ownership.", "The plan does not include a concrete month-by-month calendar example; it references 'Season 1' and 'Season 2' but does not anchor them to specific months, making it harder to verify feasibility against the January/July peaks.", "Step 12 (warehouse adapter) does not specify a minimum burn-in duration (unlike Proposal 1's ≥4 months), leaving the stability gate somewhat open-ended.", "No explicit mutation-testing recommendation; step 6 mentions characterisation and contract tests but not mutation testing to find untested paths.", "The closing step 22 ('Hand over a durable hybrid') is strong but does not explicitly mandate a post-programme review comparing actuals to forecasts, delivery lead time, and cost."]}, {"proposal": 4, "fitness": "strong", "strengths": ["The 23-step structure is the most granular in the round, with separate steps for search (S12), inventory reads (S13), customer (S14), pricing dual-run (S16), payment adapters (S17), order query (S18), and cart/checkout façades (S19), making ownership assignment cleaner.", "Step 7 (monolith modularisation) includes a quantitative gate: 'Raise regression coverage on touched code to at least 60% before extraction.'", "Step 11 requires the warehouse adapter to prove stability for ≥4 months before inventory read extraction, matching Proposal 1's conservatism.", "Step 9 (testing) explicitly names Pact/Spring Cloud Contract and includes mutation testing, giving the platform team concrete tooling guidance.", "Step 15 (first peak gate) and Step 20 (second peak gate) are symmetric and detailed, with identical freeze, load-test, game-day, and sign-off structures."], "weaknesses": ["The plan lacks an explicit reforecast step after the first peak; there is no mechanism to adjust Season 2 scope if Season 1 overran, unlike Proposals 1 and 3.", "No five-team operability constraint; the plan lists ~10 independently deployable capabilities without checking whether five teams can staff on-call for all of them.", "Step 22 (write ownership transfer) depends on steps 8, 12–19, 21, creating a very wide dependency fan that could become a scheduling bottleneck.", "The plan does not address SSR cache correctness or the specific challenge of routing server-rendered pages through a gateway, which matters for this retailer's architecture.", "No explicit mention of Postgres connection budget management during protection windows; step 8 mentions sizing beyond 12x but not connection-pool reservation for monolith fallback."]}, {"proposal": 5, "fitness": "strong", "strengths": ["At 23 steps with the most sub-bullets per step, this is the most detailed and cross-referenced proposal; a new team member could execute from it with fewer clarifying questions.", "Step 10 (extraction playbook) is the most complete: it includes shadow rules, financial-discrepancy handling, stored-procedure retirement criteria, legacy retention through one sale, and rollback authority documentation.", "Step 11 (pricing archaeology) specifies ≥1,000 real orders per country for the golden-master corpus, a concrete data-volume target.", "Step 23 (closing) explicitly mandates keeping instant rollback in place and states 'Do not declare the programme done if sales protection, money integrity, or revertability was traded away.'", "Step 9 (event backbone) defines write-rollback semantics for accepted commands and mandates testing replay, duplicates, delayed events, and poisoned messages at peak volume before any production traffic.", "Step 6 includes mutation testing (PIT) and a <15-minute regression suite target, the most specific testing commitments in the round."], "weaknesses": ["The plan is essentially unchanged from round 3; the agent made no substantive revision in response to peer proposals, which means it did not incorporate the conditional throttle (Proposal 3), the reforecast step (Proposals 1, 3), or the explicit Postgres connection budget reservation (Proposal 2).", "At 23 steps with very long sub-bullet lists, the plan risks being too long for a steering committee to review effectively; some steps (S5, S9, S16) have 7–8 sub-bullets that could be split.", "No explicit five-team operability constraint on the number of independently deployable units.", "No conditional throttle if the programme starts close to a sale; step 16 (peak gate 1) handles the freeze but does not restrict pre-sale scope the way Proposal 3's step 1 does.", "The plan does not include a post-peak-1 reforecast step; step 21 (peak gate 2) mentions comparing actuals to forecasts after the sale but does not formalise a scope-adjustment decision."]}], "ranking": [3, 2, 5, 1, 4], "ranking_reasons": "Proposal 3 edges ahead because it combines the three most important operational safeguards in one plan: the five-team operability constraint, the conditional throttle if the programme starts near a sale, and the explicit ban on new CDC/connection-pool load during protection windows. It also has a concrete reforecast step (S17) with measurable triggers. Proposal 2 is a close second; its command-rollback semantics and standalone extraction-playbook step are the most precise in the round, but it lacks a reforecast mechanism and merges inventory and customer reads into one step. Proposal 5 is third: it is the most detailed and cross-referenced, but its refusal to revise in round 4 means it missed the conditional throttle, the reforecast step, and the connection-budget safeguard that Proposals 1–3 added. Proposal 1 is fourth: its reforecast step and 4-month warehouse burn-in are genuine strengths, but the ≥60% monolith-reduction metric contradicts its own conditional-scope language, and the cart/checkout window (months 8–11) is dangerously compressed. Proposal 4 is last: it is competent and granular but lacks a reforecast step, a five-team operability check, SSR cache handling, and Postgres connection-budget management, making it the least operationally grounded of the five.", "versus_initial": [{"proposal": 1, "verdict": "better", "why": "The initial Proposal 1 targeted full monolith decommission to <100k lines and daily deploy cadence by month 12, with thin step descriptions and an aggressive extraction sequence. The final Proposal 3 replaces those commitments with an honest year-one scope, conditional façades, and a five-team operability constraint.", "how": "The final plan adds a unified extraction playbook (S10), a reforecast step (S17), explicit non-goals (S3), and a conditional throttle for late starts. It drops the unrealistic monolith-reduction target and replaces sequential extraction with evidence-gated waves. The peak-protection windows are now hard calendar constraints with operational bans, not aspirational guidelines."}, {"proposal": 2, "verdict": "better", "why": "The initial Proposal 2 was already the most conservative, but it lacked an explicit extraction playbook, a reforecast mechanism, and the five-team operability constraint. The final Proposal 3 adds all three while retaining the conditional-scope philosophy.", "how": "The final plan adds a standalone playbook step (S10) with quantitative promotion gates, a post-peak reforecast step (S17) with measurable triggers, and an explicit ban on creating more deployable units than five teams can on-call. It also adds SSR cache handling and a Postgres connection-budget ban during protection windows, neither of which appeared in the initial Proposal 2."}, {"proposal": 3, "verdict": "better", "why": "The initial Proposal 3 was strong on monolith modularisation and freeze calendars but lacked a unified extraction playbook, explicit peak-certification steps, and a reforecast mechanism. The final version consolidates 25 steps into 22 and adds all three.", "how": "The final plan merges search and catalogue into one Season 1 step, adds a unified playbook (S10), inserts two explicit peak-certification steps (S13, S20), and adds a reforecast step (S17) with capacity and throughput triggers. The honest-scope statement is now blunt: 'Full monolith retirement is not a 12-month promise.' The five-team constraint and conditional throttle are new."}, {"proposal": 4, "verdict": "better", "why": "The initial Proposal 4 targeted 60% monolith reduction and eight independently deployable capabilities with a relatively linear sequence. The final Proposal 3 replaces those targets with conditional scope, evidence-gated write transfers, and explicit non-goals.", "how": "The final plan adds a reforecast step, a unified playbook, a five-team operability constraint, and a conditional throttle. It separates pricing archaeology from pricing extraction more cleanly and adds explicit command-rollback semantics. The peak gates are now hard freezes with written go/no-go, not just load-test checkpoints."}, {"proposal": 5, "verdict": "better", "why": "The initial Proposal 5 targeted zero monolith lines in production by month 12, which was unrealistic. The final Proposal 3 drops that target entirely and replaces it with a funded follow-on roadmap for anything that safely remains in the monolith.", "how": "The final plan adds the five-team operability constraint, the conditional throttle, the Postgres connection-budget ban, and a reforecast step, none of which appeared in the initial Proposal 5. It also adds SSR cache handling and explicit GDPR subject-access dual-system requirements. The seven-wave structure is replaced by a seasonal cadence with two hard peak gates."}], "improved_over_initial": true, "improvement_summary": "The deliberation produced a materially better plan than any initial proposal. The most important gains are: (1) the honest year-one scope that accepts façades as success, replacing the initial proposals' unrealistic decommission targets; (2) the unified extraction playbook with quantitative promotion gates, eliminating per-domain improvisation; (3) the five-team operability constraint, which no initial proposal addressed; (4) the conditional throttle for late programme starts; (5) explicit command-rollback semantics distinguishing route rollback from in-flight financial-command treatment; and (6) the Postgres connection-budget safeguard during protection windows. The main loss is specificity of tooling choices: the initial Proposal 5 named Debezium, Kafka, Elasticsearch, Pact, and Gatling explicitly, while the final round mostly says 'Kafka or equivalent' and 'Pact or Spring Cloud Contract', which is safer but less immediately actionable.", "process_evaluation": "The convergence was largely earned by better arguments, not mere imitation. The initial round had genuine divergence: Proposal 5 targeted full monolith retirement, Proposal 2 treated pricing as an open-ended discovery stream, and Proposal 3 insisted on monolith modularisation before extraction. Over four refinement rounds, the agents adopted each other's strongest ideas with visible justification: the façade-first pricing pattern spread from Proposals 2 and 3 to all five; the five-team constraint originated in Proposal 3 and was adopted by Proposal 2; the reforecast step originated in Proposals 1 and 3. However, the process was more convergent than critical. By round 3, all five proposals shared the same structural spine, and round 4 changes were mostly wording refinements and sub-bullet additions rather than substantive challenges. No agent questioned the task's premises: nobody asked whether 12 months was realistic for even the reduced scope, whether five teams of eight could absorb 30% migration work while maintaining 80% feature throughput, or whether the 1.2 TB database with 350 tables and heavy stored procedures made even read-model extraction riskier than assumed. The process also lost the initial Proposal 5's concrete tooling specificity in favour of generic 'or equivalent' language, and no agent pushed back on the assumption that a strangler gateway could be placed in front of a server-rendered Java monolith without significant rework.", "process_issues": ["No agent questioned whether 12 months is realistic even for the reduced year-one scope, given 2M lines of code, 350 tables, and 25% test coverage.", "No agent challenged the 50/30/20 capacity split; with five teams of eight (40 developers), 30% migration means 12 developers on migration, which may be insufficient for 10+ independently deployable capabilities.", "Proposal 5 made zero substantive changes in round 4, suggesting the agent either ran out of revision capacity or chose not to engage with peer feedback.", "The convergence eliminated useful divergence: no final proposal explores an alternative architecture (e.g., modular monolith with deployable modules, or a slower two-year programme), which would have been a legitimate counter-proposal.", "No agent addressed the mobile-app constraint in depth: the task says the mobile app hits the same endpoints, but no proposal specifies how API versioning, backward compatibility, and app-release cycles interact with the gateway over 12 months.", "The stored-procedure problem (heavy use across 350 tables) is acknowledged but no proposal estimates the effort or risk of rewriting them into service code, or whether some should remain in Postgres permanently.", "None of the proposals address the back-office's 300 staff users' change-management risk in quantitative terms (training hours, support-ticket projections, rollback SLA for staff workflows).", "The round analyses noted that Proposal 1's ≥60% monolith-reduction metric contradicted its conditional-scope language, but this contradiction persisted into the final round without resolution."], "suggestions": ["Add a mandatory 'premise challenge' round where each agent must argue that the 12-month timeline, the team capacity, or the task scope is wrong, and propose an alternative.", "Require each agent to explicitly critique at least one other proposal's weakest step before refining their own, rather than just observing and adopting ideas.", "Introduce a constraint-specification round where agents agree on hard numbers (team capacity, Postgres connection budget, maximum independently deployable units) before writing steps.", "Preserve tooling specificity: require each proposal to name concrete tools with justification, and let the voting round choose between named options rather than generic 'or equivalent' language.", "Add a dedicated risk-quantification step: each proposal should estimate person-months per wave, probability of peak-gate failure, and the cost of a 3-month slip.", "Require at least one proposal to explore a modular-monolith alternative (deployable modules within the monolith) as a lower-risk baseline, so the voting round can compare architectures, not just sequencing.", "Limit the number of refinement rounds to three; round 4 produced negligible substantive change and mostly wording adjustments.", "Add a post-vote synthesis step where the winning proposal is merged with the best ideas from the runner-up, rather than selecting one proposal wholesale."]}
[VOTE COMPARISON]
{"agrees": true, "comment": "Proposal 3 is my top pick, so the 4-of-5 vote matches my ranking. The voters' justifications centre on the same operational safeguards I valued: the five-team operability cap, the conditional throttle near a sale, and the explicit reforecast step (S17). One voter chose Proposal 5, citing its completeness and cross-referencing; I ranked it third for the same reasons it missed round-4 additions, so the disagreement is one of emphasis rather than a factual clash. No systematic bias toward length or position is visible in the justifications—they track the concrete mechanisms I identified."}The final round, ranked blind
Why this order
Proposal 3 edges ahead because it combines the three most important operational safeguards in one plan: the five-team operability constraint, the conditional throttle if the programme starts near a sale, and the explicit ban on new CDC/connection-pool load during protection windows. It also has a concrete reforecast step (S17) with measurable triggers. Proposal 2 is a close second; its command-rollback semantics and standalone extraction-playbook step are the most precise in the round, but it lacks a reforecast mechanism and merges inventory and customer reads into one step.
Proposal 5 is third: it is the most detailed and cross-referenced, but its refusal to revise in round 4 means it missed the conditional throttle, the reforecast step, and the connection-budget safeguard that Proposals 1–3 added. Proposal 1 is fourth: its reforecast step and 4-month warehouse burn-in are genuine strengths, but the ≥60% monolith-reduction metric contradicts its own conditional-scope language, and the cart/checkout window (months 8–11) is dangerously compressed. Proposal 4 is last: it is competent and granular but lacks a reforecast step, a five-team operability check, SSR cache handling, and Postgres connection-budget management, making it the least operationally grounded of the five.
The ranking
- Proposal 3 strong selected by the vote Strengths
- Step 1 explicitly constrains the number of independently deployable units to what five teams of eight can operate and on-call, and bans assumptions about extra headcount. No other proposal does this as clearly.
- Step 1 includes a conditional throttle: 'If the first sale is fewer than 16 weeks away, throttle Season 1 to observability, the gateway, the warehouse adapter, and at most search.' This is the most realistic calendar-aware guard.
- Step 5 bans new CDC, extra connection pools, and non-essential consumers from going live on the primary Postgres during a protection window, a concrete operational safeguard absent from other proposals.
- Step 17 (reforecast after first peak) is explicit and ties scope reduction to measurable triggers: 'If migration work exceeded 30% capacity or feature throughput fell below 80%, shrink Season 2.'
- Step 8 addresses SSR cache correctness explicitly ('Test cache bypass, session continuity, SSR cache correctness'), which matters for a server-rendered storefront.
- The plan explicitly states that the 1.2 TB PostgreSQL database is not physically split in year one, removing an entire class of risk.
Weaknesses- At 22 steps the plan is dense; steps 19 (order-query + cart/checkout façades) and 21 (back-office + write ownership) each combine two significant workstreams, which could obscure ownership.
- The plan does not include a concrete month-by-month calendar example; it references 'Season 1' and 'Season 2' but does not anchor them to specific months, making it harder to verify feasibility against the January/July peaks.
- Step 12 (warehouse adapter) does not specify a minimum burn-in duration (unlike Proposal 1's ≥4 months), leaving the stability gate somewhat open-ended.
- No explicit mutation-testing recommendation; step 6 mentions characterisation and contract tests but not mutation testing to find untested paths.
- The closing step 22 ('Hand over a durable hybrid') is strong but does not explicitly mandate a post-programme review comparing actuals to forecasts, delivery lead time, and cost.
- Proposal 2 strong Strengths
- The command-rollback semantics in step 7 are the most precise in the round: 'already accepted commands stay on their original compatible state machine and complete or enter an audited exception workflow. Only new commands may route back.'
- Step 9 (mandatory extraction playbook) is a standalone step with quantitative promotion gates, a cutover dossier template, and an explicit rule that 'service deployment can succeed without service write ownership', which is the correct year-one framing.
- Step 12 (first-sale gate) explicitly handles the case where the programme starts near a sale: 'production scope is restricted to foundations and only fully proven low-risk reads.'
- Step 5 reserves PostgreSQL connection and CPU capacity for full monolith fallback, a concrete operational detail the other proposals mention less precisely.
- Step 16 (pricing slices and cart/checkout façades) explicitly requires finance and merchandising sign-off per rule slice before live routing, and separates cart-write ownership from checkout-orchestration transfer with distinct evidence gates.
Weaknesses- At 20 steps, the plan is the shortest; some operational detail (e.g., Postgres connection budget, SSR cache handling) is folded into broader steps and could be missed by an executing team.
- No explicit reforecast step after the first peak; step 17 (second-sale gate) does not include a formal scope adjustment mechanism if Season 1 overran.
- Step 14 combines inventory availability reads and customer read slices into one step, which conflates two different risk profiles (stock accuracy vs. GDPR/session continuity).
- The plan does not name a concrete tool or technology for the event backbone, contract testing, or search replacement, which could slow the platform team's initial decisions.
- Step 19 (write ownership transfer) is placed after the second peak but before the closing consolidation; if the second peak falls in late July, only ~4 months remain for ownership transfers and step 20, which is tight.
- Proposal 5 strong Strengths
- At 23 steps with the most sub-bullets per step, this is the most detailed and cross-referenced proposal; a new team member could execute from it with fewer clarifying questions.
- Step 10 (extraction playbook) is the most complete: it includes shadow rules, financial-discrepancy handling, stored-procedure retirement criteria, legacy retention through one sale, and rollback authority documentation.
- Step 11 (pricing archaeology) specifies ≥1,000 real orders per country for the golden-master corpus, a concrete data-volume target.
- Step 23 (closing) explicitly mandates keeping instant rollback in place and states 'Do not declare the programme done if sales protection, money integrity, or revertability was traded away.'
- Step 9 (event backbone) defines write-rollback semantics for accepted commands and mandates testing replay, duplicates, delayed events, and poisoned messages at peak volume before any production traffic.
- Step 6 includes mutation testing (PIT) and a <15-minute regression suite target, the most specific testing commitments in the round.
Weaknesses- The plan is essentially unchanged from round 3; the agent made no substantive revision in response to peer proposals, which means it did not incorporate the conditional throttle (Proposal 3), the reforecast step (Proposals 1, 3), or the explicit Postgres connection budget reservation (Proposal 2).
- At 23 steps with very long sub-bullet lists, the plan risks being too long for a steering committee to review effectively; some steps (S5, S9, S16) have 7–8 sub-bullets that could be split.
- No explicit five-team operability constraint on the number of independently deployable units.
- No conditional throttle if the programme starts close to a sale; step 16 (peak gate 1) handles the freeze but does not restrict pre-sale scope the way Proposal 3's step 1 does.
- The plan does not include a post-peak-1 reforecast step; step 21 (peak gate 2) mentions comparing actuals to forecasts after the sale but does not formalise a scope-adjustment decision.
- Proposal 1 strong Strengths
- Step 16 (post-peak-1 reforecast) is unique among the five and genuinely valuable: it forces a go/no-go on Season 2 scope based on observed velocity, pricing archaeology progress, and warehouse adapter reliability.
- Step 11 mandates a ≥4-month warehouse-adapter burn-in before extracting inventory reads, the longest and most conservative stability gate in the round.
- Success metrics explicitly include a gateway p99 overhead cap (<50 ms) and a monolith-codebase-reduction metric (≥60%) that anchors the year-one scope.
- Step 9 defines write-rollback semantics clearly: accepted payments and orders complete on their original state machine or enter an audited exception workflow, not just a route flip.
- Step 17 combines pricing dual-run and payment isolation into one wave, reducing sequencing gaps between the two most money-sensitive extractions.
Weaknesses- The ≥60% monolith-reduction metric in the success criteria contradicts the conditional-scope philosophy adopted in steps 3, 17, and 23; if pricing stays behind a façade, 60% is unreachable.
- Step 20 (cart/checkout façades, months 8–11) leaves only one month before the year-end consolidation in step 23, compressing the riskiest orchestration work into a tight window.
- No explicit five-team operability constraint on the number of independently deployable units; the plan lists ~10 capabilities without checking whether five teams of eight can on-call them all.
- Step 12 (Wave 1) depends on step 11 (warehouse adapter), which itself requires ≥4 months of burn-in; if the programme starts in September, Wave 1 cannot begin before January, colliding with the peak.
- Missing an explicit post-sale lessons-learned freeze step; step 23 mentions publishing a follow-on roadmap but does not mandate comparing actuals to forecasts after the second sale.
- Proposal 4 strong Strengths
- The 23-step structure is the most granular in the round, with separate steps for search (S12), inventory reads (S13), customer (S14), pricing dual-run (S16), payment adapters (S17), order query (S18), and cart/checkout façades (S19), making ownership assignment cleaner.
- Step 7 (monolith modularisation) includes a quantitative gate: 'Raise regression coverage on touched code to at least 60% before extraction.'
- Step 11 requires the warehouse adapter to prove stability for ≥4 months before inventory read extraction, matching Proposal 1's conservatism.
- Step 9 (testing) explicitly names Pact/Spring Cloud Contract and includes mutation testing, giving the platform team concrete tooling guidance.
- Step 15 (first peak gate) and Step 20 (second peak gate) are symmetric and detailed, with identical freeze, load-test, game-day, and sign-off structures.
Weaknesses- The plan lacks an explicit reforecast step after the first peak; there is no mechanism to adjust Season 2 scope if Season 1 overran, unlike Proposals 1 and 3.
- No five-team operability constraint; the plan lists ~10 independently deployable capabilities without checking whether five teams can staff on-call for all of them.
- Step 22 (write ownership transfer) depends on steps 8, 12–19, 21, creating a very wide dependency fan that could become a scheduling bottleneck.
- The plan does not address SSR cache correctness or the specific challenge of routing server-rendered pages through a gateway, which matters for this retailer's architecture.
- No explicit mention of Postgres connection budget management during protection windows; step 8 mentions sizing beyond 12x but not connection-pool reservation for monolith fallback.
The vote, confronted with the analyst
the analyst agrees with the vote
Proposal 3 is my top pick, so the 4-of-5 vote matches my ranking. The voters' justifications centre on the same operational safeguards I valued: the five-team operability cap, the conditional throttle near a sale, and the explicit reforecast step (S17). One voter chose Proposal 5, citing its completeness and cross-referencing; I ranked it third for the same reasons it missed round-4 additions, so the disagreement is one of emphasis rather than a factual clash.
No systematic bias toward length or position is visible in the justifications—they track the concrete mechanisms I identified.
Is the analyst's first choice better than the initial proposals? better than every initial proposal
The deliberation produced a materially better plan than any initial proposal. The most important gains are: (1) the honest year-one scope that accepts façades as success, replacing the initial proposals' unrealistic decommission targets; (2) the unified extraction playbook with quantitative promotion gates, eliminating per-domain improvisation; (3) the five-team operability constraint, which no initial proposal addressed; (4) the conditional throttle for late programme starts; (5) explicit command-rollback semantics distinguishing route rollback from in-flight financial-command treatment; and (6) the Postgres connection-budget safeguard during protection windows. The main loss is specificity of tooling choices: the initial Proposal 5 named Debezium, Kafka, Elasticsearch, Pact, and Gatling explicitly, while the final round mostly says 'Kafka or equivalent' and 'Pact or Spring Cloud Contract', which is safer but less immediately actionable.
| Initial proposal | Verdict | Why | How |
|---|---|---|---|
| Proposal 1 |
better | The initial Proposal 1 targeted full monolith decommission to <100k lines and daily deploy cadence by month 12, with thin step descriptions and an aggressive extraction sequence. The final Proposal 3 replaces those commitments with an honest year-one scope, conditional façades, and a five-team operability constraint. |
The final plan adds a unified extraction playbook (S10), a reforecast step (S17), explicit non-goals (S3), and a conditional throttle for late starts. It drops the unrealistic monolith-reduction target and replaces sequential extraction with evidence-gated waves. The peak-protection windows are now hard calendar constraints with operational bans, not aspirational guidelines. |
| Proposal 2 |
better | The initial Proposal 2 was already the most conservative, but it lacked an explicit extraction playbook, a reforecast mechanism, and the five-team operability constraint. The final Proposal 3 adds all three while retaining the conditional-scope philosophy. |
The final plan adds a standalone playbook step (S10) with quantitative promotion gates, a post-peak reforecast step (S17) with measurable triggers, and an explicit ban on creating more deployable units than five teams can on-call. It also adds SSR cache handling and a Postgres connection-budget ban during protection windows, neither of which appeared in the initial Proposal 2. |
| Proposal 3 |
better | The initial Proposal 3 was strong on monolith modularisation and freeze calendars but lacked a unified extraction playbook, explicit peak-certification steps, and a reforecast mechanism. The final version consolidates 25 steps into 22 and adds all three. |
The final plan merges search and catalogue into one Season 1 step, adds a unified playbook (S10), inserts two explicit peak-certification steps (S13, S20), and adds a reforecast step (S17) with capacity and throughput triggers. The honest-scope statement is now blunt: 'Full monolith retirement is not a 12-month promise.' The five-team constraint and conditional throttle are new. |
| Proposal 4 |
better | The initial Proposal 4 targeted 60% monolith reduction and eight independently deployable capabilities with a relatively linear sequence. The final Proposal 3 replaces those targets with conditional scope, evidence-gated write transfers, and explicit non-goals. |
The final plan adds a reforecast step, a unified playbook, a five-team operability constraint, and a conditional throttle. It separates pricing archaeology from pricing extraction more cleanly and adds explicit command-rollback semantics. The peak gates are now hard freezes with written go/no-go, not just load-test checkpoints. |
| Proposal 5 |
better | The initial Proposal 5 targeted zero monolith lines in production by month 12, which was unrealistic. The final Proposal 3 drops that target entirely and replaces it with a funded follow-on roadmap for anything that safely remains in the monolith. |
The final plan adds the five-team operability constraint, the conditional throttle, the Postgres connection-budget ban, and a reforecast step, none of which appeared in the initial Proposal 5. It also adds SSR cache handling and explicit GDPR subject-access dual-system requirements. The seven-wave structure is replaced by a seasonal cadence with two hard peak gates. |
Evaluation of the process
The convergence was largely earned by better arguments, not mere imitation. The initial round had genuine divergence: Proposal 5 targeted full monolith retirement, Proposal 2 treated pricing as an open-ended discovery stream, and Proposal 3 insisted on monolith modularisation before extraction. Over four refinement rounds, the agents adopted each other's strongest ideas with visible justification: the façade-first pricing pattern spread from Proposals 2 and 3 to all five; the five-team constraint originated in Proposal 3 and was adopted by Proposal 2; the reforecast step originated in Proposals 1 and 3.
However, the process was more convergent than critical. By round 3, all five proposals shared the same structural spine, and round 4 changes were mostly wording refinements and sub-bullet additions rather than substantive challenges. No agent questioned the task's premises: nobody asked whether 12 months was realistic for even the reduced scope, whether five teams of eight could absorb 30% migration work while maintaining 80% feature throughput, or whether the 1.2 TB database with 350 tables and heavy stored procedures made even read-model extraction riskier than assumed.
The process also lost the initial Proposal 5's concrete tooling specificity in favour of generic 'or equivalent' language, and no agent pushed back on the assumption that a strangler gateway could be placed in front of a server-rendered Java monolith without significant rework.
- No agent questioned whether 12 months is realistic even for the reduced year-one scope, given 2M lines of code, 350 tables, and 25% test coverage.
- No agent challenged the 50/30/20 capacity split; with five teams of eight (40 developers), 30% migration means 12 developers on migration, which may be insufficient for 10+ independently deployable capabilities.
- Proposal 5 made zero substantive changes in round 4, suggesting the agent either ran out of revision capacity or chose not to engage with peer feedback.
- The convergence eliminated useful divergence: no final proposal explores an alternative architecture (e.g., modular monolith with deployable modules, or a slower two-year programme), which would have been a legitimate counter-proposal.
- No agent addressed the mobile-app constraint in depth: the task says the mobile app hits the same endpoints, but no proposal specifies how API versioning, backward compatibility, and app-release cycles interact with the gateway over 12 months.
- The stored-procedure problem (heavy use across 350 tables) is acknowledged but no proposal estimates the effort or risk of rewriting them into service code, or whether some should remain in Postgres permanently.
- None of the proposals address the back-office's 300 staff users' change-management risk in quantitative terms (training hours, support-ticket projections, rollback SLA for staff workflows).
- The round analyses noted that Proposal 1's ≥60% monolith-reduction metric contradicted its conditional-scope language, but this contradiction persisted into the final round without resolution.
- Add a mandatory 'premise challenge' round where each agent must argue that the 12-month timeline, the team capacity, or the task scope is wrong, and propose an alternative.
- Require each agent to explicitly critique at least one other proposal's weakest step before refining their own, rather than just observing and adopting ideas.
- Introduce a constraint-specification round where agents agree on hard numbers (team capacity, Postgres connection budget, maximum independently deployable units) before writing steps.
- Preserve tooling specificity: require each proposal to name concrete tools with justification, and let the voting round choose between named options rather than generic 'or equivalent' language.
- Add a dedicated risk-quantification step: each proposal should estimate person-months per wave, probability of peak-gate failure, and the cost of a 3-month slip.
- Require at least one proposal to explore a modular-monolith alternative (deployable modules within the monolith) as a lower-risk baseline, so the voting round can compare architectures, not just sequencing.
- Limit the number of refinement rounds to three; round 4 produced negligible substantive change and mostly wording adjustments.
- Add a post-vote synthesis step where the winning proposal is merged with the best ideas from the runner-up, rather than selecting one proposal wholesale.
Convergence: steps changed per round
- claudeHaiku4.5_refine_1 claudeHaiku4.5 · anthropic/claude-haiku-4-5
- gpt-5.6-terra_refine_2 gpt-5.6-terra · openai/gpt-5.6-terra
- grok-4.6_refine_3 grok-4.6 · xai/grok-4.6
- deepseek-v4-pro_refine_4 deepseek-v4-pro · deepseek/deepseek-v4-pro
- qwen3.8-max_refine_5 qwen3.8-max · alibaba/qwen3.8-max
- mean of the agents
| Steps kept, added and removed | Round 1 | Round 2 | Round 3 | Round 4 |
|---|---|---|---|---|
| claudeHaiku4.5_refine_1 |
5 | 14 | 11 | 14 |
| gpt-5.6-terra_refine_2 |
6 | 13 | 11 | 11 |
| grok-4.6_refine_3 |
10 | 8 | 19 | 15 |
| deepseek-v4-pro_refine_4 |
11 | 11 | 13 | 17 |
| qwen3.8-max_refine_5 |
9 | 19 | 8 | 23 |
Contributions of each agent
- claudeHaiku4.5_refine_1 claudeHaiku4.5 · anthropic/claude-haiku-4-5 · extended thinking, 15.0k tokens · temp 1
- gpt-5.6-terra_refine_2 gpt-5.6-terra · openai/gpt-5.6-terra · reasoning effort medium
- grok-4.6_refine_3 grok-4.6 · xai/grok-4.6 · reasoning effort medium
- deepseek-v4-pro_refine_4 deepseek-v4-pro · deepseek/deepseek-v4-pro · thinking on (model default)
- qwen3.8-max_refine_5 qwen3.8-max · alibaba/qwen3.8-max · thinking on, budget 16.0k tokens
| Agent | Steps of the selected plan it introduced | Steps introduced | Copied by others | Survived to the final round | Ideas taken from it | Ideas rejected | Declared adopted | Declared rejected | Votes received |
|---|---|---|---|---|---|---|---|---|---|
| grok-4.6_refine_3 selected plan |
17 | 48 | 32 | 23 | 23 | 9 | 4 | ||
| gpt-5.6-terra_refine_2 |
4 | 45 | 36 | 20 | 29 | 7 | 0 | ||
| claudeHaiku4.5_refine_1 |
1 | 43 | 19 | 12 | 6 | 7 | 0 | ||
| deepseek-v4-pro_refine_4 |
0 | 30 | 27 | 7 | 12 | 3 | 0 | ||
| qwen3.8-max_refine_5 |
0 | 20 | 25 | 2 | 14 | 4 | 1 |
Efficiency of each agent
Cost per step
Steps per minute of model time
Timeline
Costs
Two separate things were paid for in this run:
- The planning process itself ("Deliberation" below): the 30 LLM calls that produced the plan — 5 agents drafting and refining over 5 rounds, then 5 voters. This is the cost of obtaining the plan. Running
slow-thinkercosts exactly this. - The optional evaluation ("Analysis" below, on yellow like everything the analysis adds): the 7 calls made afterwards by
slow-thinker-report --analyzeso that a reviewing model explains how the proposals evolved and judges the outcome. It does not change the plan and is only paid if you ask for it.
2.22
0.83
3.05
Deliberation (the planning process), by model
| Model | Thinking | Calls | Input tokens | Output tokens | Reasoning | Model time | Cost |
|---|---|---|---|---|---|---|---|
| claudeHaiku4.5 · anthropic/claude-haiku-4-5 | extended thinking, 15.0k tokens · temp 1 | 6 | 151.8k | 45.5k | 16.9k | 9 min 28 s | 0.38 |
| gpt-5.6-terra · openai/gpt-5.6-terra | reasoning effort medium | 6 | 130.7k | 28.3k | 1.1k | 5 min 12 s | 0.60 |
| grok-4.6 · xai/grok-4.6 | reasoning effort medium | 6 | 136.7k | 25.3k | 27.5k | 13 min 19 s | 0.43 |
| deepseek-v4-pro · deepseek/deepseek-v4-pro | thinking on (model default) | 6 | 134.7k | 88.7k | 63.5k | 12 min 40 s | 0.24 |
| qwen3.8-max · alibaba/qwen3.8-max | thinking on, budget 16.0k tokens | 6 | 139.4k | 48.1k | 11.3k | 17 min 39 s | 0.57 |
| Total | 30 | 693.3k | 235.9k | 120.2k | 58 min 18 s | 2.22 |
Deliberation (the planning process), by call
| Phase | Call | Model | Input tokens | Output tokens | Reasoning | Time | Cost |
|---|---|---|---|---|---|---|---|
| Round 0 | claudeHaiku4.5_initial_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 1.2k | 11.1k | 6.8k | 1 min 43 s | 0.057 |
| Round 0 | deepseek-v4-pro_initial_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 1.0k | 15.0k | 11.6k | 1 min 58 s | 0.030 |
| Round 0 | gpt-5.6-terra_initial_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 831 | 5.3k | 100 | 1 min 18 s | 0.066 |
| Round 0 | grok-4.6_initial_3 | grok-4.6 · xai/grok-4.6 | 1.5k | 3.9k | 2.6k | 2 min 0 s | 0.026 |
| Round 0 | qwen3.8-max_initial_5 | qwen3.8-max · alibaba/qwen3.8-max | 969 | 6.0k | 1.3k | 2 min 36 s | 0.038 |
| Round 1 | claudeHaiku4.5_refine_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 22.4k | 5.3k | 2.0k | 1 min 4 s | 0.049 |
| Round 1 | deepseek-v4-pro_refine_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 19.9k | 17.8k | 12.8k | 2 min 7 s | 0.048 |
| Round 1 | gpt-5.6-terra_refine_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 19.3k | 5.5k | 253 | 1 min 4 s | 0.10 |
| Round 1 | grok-4.6_refine_3 | grok-4.6 · xai/grok-4.6 | 20.3k | 4.2k | 2.9k | 2 min 5 s | 0.066 |
| Round 1 | qwen3.8-max_refine_5 | qwen3.8-max · alibaba/qwen3.8-max | 20.8k | 9.2k | 1.4k | 3 min 6 s | 0.097 |
| Round 2 | claudeHaiku4.5_refine_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 27.4k | 7.7k | 971 | 1 min 44 s | 0.066 |
| Round 2 | deepseek-v4-pro_refine_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 24.3k | 19.3k | 14.6k | 2 min 16 s | 0.054 |
| Round 2 | gpt-5.6-terra_refine_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 23.6k | 5.6k | 174 | 57 s | 0.11 |
| Round 2 | grok-4.6_refine_3 | grok-4.6 · xai/grok-4.6 | 24.6k | 5.5k | 3.2k | 2 min 1 s | 0.082 |
| Round 2 | qwen3.8-max_refine_5 | qwen3.8-max · alibaba/qwen3.8-max | 25.2k | 9.7k | 2.0k | 3 min 28 s | 0.11 |
| Round 3 | claudeHaiku4.5_refine_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 32.1k | 9.1k | 2.1k | 2 min 1 s | 0.077 |
| Round 3 | deepseek-v4-pro_refine_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 28.5k | 15.3k | 9.1k | 1 min 49 s | 0.049 |
| Round 3 | gpt-5.6-terra_refine_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 27.7k | 5.5k | 172 | 52 s | 0.12 |
| Round 3 | grok-4.6_refine_3 | grok-4.6 · xai/grok-4.6 | 28.8k | 5.5k | 3.7k | 1 min 56 s | 0.091 |
| Round 3 | qwen3.8-max_refine_5 | qwen3.8-max · alibaba/qwen3.8-max | 29.4k | 10.1k | 1.8k | 3 min 40 s | 0.12 |
| Round 4 | claudeHaiku4.5_refine_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 34.2k | 8.7k | 1.5k | 1 min 57 s | 0.078 |
| Round 4 | deepseek-v4-pro_refine_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 30.4k | 13.5k | 7.7k | 3 min 15 s | 0.027 |
| Round 4 | gpt-5.6-terra_refine_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 29.5k | 6.0k | 138 | 53 s | 0.13 |
| Round 4 | grok-4.6_refine_3 | grok-4.6 · xai/grok-4.6 | 30.6k | 6.1k | 11.3k | 3 min 55 s | 0.098 |
| Round 4 | qwen3.8-max_refine_5 | qwen3.8-max · alibaba/qwen3.8-max | 31.3k | 9.9k | 1.8k | 3 min 28 s | 0.12 |
| Voting | claudeHaiku4.5_voter_1 | claudeHaiku4.5 · anthropic/claude-haiku-4-5 | 34.4k | 3.6k | 3.5k | 59 s | 0.053 |
| Voting | gpt-5.6-terra_voter_2 | gpt-5.6-terra · openai/gpt-5.6-terra | 29.7k | 364 | 262 | 7 s | 0.064 |
| Voting | grok-4.6_voter_3 | grok-4.6 · xai/grok-4.6 | 30.9k | 127 | 3.9k | 1 min 22 s | 0.063 |
| Voting | deepseek-v4-pro_voter_4 | deepseek-v4-pro · deepseek/deepseek-v4-pro | 30.6k | 7.7k | 7.6k | 1 min 14 s | 0.036 |
| Voting | qwen3.8-max_voter_5 | qwen3.8-max · alibaba/qwen3.8-max | 31.7k | 3.2k | 3.0k | 1 min 22 s | 0.082 |
Analysis (optional evaluation, not part of the process), by call
| Call | Model | Input tokens | Output tokens | Reasoning | Time | Cost |
|---|---|---|---|---|---|---|
| analysis of round 0 | alibaba/qwen3.8-max | 20.5k | 1.6k | 637 | 43 s | 0.050 |
| analysis of round 1 | alibaba/qwen3.8-max | 47.2k | 8.2k | 1.9k | 3 min 20 s | 0.14 |
| analysis of round 2 | alibaba/qwen3.8-max | 55.6k | 8.0k | 3.0k | 3 min 12 s | 0.16 |
| analysis of round 3 | alibaba/qwen3.8-max | 61.6k | 5.9k | 1.8k | 2 min 35 s | 0.16 |
| analysis of round 4 | alibaba/qwen3.8-max | 63.8k | 6.3k | 3.4k | 2 min 37 s | 0.17 |
| analysis of final | alibaba/qwen3.8-max | 55.6k | 6.7k | 2.0k | 2 min 54 s | 0.15 |
| analysis of vote comparison | alibaba/qwen3.8-max | 1.7k | 538 | 402 | 13 s | 0.007 |
| Total | 305.9k | 37.2k | 13.0k | 15 min 34 s | 0.83 |