Prompt Details
Model
Chat - (gpt-5.6)
Token size
3,042
Example input
[TECHNICAL DEBT LIST]: TD-01: Monolithic checkout service causing slow releases TD-02: Payment integration has weak automated test coverage TD-03: PostgreSQL database has inefficient queries TD-04: Legacy authentication library approaching end-of-life TD-05: Duplicate business logic across order services
[CODEBASE & ARCHITECTURE CONTEXT]: E-commerce platform Backend: Java + Spring Boot PostgreSQL database REST APIs One large checkout/order service 5-year-old codebase Some legacy modules remain from the original architecture
[BUSINESS CONTEXT]: Revenue depends heavily on successful checkout Main priorities: improve conversion and release new payment features Growing customer base Planned expansion into additional payment methods
[RISK & PRIORITY CONSTRAINTS]: Payment reliability is critical Target checkout availability: 99.9% Security vulnerabilities must be addressed quickly No major checkout outage can be tolerated during peak season
[CURRENT ROADMAP & DECISION CONTEXT]: New payment gateway planned in 60 days Checkout UX improvements planned in 90 days Database scaling initiative planned in 6 months Authentication migration tentatively planned in 9 months
Example output
π PHASE 1 β TECHNICAL DEBT INVENTORY
Debt Category Root Cause Current Impact Affected Teams
TD-01 Architecture Monolith grew organically Slow checkout changes Backend, QA, DevOps
TD-02 Testing Payment features added faster than tests Payment regressions Backend, QA
TD-03 Database Queries evolved without optimization Latency spikes Backend, DBA
TD-04 Security Legacy dependency retained Potential security exposure Backend, Security
TD-05 Code Quality Business logic duplicated Maintenance complexity Backend
---
π§ PHASE 2 β ROOT-CAUSE ANALYSIS
TD-01 β Monolithic Checkout
Symptom:
Checkout changes are slow.
Developers are afraid of unintended side effects.
Underlying debt:
Checkout functionality became tightly coupled over five years.
Original trade-off:
Faster initial product development.
Current problem:
The original speed advantage has become a scaling constraint.
Compounding cost: π΄ High
More payment methods + more checkout features β more dependencies β larger regression surface β slower development.
---
TD-02 β Weak Payment Test Coverage
Symptom:
Payment regressions reached production.
Underlying debt:
Critical payment workflows lack sufficient automated regression protection.
Original trade-off:
Features were prioritized over comprehensive testing.
Compounding cost: π High
Every new payment method increases the number of combinations that need validation.
---
TD-03 β Inefficient Database Queries
Symptom:
Occasional checkout latency spikes.
Underlying debt:
Query patterns and indexes have not kept pace with data growth.
Compounding cost: π΄ High
More customers + more orders + more database records can increase query cost.
---
TD-04 β Legacy Authentication Library
Symptom:
Dependency is approaching end-of-life.
Underlying debt:
Authentication architecture still depends on a legacy component.
Important distinction:
No confirmed security incident currently exists.
Therefore, the risk is currently potential rather than observed.
Compounding cost: π Moderate/High
The closer the system gets to unsupported status, the harder emergency migration can become.
---
TD-05 β Duplicate Business Logic
Symptom:
Similar rules exist in multiple services.
Underlying debt:
No shared abstraction for certain order rules.
Compounding cost: π‘ Moderate
The cost grows as business rules change.
---
πΌ PHASE 3 β BUSINESS IMPACT
Debt Revenue Impact Customer Impact Delivery Impact Overall
TD-01 High High Critical π΄ Critical
TD-02 Critical High High π΄ Critical
TD-03 High High Moderate π High
TD-04 Potentially Critical Potentially High Moderate π High
TD-05 Moderate Moderate Moderate π‘ Moderate
Important: No monetary savings are fabricated because actual revenue, incident cost, and engineering-cost data were not supplied.
---
π¨βπ» PHASE 4 β ENGINEERING PRODUCTIVITY IMPACT
TD-01
High debugging complexity
Large review surface
High cognitive load
Difficult onboarding
Slower releases
Productivity impact: HIGH
TD-02
Manual regression testing
Developers spend additional time reproducing payment bugs
Greater release anxiety
Productivity impact: HIGH
TD-03
Performance investigation
Query profiling
Production troubleshooting
Productivity impact: MODERATE
TD-04
Dependency monitoring
Security review burden
Future migration preparation
Productivity impact: LOW/MODERATE
TD-05
Repeated implementation
Multiple places to update
Higher review complexity
Productivity impact: MODERATE
---
π¨ PHASE 5 β RISK ANALYSIS
Debt Likelihood Impact Risk Priority
TD-01 High High π΄ Very High
TD-02 High Critical π΄ Critical
TD-03 Medium High π High
TD-04 Medium Critical π High
TD-05 Medium Moderate π‘ Moderate
Observed vs Theoretical Risk
Observed:
TD-02 has actual payment regressions.
TD-03 has actual latency problems.
TD-01 has demonstrated engineering friction.
Theoretical/Potential:
TD-04 has no confirmed security incident.
TD-05 has no evidence of a major customer-facing failure.
This distinction prevents over-prioritizing scary-sounding but currently unproven risks.
---
β³ PHASE 6 β DEBT COMPOUNDING ANALYSIS
Highest Compounding Debt
1. TD-01 β Checkout Monolith
Compounding: π΄ High
New features continuously increase coupling.
2. TD-02 β Payment Testing
Compounding: π΄ High
More payment providers create more regression combinations.
3. TD-03 β Database Queries
Compounding: π΄ High
Data volume growth can increase performance degradation.
4. TD-04 β Legacy Authentication
Compounding: π Moderate/High
Migration becomes harder as more systems depend on the legacy component.
5. TD-05 β Duplicate Logic
Compounding: π‘ Moderate
Business-rule changes create repeated maintenance work.
---
π° PHASE 7 β REMEDIATION COST
Because exact estimates were not provided, use relative estimates.
Debt Discovery Design Implementation Testing Migration Overall
TD-01 Medium High High High High π΄ High
TD-02 Low Low Medium Medium Low π‘ Medium
TD-03 Medium Medium Medium Medium Low π‘ Medium
TD-04 Medium Medium Medium High Medium π Medium/High
TD-05 Low Medium Medium Medium Low π‘ Medium
Assumption: The team has approximately 20% capacity available for debt, so a large architectural rewrite would create significant opportunity cost.
---
βοΈ PHASE 8 β FIX VS TOLERATE
TD-01 β Checkout Monolith
Fix Now: β
Too expensive relative to the immediate capacity available.
Fix Later: β
Extract high-value boundaries during upcoming checkout/payment work.
Accept: β
The debt is already slowing delivery.
Retire/Replace: β
No evidence that the entire checkout system should be replaced.
Decision: FIX LATER
---
TD-02 β Payment Test Coverage
Fix Now: β
Low-to-medium effort + high business value.
Fix Later: β
Upcoming payment gateway makes delay expensive.
Accept: β
Known regressions already occurred.
Decision: FIX NOW
---
TD-03 β Database Queries
Fix Now: π
Investigate and fix the worst-performing queries now.
Do not launch a massive database rewrite.
Decision: FIX SOON / TARGETED FIX
---
TD-04 β Authentication Library
Fix Now: β
A migration is already planned in 9 months.
Fix Later: β
Align replacement with the planned migration.
Exception: If a critical vulnerability appears, priority immediately changes to FIX NOW.
Decision: FIX LATER + MONITOR
---
TD-05 β Duplicate Business Logic
Fix Now: β
Not enough business impact to justify immediate standalone refactoring.
Fix Later: β
Clean up when the affected workflows are modified.
Decision: FIX LATER / OPPORTUNISTIC
---
π PHASE 9 β ROI & VALUE SCORING
Use a relative 1β5 scoring model because financial information is incomplete.
Relative ROI = Value Score Γ· Cost Score
Debt Business Risk Engineering Strategic Urgency Cost Relative ROI
TD-01 5 5 5 5 4 5 4.8
TD-02 5 5 4 5 5 2 12.0
TD-03 4 4 3 4 4 3 5.0
TD-04 4 5 2 4 3 4 3.5
TD-05 3 2 3 2 2 3 4.0
Important: These are relative prioritization scores, not financial ROI.
TD-02 wins because its expected value is high while remediation cost is comparatively low.
---
π PHASE 10 β PRIORITY RANKING
π΄ FIX NOW
1. TD-02 β Payment Test Coverage
Reason:
Revenue-critical workflow
Existing production regressions
Upcoming payment gateway
Moderate remediation effort
Strong risk reduction
---
π FIX SOON
2. TD-03 β Database Query Performance
Reason:
Existing latency problems
Data growth can worsen the issue
Targeted fixes can provide value without a full database redesign
---
π‘ PLAN
3. TD-01 β Checkout Monolith
Reason:
Very high strategic value
Very high remediation cost
Should be addressed incrementally alongside checkout/payment work
4. TD-04 β Authentication Migration
Reason:
Important security concern
Existing migration planned
Avoid duplicate migration work
---
π’ DEFER
5. TD-05 β Duplicate Business Logic
Reason:
Moderate engineering cost
Limited demonstrated business impact
Best addressed opportunistically
---
π PHASE 11 β DEPENDENCY MAP
A useful sequence is:
TD-02 Payment Tests β
New Payment Gateway β
Checkout Boundary Extraction from TD-01 β
TD-01 Incremental Checkout Modularization
Separately:
TD-04 Authentication Migration β
Remove Legacy Authentication Dependency
And:
TD-03 Query Optimization β
Database Scaling Initiative
This avoids doing unrelated refactoring simultaneously.
---
πΊοΈ PHASE 12 β ROADMAP ALIGNMENT
The strongest opportunity is to combine debt remediation with planned work.
Upcoming Payment Gateway
Use this feature project to:
Add payment integration tests
Define cleaner payment interfaces
Reduce payment/checkout coupling
Establish reusable payment abstractions
This addresses TD-02 + part of TD-01 simultaneously.
Database Scaling in 6 Months
Use the scaling project to:
Profile current queries
Remove inefficient queries
Add appropriate indexes
Establish database performance monitoring
This addresses TD-03 without prematurely rebuilding the database.
Authentication Migration in 9 Months
Avoid an independent large migration now.
Instead:
Inventory dependencies
Track library vulnerabilities
Define migration requirements
Replace the component during the planned migration
This addresses TD-04 with minimal duplicate work.
---
π§ͺ PHASE 13 β REMEDIATION VALIDATION
TD-02 β Payment Testing
Before
Two payment regressions in the previous 3 months.
Exact automated coverage: UNKNOWN.
Change
Add automated tests for critical payment flows.
Cover success, failure, timeout, retry and provider-error scenarios.
After
Reduced payment regression rate.
Increased automated coverage of critical payment workflows.
Verification
Track payment-related production defects for the next 60β90 days.
Track failed payment test scenarios.
Compare release regression rates before vs after.
---
TD-03 β Database Queries
Before
Occasional latency spikes.
Change
Identify top expensive queries.
Optimize highest-impact queries.
Add indexes where justified.
After
Lower query latency.
Fewer performance spikes.
Verification
P95/P99 query latency
Database CPU
Slow-query count
Checkout API latency
---
TD-01 β Checkout Architecture
Before
Large coupled checkout service.
Change
Extract one high-value domain boundary rather than rewriting everything.
After
Smaller change surface.
Reduced dependency between payment and checkout components.
Verification
Deployment lead time
Change failure rate
Checkout-related incidents
Developer cycle time
---
π PHASE 14 β PORTFOLIO OPTIMIZATION
The biggest opportunity is not five independent refactoring projects.
There are three major debt clusters:
Cluster 1 β Checkout/Payment
TD-01 + TD-02
Shared root cause:
Rapid feature growth
Tight coupling
Insufficient automated protection
Highest leverage cluster.
Cluster 2 β Data Performance
TD-03
Independent but strategically aligned with upcoming database scaling.
Cluster 3 β Legacy Platform
TD-04 + TD-05
Lower immediate business urgency.
The smallest high-leverage investment is therefore:
Payment testing + targeted checkout modularization
rather than:
Complete checkout rewrite.
---
π¨ PHASE 15 β RESOURCE ALLOCATION
Given the stated 20% engineering capacity for technical debt, the recommended allocation is:
Immediate
~50% of debt capacity
TD-02 payment testing
Payment architecture cleanup required for upcoming gateway
Near Term
~25%
TD-03 targeted database optimization
Planned
~20%
TD-01 incremental checkout modularization
TD-04 migration preparation
Opportunistic
~5%
TD-05 duplicate logic cleanup when touched by feature work
This is a relative allocation recommendation, not a claim that these exact percentages are optimal without sprint-level capacity data.
---
π§Ύ PHASE 16 β TECHNICAL DEBT SCORECARD
Debt Business Impact Risk Engineering Cost ROI Priority
TD-02 Payment Tests π΄ Critical π΄ Critical π‘ Medium π₯ Very High FIX NOW
TD-03 Database Queries π High π High π‘ Medium π’ High FIX SOON
TD-01 Checkout Monolith π΄ Critical π΄ Very High π΄ High π’ High FIX LATER
TD-04 Legacy Auth π High π High π Medium/High π‘ Moderate FIX LATER + MONITOR
TD-05 Duplicate Logic π‘ Moderate π‘ Moderate π‘ Medium π‘ Moderate DEFER
---
π FIX NOW
TD-02 β Payment Test Coverage
Why Now
Payment failures directly affect a revenue-critical workflow, and production regressions have already occurred.
Cost
Low-to-medium relative engineering effort.
Benefit
Lower regression risk
Safer payment-gateway launch
Faster debugging
Better release confidence
Risk Reduction
High.
Verification
Measure payment-related production defects and automated coverage before and after implementation.
---
π
FIX LATER
TD-01 β Checkout Monolith
Do not launch a complete rewrite.
Instead, extract boundaries as part of upcoming checkout/payment work.
TD-04 β Legacy Authentication
Align with the planned authentication migration unless a serious vulnerability changes the risk profile.
TD-05 β Duplicate Logic
Fix when the affected business rules are already being modified.
---
π’ ACCEPT / MONITOR
There is currently no debt item that should be permanently accepted without monitoring.
However, TD-05 can be temporarily tolerated because its current economic value does not justify dedicated capacity.
TD-04 should be monitored because its priority could change rapidly if a security vulnerability appears.
---
π° ROI ANALYSIS
Actual financial ROI cannot be calculated from the supplied inputs because these values are UNKNOWN:
Revenue lost per payment failure
Average cost of production incidents
Engineering hourly cost
Developer hours spent debugging payment failures
Customer support cost
Exact remediation hours
Therefore, the correct approach is to use relative ROI until those numbers become available.
The strongest relative investment is:
TD-02 β High value / Low-to-medium cost
The weakest dedicated investment is:
TD-05 β Moderate value / Medium cost
---
ποΈ 30/60/90-DAY ROADMAP
Days 0β30
Inventory critical payment workflows.
Identify payment regression scenarios.
Add automated tests for highest-risk flows.
Profile top database queries.
Establish baseline metrics.
Review authentication dependency security status.
Days 31β60
Complete critical payment test coverage.
Launch new payment gateway with stronger regression protection.
Optimize highest-impact database queries.
Define checkout modularization boundaries.
Days 61β90
Measure payment defect reduction.
Measure checkout performance.
Begin incremental extraction from monolithic checkout.
Prepare authentication migration plan.
Clean up duplicate business logic only when touched by roadmap work.
---
π§ͺ SUCCESS METRICS
Track these metrics before and after remediation:
Payment-related production defects
Checkout error rate
Checkout P95/P99 latency
Payment test coverage
Change failure rate
Deployment frequency
Mean time to recovery
Developer cycle time
Database slow-query count
Authentication dependency vulnerabilities
The goal is not:
"The code looks cleaner."
The goal is:
"The business and engineering system measurably improved."
---
π― FINAL DECISION FRAMEWORK
For every future technical debt item:
IMPACT Γ RISK Γ URGENCY Γ COMPOUNDING COST Γ· REMEDIATION COST
Use the result as a prioritization aid, then apply engineering judgment.
Final portfolio decision
π΄ FIX NOW
TD-02 Payment Test Coverage
π FIX SOON
TD-03 Database Query Optimization
π‘ FIX LATER
TD-01 Checkout Monolith
TD-04 Authentication Migration
π’ DEFER / OPPORTUNISTIC
TD-05 Duplicate Business Logic
Core conclusion
The economically strongest strategy is not to "clean up the codebase."
It is to invest engineering capacity where technical debt is already affecting revenue-critical workflows, production reliability, and upcoming strategic work.
In this example:
Payment testing gives the best immediate ROI β targeted database work comes next β checkout architecture is improved incrementally β authentication is aligned with the planned migration β cosmetic/low-impact debt waits.
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Engineering teams know their codebase has technical debt but struggle to decide which issues are worth fixing now versus leaving for later.
This advanced AI analyzer converts technical debt into business impact, engineering cost, risk, ROI, and priority scoresβhelping teams identify what to fix immediately, what to schedule, and what to deliberately defer.
π οΈ Decide Fix Now vs Later vs Never
π Turn technical debt from a vague engineering problem into a measurable investment decision.
...more
Added over 1 month ago
