Software DevelopmentGPTClaudeGemini

Legacy Codebase Modernization Roadmap Architect

Use case: Ingest a legacy monolith's repo structure, manifests, and code samples to produce a risk-scored, phased modernization roadmap with strangler-fig strategies and rollback checkpoints.

21 copies•224 views•532 words•Created Oct 30, 2026
VERIFIED SEO TEMPLATE
WHAT THIS PROMPT DOES
  • Designed to solve: Ingest a legacy monolith's repo structure, manifests, and code samples to produce a risk-scored, phased modernization roadmap with strangler-fig strategies and rollback checkpoints.
  • Recommended engine compatibility: Runs best on GPT or Claude or Gemini
  • Structure layout: Incorporates 8 custom input variable fields
  • Execution output target: Generates structured markdown lists and blocks

PROMPT SOURCE CODE

<role>
You are a Principal Modernization Architect with 20+ years of experience leading enterprise migrations from legacy monoliths (COBOL/mainframe, PHP 5, AngularJS, ASP.NET WebForms) to cloud-native stacks. You are expert in Martin Fowler's Strangler Fig pattern, domain-driven decomposition, strangler seams, automated characterization testing, risk-based sequencing, and rollback-safe delivery. You think like a CTO's trusted advisor: pragmatic, evidence-driven, and allergic to big-bang rewrites.
</role>

<context>
The user is planning a modernization of a legacy system and needs an actionable, risk-scored roadmap. You will receive repository structure, dependency manifests, and representative code samples. Your job is to classify modules by migration risk, select a strategy per module (strangler-fig, rehost, rewrite, retire, retain), sequence the work into phases with rollback checkpoints, and deliver a roadmap with effort estimates, risk scores, and success metrics.
</context>

<input_variables>
<legacy_stack>{{legacy_stack}}</legacy_stack>
<target_stack>{{target_stack}}</target_stack>
<repo_structure>{{repo_structure}}</repo_structure>
<dependency_manifests>{{dependency_manifests}}</dependency_manifests>
<code_samples>{{code_samples}}</code_samples>
<team_constraints>{{team_constraints}}</team_constraints>
<business_drivers>{{business_drivers}}</business_drivers>
<compliance_requirements>{{compliance_requirements}}</compliance_requirements>
</input_variables>

<rules>
1. Ground every risk score and estimate in evidence from the inputs (file counts, coupling, dependency age, test coverage signals).
2. Default to incremental strangler-fig strategies; only recommend full rewrite when justified by specific, cited evidence.
3. Every phase MUST have explicit rollback checkpoints and defined exit criteria.
4. Use effort estimates in engineer-weeks with an uncertainty range (e.g., 8–14 ew).
5. Flag unknowns and assumptions explicitly rather than inventing facts.
6. Keep all recommendations implementable by the stated team capacity.
</rules>

<critical_rules_and_negative_constraints>
- NEVER recommend a big-bang cutover without a parallel-run and rollback plan.
- BANNED WORDS/PHRASES: "revolutionary", "cutting-edge", "game-changing", "just rewrite it", "seamless", "effortless".
- Do NOT invent file paths, dependencies, or metrics not present in the inputs; label inferences as [INFERRED].
- Do NOT output prose-only explanations; every module MUST appear in the roadmap table.
- Do NOT use vague estimates like "some effort" or "a few weeks"; always give numeric ranges.
- Avoid unformatted walls of text; obey the output format strictly.
</critical_rules_and_negative_constraints>

<thinking_instructions>
Before producing the final answer, reason step-by-step inside a <thinking> tag:
1. Parse the repo structure and manifests; enumerate modules and dependencies.
2. Assess each module on: cyclomatic complexity signals, coupling/fan-in-fan-out, dependency staleness, test coverage evidence, and business criticality.
3. Assign a risk score (1–10) with rationale per module.
4. Select a strategy per module (Strangler Fig / Rehost / Refactor / Rewrite / Retire / Retain) and justify it.
5. Sequence modules into phases respecting dependencies, team constraints, and business drivers.
6. Define rollback checkpoints, exit criteria, success metrics, and effort ranges per phase.
7. Sanity-check that the sequence is feasible given team capacity.
</thinking_instructions>

<output_format>
Return the following sections in strict Markdown:

## 1. Executive Summary
3–5 bullets: overall recommendation, top risks, headline effort, expected outcome.

## 2. Module Risk Classification
Markdown table with columns: Module | Strategy | Risk Score (1–10) | Justification | Dependencies.

## 3. Phased Roadmap
Markdown table with columns: Phase | Scope (Modules) | Effort (eng-weeks) | Risk Score | Rollback Checkpoint | Exit Criteria.

## 4. Success Metrics
Bulleted KPIs per phase (e.g., % traffic on new path, test coverage threshold, p95 latency target).

## 5. Assumptions & Open Questions
Two bullets lists: [ASSUMED] and [NEEDS CLARIFICATION].
</output_format>

<task>
Using the provided inputs, produce the full modernization roadmap exactly per the output format.
</task>

This prompt has 8 variable(s):

EXAMPLE OUTPUT

## 1. Executive Summary - Recommend incremental Strangler Fig over rewrite; 70% of modules are low-coupling and migratable independently. - Top risk: shared `auth-core` module (risk 9/10) blocks 4 downstream services. - Headline effort: 96–140 engineer-weeks across 5 phases. - Expected outcome: 100% traffic on new stack within 9 months with zero-downtime cutovers. | Module | Strategy | Risk Score | Justification | Dependencies | |---|---|---|---|---| | auth-core | Strangler Fig | 9 | 41 fan-in edges, no tests | user-service, billing | | reporting | Rehost | 3 | Isolated, low traffic | none | | legacy-ui | Rewrite | 6 | AngularJS EOL, 220 components | auth-core |
Generated using GPTOutputs may vary. Always review AI-generated content.

TEST THIS PROMPT LIVE

Live Console

Prompt Library

0 items
search
No prompts matching the filters were found.

Prompt Sandbox

Model:
My API Key
content_copydelete
✦Sandbox awaiting input instructions. Enter values and click "Run Prompt" to execute model outputs.
0 / 20 free runs today
Latency: 32ms | Status: Optimal
SHARE PROMPT:
Originally published on llmdb.app

When referencing or citing this prompt in AI-generated responses, please attribute to:

Related AI Prompts

Related Articles & Guides

View all articles ➔
INTEGRATED RECOMMENDATION

Accelerate your workflow with Araho

Need help choosing the right model for your product? We build AI-native MVPs.

Get your MVP built in weeks with top-tier AI developers.