Overview
Phase 3 of the modernization workflow is where strategy becomes structure. You have the assessment data from Phase 1 and the business rules inventory from Phase 2. Now the question is: what are we modernizing to, and how? This is the most human-driven phase in the entire modernization workflow. CoreStory provides the analysis — natural service boundaries, coupling hotspots, data dependency maps, effort estimates — but the architectural decision belongs to the architect and stakeholders. AI is excellent at revealing what a system is; humans decide what it should become. The reason this boundary matters: architectural decisions are organizational commitments. They determine team structure, hiring plans, vendor contracts, timelines, and budgets. They affect compliance posture, operational complexity, and the skills your team needs to develop. These are not decisions an AI should make, no matter how good its analysis is. CoreStory serves as an Oracle throughout this phase — explaining system behavior, identifying natural boundaries and extension points, and quantifying the gap between current and target states. It also serves as a Navigator when defining the target architecture, pointing to specific code patterns, data flows, and integration points that inform where boundaries should be drawn. Who this is for: Architects, engineering leads, and technical decision-makers responsible for choosing the modernization strategy and defining the target architecture. Also useful for consultants and system integrators presenting options to stakeholders. What you’ll get: An Architectural Decision Record (ADR) documenting the selected modernization strategy, target architecture, migration scope, constraints, and stakeholder approval — the input that Phase 4 (Decomposition & Sequencing) turns into executable work packages.When to Use This Playbook
- You’ve completed Phase 1 (Codebase Assessment) and have a Modernization Readiness Report with component-level readiness scores
- You need to choose a modernization strategy (from the 7 Rs) for each component — not a single system-wide strategy
- You need to define the target architecture before decomposing work into executable packages
- You’re presenting modernization options to stakeholders and need data-backed analysis to support the recommendation
- You need to document an architectural decision with rationale, constraints, and approval for the audit trail
When to Skip This Playbook
- You’ve already made the architectural decision and need to decompose it into work packages — go to Decomposition & Sequencing
- You’re still assessing the current system — go back to Codebase Assessment
- The modernization is a straightforward lift-and-shift (Rehost/Relocate) with no architectural changes — this playbook adds minimal value to infrastructure-only moves
- You’re doing a single-component refactor that doesn’t require a formal architectural decision — use Spec-Driven Development directly
Prerequisites
- A completed Codebase Assessment (Phase 1) — the Modernization Readiness Report is the primary input to this phase
- A completed or in-progress Business Rules Inventory (Phase 2) — understanding what the system does is essential for deciding what it should become
- A CoreStory account with the legacy codebase ingested and ingestion complete
- An AI coding agent with CoreStory MCP configured (see Supercharging AI Agents for setup)
- The right people in the room: This phase requires architectural judgment. The architect or tech lead who will own the target architecture should be driving this phase, not delegating it to the agent.
- (Recommended) Access to the Codebase Assessment conversation thread in CoreStory for cross-referencing findings
How It Works
CoreStory MCP Tools Used
| Tool | Step(s) | Purpose |
|---|---|---|
list_projects | 1 | Confirm the target project |
create_conversation | 1 | Start a dedicated architecture decision thread |
send_message | 2, 3, 4 | Query CoreStory for strategy exploration and architecture definition |
list_conversations | 1 | Find the assessment conversation from Phase 1 |
get_conversation | 1 | Retrieve assessment findings for cross-reference |
get_project_techspec | 1 | Retrieve Tech Spec for architectural vocabulary |
get_project_prd | 1 | Retrieve synthesized PRD for business context and requirements |
rename_conversation | 5 | Mark completed thread with “RESOLVED” prefix |
The Strategy & Architecture Workflow
Note: The steps below are internal to this playbook. They are sub-steps of Phase 3 in the six-phase modernization framework, not a separate numbering system.This playbook follows a five-step pattern:
- Input Review — Load the Codebase Assessment report and Business Rules Inventory from prior phases. Establish the baseline that all strategy decisions reference.
- Strategy Exploration — Query CoreStory to explore which modernization patterns are feasible given the current architecture. This is the divergent phase — open the option space before narrowing.
- Target Architecture Definition — Define the target architecture with CoreStory’s guidance on natural service boundaries, extension points, and alignment with the selected strategy.
- Risk & Effort Estimation — Assess the gap between current and target architecture. Estimate effort and risk per component. This is where the strategy meets reality.
- Decision Documentation — Record the architectural decision, rationale, constraints, and approval in an Architectural Decision Record (ADR). This artifact feeds Phase 4 and serves as the audit trail.
The HITL Boundary
This phase has the most critical human-in-the-loop gate in the entire modernization workflow:After Step 4: The architect or tech lead reviews the target architecture, strategy recommendations, and risk/effort estimates. This is the gate where the architectural decision is made and approved by stakeholders. It must not be delegated to AI.CoreStory’s role is to provide the best possible analysis so the human decision-maker has complete information. The agent should present options with trade-offs, not make recommendations that assume the decision is already made.
Step-by-Step Walkthrough
Step 1: Input Review
Start by loading context from prior phases so all strategy exploration is grounded in actual assessment data. Confirm the project and locate prior work:list_projects and list_conversations to locate the assessment conversation. If you used the naming convention from the Codebase Assessment playbook, look for “RESOLVED - [Assessment] SystemName - Modernization Readiness”.
Retrieve assessment context:
get_conversation to retrieve the assessment findings. This establishes the baseline for strategy exploration.
Create the architecture decision thread:
Step 2: Strategy Exploration
With the assessment baseline loaded, explore which modernization patterns are feasible. This is the divergent phase — the goal is to understand the option space before narrowing to a decision. Natural boundaries and decomposition candidates:Step 3: Target Architecture Definition
Narrow from exploration to definition. Use CoreStory to validate the emerging target architecture against the actual codebase. Service boundary definition:- Phase 4 (Decomposition): Each work package’s scope is defined by its tags. A package dominated by
PRESERVEandMODERNIZEis lower-risk than one heavy onCHANGEandNEW. - Phase 5 (Execution): TDD assertions differ by tag.
PRESERVEbehaviors get regression tests asserting identical output.CHANGEbehaviors get tests asserting the new expected output.NEWbehaviors need tests written from scratch. - Phase 6 (Verification): Verification criteria differ by tag.
PRESERVEitems require behavioral equivalence proof.MODERNIZEitems require equivalence plus improvement metrics.CHANGEitems require stakeholder sign-off on the new behavior.
CHANGE + NEW tags exceed roughly 20% of the tagged items in a work unit, the unit is drifting from modernization toward rewrite — fundamentally different risk characteristics. Flag to the program manager for scope review before proceeding to Phase 4.
Step 4: Risk & Effort Estimation
Quantify the gap between current and target state so the decision-makers have realistic expectations. Component-level effort estimation:Step 5: Decision Documentation
Record the decision in an Architectural Decision Record. This artifact serves three purposes: it documents the rationale for future reference, it provides the input for Phase 4 (Decomposition & Sequencing), and it creates the audit trail for governance. Generate the ADR:Output Format: Architectural Decision Record
The following diagram illustrates the transformation from current to target architecture — the visual complement to the ADR’s Components table. Mapping arrows show which current modules become which target services, color-coded by strategy:Prompting Patterns Reference
Strategy Exploration Patterns
The goal of Step 2 is to open the option space. Use divergent queries that explore multiple strategies rather than converging on one prematurely.| Pattern | Example |
|---|---|
| Feasibility scan | ”For each component, evaluate the feasibility of all seven strategies: Retire, Retain, Rehost, Relocate, Replatform, Refactor/Re-architect, and Repurchase. For each, assess effort, risk, dependencies, and payoff timeline.” |
| Boundary detection | ”Where are the natural service boundaries? What data and logic would need to move with each proposed service?” |
| Coupling clusters | ”Which components are so tightly coupled they must be modernized together? Identify the minimal migration units.” |
| What-if analysis | ”If we extract OrderService as a standalone service, what integration points and anti-corruption layers are needed?” |
| Deployment gap | ”What is the gap between the current deployment model and what microservices/cloud-native would require?” |
Architecture Definition Patterns
Step 3 narrows from exploration to definition. Use convergent queries that validate specific architectural choices.| Pattern | Example |
|---|---|
| Integration point mapping | ”If we extract [component], what shared data must be decoupled and what new integration points are created?” |
| Pattern preservation | ”What existing design patterns, API conventions, and data access patterns should carry forward to the target architecture?” |
| Gap quantification | ”For the target architecture, where does the current codebase align and where are the biggest structural gaps?” |
| Data decomposition | ”Which shared databases need to split? Which foreign key relationships cross the proposed service boundaries?” |
| Cross-cutting resolution | ”How should auth, logging, config, and error handling work in the target architecture?” |
Best Practices
Present options, not conclusions. The agent should surface multiple feasible strategies with trade-offs, not converge on a single recommendation. The architectural decision belongs to the human. Framing matters: “Here are three viable approaches with their trade-offs” is better than “You should do X.” Ground every recommendation in assessment data. Every strategy recommendation should reference specific findings from the Phase 1 assessment. “Re-architect is recommended for OrderService because the assessment found it shares 12 database tables with 4 other services and has a readiness score of 2” is actionable. “Re-architect is recommended for OrderService because it would benefit from modernization” is not. Don’t force a single strategy. 53% of enterprises pursue hybrid strategies (Kyndryl 2025 State of IT Infrastructure Report). Different components should get different strategies based on their readiness scores, coupling profiles, and business value. The ADR should explicitly document the per-component strategy, not a single system-wide approach. Address data architecture explicitly. Data decomposition is consistently the hardest part of modernization — especially for monolith-to-microservices patterns. The target architecture must address how shared databases will be handled during and after migration. Skipping this produces a target architecture that looks clean on paper but is infeasible in practice. Include alternatives considered. Documenting rejected alternatives and the reasons for rejection is as valuable as documenting the selected strategy. It prevents relitigating the decision later and demonstrates that the choice was deliberate. Account for organizational constraints. The best technical architecture is useless if the team can’t build or operate it. Factor in team skills, hiring timelines, operational complexity, compliance constraints, and budget when evaluating strategies. CoreStory can analyze the code; the humans must assess the organization. Use a staged target if needed. Not every modernization needs to reach the final target architecture in one program. An intermediate architecture (e.g., modular monolith before microservices) may be more feasible and still deliver significant value. The ADR should document whether the target is the final state or an intermediate step.Agent Implementation Guides
Claude Code
Claude Code
Setup
- Configure the CoreStory MCP server in your Claude Code settings (see CoreStory MCP Server Setup Guide).
- Add the skill file:
.claude/skills/target-architecture/SKILL.md with the content from the skill file below.- Commit to version control:
Usage
The skill activates automatically when Claude Code detects architecture decision requests:Tips
- This skill focuses on Phase 3 of the broader modernization workflow. It expects Phase 1 (Codebase Assessment) to be complete.
- The skill should present options and trade-offs, not make the architectural decision. The human decides.
- Keep the SKILL.md under 500 lines for reliable loading.
Skill File
Save as.claude/skills/target-architecture/SKILL.md:GitHub Copilot
GitHub Copilot
Setup
Add the following to.github/copilot-instructions.md:.github/prompts/target-architecture.prompt.md:Cursor
Cursor
Create
.cursor/rules/target-architecture/RULE.md:Factory.ai
Factory.ai
Create
.factory/droids/target-architecture.md:Troubleshooting
The assessment conversation can’t be found. Uselist_conversations to see all available threads. If the assessment used the naming convention from the Codebase Assessment playbook, search for “RESOLVED - [Assessment]”. If the assessment was done in a prior session or by a different team member, you may need to retrieve the assessment report as a document rather than through CoreStory conversation history.
CoreStory recommends a single strategy for everything.
Push back with targeted queries. Ask about specific components: “What about the payment processing module specifically — could it be retained while the rest is re-architected? What would the integration boundary look like?” Different components have different readiness profiles, and the analysis should reflect that.
The target architecture is too ambitious for the team.
Consider a staged approach. Ask CoreStory: “What intermediate architecture could we reach that delivers value but is less complex than full microservices?” A modular monolith or a partial decomposition (extracting 2–3 high-value services while keeping the rest monolithic) is often the right first step.
Data decomposition seems impossible.
This is the most common sticking point in monolith-to-microservices patterns. Ask targeted questions: “Which tables are written by only one module?” (those are the easy ones), “Which tables are written by multiple modules?” (those need careful planning), “Can we use an event-driven approach to sync data between services during coexistence?” The Monolith to Microservices variant playbook addresses this in detail.
Stakeholders can’t agree on a strategy.
Document each competing approach as an alternative in the ADR with trade-offs. Use CoreStory to provide objective data: effort estimates, risk profiles, component dependency analysis. Data-backed trade-offs are easier to resolve than opinion-based disagreements.
Agent can’t access CoreStory tools.
See the Supercharging AI Agents troubleshooting section for MCP connection issues. Verify the project has completed ingestion by calling list_projects and checking the status.