“We have a lot of technical debt. How would you decide what to pay down?” It sounds like an architecture question, but the interviewer is listening for a leadership decision: can you distinguish an unpleasant codebase from a material risk, make an investment case without pretending the forecast is certain, and deliver improvement while the product keeps moving?

For senior and staff engineers, a strong answer is a compact operating plan: identify who pays the cost, compare it with other work, reduce the largest risk in small steps, and check whether the result changed.

The core move

Translate “old code” into a specific constraint on customer outcomes, delivery, reliability, security, or engineering capacity. Then propose the smallest safe change that tests whether removing that constraint is worth the investment.

What the interviewer is testing

The phrase technical debt can hide several different problems: a deliberate shortcut with known repayment cost, an accidental design defect, a dependency that has reached end of support, or a workflow that imposes recurring manual effort. Martin Fowler’s technical-debt quadrant is useful because it separates deliberate choices from inadvertent ones and prudent decisions from reckless ones. That distinction matters in an interview: the right treatment depends on how the constraint arose and what it now costs.

Interviewers are looking for judgment across four dimensions. First, do you start with impact rather than taste? Second, can you gather enough evidence to make a decision while acknowledging uncertainty? Third, do you understand the delivery and operational risks of changing a live system? Finally, can you align teams that have different incentives without treating product work and engineering health as enemies?

The evidence base supports that broader view. DORA’s 2024 research emphasizes user-centricity, stable priorities, and the tradeoffs that can accompany new tools; its research program treats technical capabilities and organizational conditions as interacting factors. The SPACE framework likewise warns that developer productivity cannot be captured by a single activity metric. Your answer should show a system of evidence, not “we wrote fewer lines” or “the team feels faster” alone.

That is why this prompt is a staff-level signal. A senior engineer can repair a difficult component. A staff engineer makes the constraint visible, finds the right boundary for investment, coordinates owners, manages rollout risk, and leaves behind a way to notice whether the system is healthier.

Define the debt before proposing a rewrite

Begin by narrowing the noun. “The monolith is a mess” cannot be prioritized. “Every change to the pricing path requires coordinated edits in four services and an overnight reconciliation because ownership of discount rules is split” is something a team can investigate. Describe the affected user or workflow, the repeated friction, and the technical mechanism you suspect is creating it.

Then classify the constraint. Is it making changes slower? Causing incidents or recovery difficulty? Blocking a product capability? Creating compliance or security exposure? Increasing cloud spend? Making onboarding and ownership fragile? Several effects may coexist, but name the one that best connects the proposed work to an outcome. Fowler’s discussion of technical debt also cautions that the financial metaphor is imperfect: interest is paid when future work touches the constrained area, not simply as time passes. So identify the work that repeatedly triggers the cost.

Separate debt from ordinary maintenance and from a preference for a newer stack. A supported library that nobody needs to change may be low priority; a compatibility shim blocking a committed feature may be urgent. “Modernize because it is old” does not establish why now. Look for a clear risk, product opportunity, or persistent friction signal.

Google’s SRE guidance defines toil as repetitive, manual operational work that does not create enduring value and can grow with the service. Its toil chapter encourages teams to recognize and manage that work; a Google Cloud measurement guide provides practical framing for identifying it. If your example involves recurring manual repair, say how often it occurs and which people or customers feel the effect. A clear category makes the rest of the answer sharper.

Build an evidence chain from friction to impact

Do not jump from a code smell to a business consequence. Build a short chain that another person can inspect: technical condition → repeated work or failure mode → affected outcome → plausible intervention. For example: an undocumented batch process has no idempotency guard; a retry after partial failure duplicates work; finance operations manually reconcile the resulting records; adding a durable checkpoint and a replay test may reduce that recurring cleanup. The example is hypothetical, but the reasoning is testable.

Use a mix of signals. For delivery friction, look at cycle time for changes in the affected area, review delays, build or test feedback time, rework, and how often work is blocked on the same dependency. DORA’s continuous-integration guidance describes the role of small batches and rapid feedback. Its documentation capability ties clear system knowledge to broader technical effectiveness. Metrics are clues to investigate, not a scorecard for individual engineers.

For reliability, connect incident reports and customer-facing service indicators to the component or dependency involved. Google SRE’s postmortem analysis explains how incident records can reveal recurring triggers and systemic causes. Its postmortem practices stress learning and follow-through, not blame. AWS’s availability guidance and availability-needs framework are useful reminders to make targets fit business criticality instead of assigning every system the strictest goal.

For security and compliance exposure, identify the control or vulnerability that the current design makes hard to address, who owns the risk, and what mitigation is available now. NIST’s Secure Software Development Framework gives teams common practices for reducing software vulnerability risk; its software supply-chain guidance connects those practices to producer and user responsibilities. In an interview, do not label a problem “security debt” as a rhetorical shortcut: name the weakness and the plausible exposure.

Be explicit about data quality. Tell the interviewer what is directly observed, what is inferred, and what you would measure next. If incident tagging is inconsistent, say so and propose a short baseline period or targeted log review. If the comparison is confounded by product mix or traffic growth, call that out. DORA’s monitoring and observability guidance emphasizes customer-experienced symptoms, useful debugging context, and trend visibility. Observability is valuable here because it turns an argument about architecture into an investigation of system behavior.

Prioritize by exposure, not by code smell

Once you have candidates, compare them in a way stakeholders can understand. A practical screen asks: how often does this constraint affect work or users; how severe is the impact when it does; how many teams or roadmap items depend on it; how confident are we in the evidence; and what is the cost and risk of reducing it? You can use a simple qualitative scale, but show the dimensions instead of hiding judgment inside a single decimal score.

Prioritization should combine urgency and leverage. A known vulnerability with a defined remediation deadline may need immediate action. A reliability issue consuming an agreed service objective may justify shifting capacity. A dependency slowing a strategically important roadmap could be worth a thin-slice investment even if it has not yet caused an outage. Google SRE’s SLO guidance and error-budget policy example show how teams can agree in advance on signals that change the balance of feature and reliability work.

Avoid turning the framework into a fake return-on-investment equation. In a live interview, you rarely have reliable inputs for precise savings, and the arithmetic can imply certainty that does not exist. Instead, compare plausible scenarios: leave the system as is, make a targeted intervention, or pursue a broader redesign. Include the opportunity cost of each and state what new evidence would change your recommendation.

Portfolio thinking helps when several debt items compete. Ask which one removes a repeated bottleneck across multiple initiatives, which one reduces a high-severity failure mode, and which one is a prerequisite for a committed product direction. A locally ugly module may be less valuable to change than a shared test environment that delays many teams. Google’s SRE chapter on recovering from operational overload is a useful reference for explaining why teams need space for long-term engineering work when interrupt load keeps preempting it.

Finally, state the decision rule. For instance: “I would first address the issue with the clearest user or control risk; among the rest, I’d favor the smallest item that unblocks a committed roadmap dependency and has a measurable signal.” A visible rule invites challenge and shows you can defer interesting work that is not worth its cost.

Choose a reversible first slice

When you recommend action, make the change small enough to learn from and safe enough to roll back. A useful first slice isolates one boundary, one workflow, or one failure mode. It might add a characterization test before refactoring a legacy calculation, introduce a compatibility adapter around an unstable dependency, automate one recurring operational task, or put a risky transition behind a feature flag. Explain why that slice will teach you something about the broader proposal.

Pair the implementation with a migration and safety plan. Cover data compatibility, backfill or replay, ownership, test coverage, observability, rollout stages, and the condition for pausing or reversing. AWS’s operational-excellence principles recommend frequent, small, reversible changes and learning from operational events. The broader Well-Architected pillars give a way to inspect the tradeoffs across operations, security, reliability, performance, cost, and sustainability.

Do not promise “no downtime” or “no regressions” unless you can support it. Describe the controls that reduce the chance and impact of failure: shadow reads, dual writes only with a reconciliation strategy, staged traffic, health checks, a rollback path, and a clear owner watching the rollout. AWS’s reliability framework emphasizes lifecycle operation and testing, while its resiliency guidance makes clear that resilience depends on the workload design and operating practices, not only the cloud provider.

Keep the product path open by sequencing the work around real commitments. Sometimes the safest answer is to build a narrow compatibility seam while a feature ships, then replace the underlying component after adoption is proven. Sometimes the exposure is so severe that the feature should wait. Demonstrate the decision by naming the risk, the deadline or customer promise, and the tradeoff you would take to the accountable product and engineering leaders.

Practice a sharper technical-debt answer

Turn a real project from your experience into a clear story about evidence, tradeoffs, rollout safety, and measurable impact. Interview Copilot helps you rehearse senior and staff-level technical prompts and refine your explanation.

Create a free account

Measure the outcome without gaming the team

Before starting, define what would count as improvement and when you will review it. Choose one or two leading indicators tied to the failure or friction, plus a guardrail that should not worsen. If the problem is a slow feedback loop, track time from change to useful test result alongside escaped defects. If the work targets recurring incidents, track the relevant incident class and user-visible impact alongside the cost of the new design. If it addresses operational toil, track recurring manual hours or ticket volume along with reliability and service quality.

Measure at the level where the intervention is supposed to work: a service, workflow, or team system, not an individual’s output. The SPACE research cautions against reducing productivity to one measure; a balanced view combines outcomes, activity, communication, efficiency, and well-being. DORA’s 2024 report also describes tradeoffs between AI adoption and delivery stability, illustrating why a single “speed” number can miss quality and reliability effects.

Use a before-and-after comparison carefully. Seasonality, workload mix, staffing, and other changes may explain part of the result. If you cannot run a clean experiment, make the limitations visible: compare similar changes, annotate incidents, and triangulate quantitative signals with feedback from the engineers and customers who use the system. Google SRE’s guidance on system simplicity frames simplification as a way to reduce engineering time and cognitive load; the practical test is whether the targeted workflow actually became easier to change or operate.

Keep a decision log with the initial hypothesis, baseline, scope, expected signal, guardrails, owner, and review date. If the signal did not improve, do not massage the metric to defend the project. Find out whether the intervention was too narrow, the original diagnosis was wrong, or the measure missed the outcome. That honesty is itself a senior-level behavior: technical investment is a hypothesis to test, not a referendum on who was right.

Make the case across product and engineering

Translate the same evidence for different stakeholders without changing the facts. Product partners may care about an upcoming capability and customer promise. Engineering leaders may care about delivery flow, reliability, and staffing. Security or compliance partners may need a control owner, exposure statement, and remediation path. On-call engineers may want to know whether the proposed change reduces pages or makes recovery easier. Bring those viewpoints into the decision early enough to avoid a technically elegant solution that solves the wrong problem.

A useful conversation has three options: keep the current constraint and accept its known cost; invest in a targeted fix; or make a larger change with a higher initial cost and different risk. For each, state what is known, what remains uncertain, and what decision has to be made now. AWS’s organizational guidance recommends shared understanding of business goals and stakeholder needs when setting priorities. That is a useful template for an interview answer: bring the right people into a transparent choice.

Use blameless language. “The previous team made a bad choice” creates defensiveness and usually obscures why the shortcut made sense at the time. Explain the original context, what changed, and why the old tradeoff no longer fits. Google’s postmortem guidance shows how learning-focused language helps teams convert incidents into corrective action.

Agree on capacity and ownership, not only approval. A vague statement that “we’ll reserve 20% for debt” can become a political slogan. Identify the team, the slice, the product outcome it enables, and the review point. If you do reserve capacity, explain how incoming risks can reprioritize it and how you will report progress in terms stakeholders recognize. The DORA Core Model connects technical capabilities to delivery, organizational performance, and well-being; use that as context, not as a claim that one refactor automatically creates a business result.

A 90-second interview answer

Keep the first response structured and brief, then invite the interviewer to choose where to go deeper:

Answer structure
  1. Clarify: “I’d first identify which user, delivery, reliability, or security outcome the debt is constraining.”
  2. Evidence: “I’d combine change-flow data, incidents or operational effort, and input from the teams affected; I’d separate observed facts from assumptions.”
  3. Compare: “I’d rank by severity, frequency, scope, confidence, and cost to reduce, while comparing against product commitments and other risks.”
  4. Act safely: “I’d select a small, reversible slice with an owner, migration and rollback plan, and clear guardrails.”
  5. Learn: “I’d define the before-and-after signal and review it at a set date; if it does not improve, I’d revisit the diagnosis.”

Then ground the structure in one true example. State the situation and why it mattered; show the evidence you gathered; describe the option you rejected and why; explain how you brought others along; and finish with the measured result and what you learned. Credit the team accurately and distinguish your contribution from the group’s. If the result was mixed, explain how you detected that and what you changed next.

Expect follow-ups such as “What if the team has no metrics?”, “How do you get roadmap capacity?”, “Would you rewrite it?”, or “What if leadership says no?” Answer with your decision process. For sparse telemetry, gather a narrow baseline and use incident or workflow samples. For capacity, show the opportunity cost and propose a bounded experiment. For a rewrite, compare migration risk and incremental alternatives. For a no, document accepted risk, ask what evidence or trigger would reopen the decision, and reduce exposure with the safest available mitigation.

How to practice this prompt

Prepare two examples: one where you addressed a reliability or operational constraint, and one where you improved delivery or reduced cognitive load. Choose cases with enough detail to explain the baseline, alternatives, coordination, rollout, and outcome. Avoid selecting only the largest rewrite on your résumé; a modest intervention with a clear causal story often gives you better evidence of judgment.

Rehearse a one-minute summary, a five-minute walkthrough, and a technical dive, keeping the same decision logic. Ask a partner to challenge your bottleneck diagnosis, stop condition, customer impact, and response to a worse metric. This exposes unsupported assumptions.

Use a lightweight scorecard after each practice round: Was the impact specific? Did the evidence support the claim? Were risks and alternatives concrete? Did the plan fit the authority and capacity available? Did the result include a measurable signal and an honest limitation? Revise only the weakest part, then answer a new version of the prompt so the framework transfers beyond one memorized story.

The central message is simple: senior engineers do not need to defend every compromise or promise a debt-free codebase. They need to make the cost of a constraint visible, choose a proportionate response, protect users while changing the system, and learn from the result. In an interview, that is what turns “I refactored a legacy service” into evidence of engineering leadership.

Build confidence before your next technical loop

Practice technical strategy, system design, and behavioral follow-ups with structured feedback tailored to your experience and target role.

Start practicing for free

This guide synthesizes published research and operational frameworks. Examples are illustrative; measure outcomes in the context of your own system, users, and constraints.