← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

Technical Debt

Code Quality PHP 5.0+ Intermediate
debt(d7/e7/b7/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). Tools like phpstan, phpcs, phpmd, and phploc can surface symptoms (complexity, style violations, lack of tests), but they measure proxies, not debt itself. Unacknowledged or undocumented debt — especially architectural shortcuts — remains invisible until a developer manually audits the codebase or pain accumulates in production. The detection is inferential rather than direct.

e7 Effort Remediation debt — work required to fix once spotted

Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix is framed at the process/tracking level ('add to backlog with business framing'), but actual remediation of accumulated technical debt typically spans multiple files, components, and sometimes architectural layers. The common_mistakes warn about 'debt sprints' not addressing root causes, implying debt repayment is rarely a localised fix and often requires sustained cross-cutting effort across the codebase.

b7 Burden Structural debt — long-term weight of choosing wrong

Closest to 'strong gravitational pull' (b7). Technical debt applies across web, cli, and queue-worker contexts (all PHP contexts), and the term's own metadata notes it 'compounds like financial debt' — every future change is shaped and slowed by existing debt. Debt in critical paths costs the most (common_mistakes), meaning it exerts gravitational pull on high-change areas, making every new feature harder and every refactor riskier over time.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap (a documented gotcha most devs eventually learn)' (t5). The canonical misconception is explicit: developers believe technical debt is always bad and must be eliminated, when in reality deliberate, time-bounded debt is a legitimate business decision. The trap is treating all shortcuts as equivalent — conflating managed debt with untracked debt. This is a well-documented industry gotcha that most developers encounter and eventually correct, but it causes real misalignment between engineering and business teams until learned.

About DEBT scoring →

Also Known As

tech debt code debt design debt

TL;DR

The accumulated cost of shortcuts, suboptimal decisions, and deferred refactoring — 'debt' that accrues interest over time as it slows development.

Explanation

Technical debt (Ward Cunningham's metaphor) describes the future work created by making expedient rather than optimal decisions. Like financial debt, small amounts can be strategic, but unmanaged debt compounds — each shortcut makes the codebase harder to change, slowing future development. Debt quadrants include: deliberate/prudent (known shortcuts), deliberate/reckless (cowboy coding), inadvertent/prudent (best practices evolved), and inadvertent/reckless (ignorance). Track debt explicitly, allocate time to pay it down, and never let it accumulate silently.

Common Misconception

Technical debt is always bad and should be eliminated. In reality, deliberate short-term debt (shipping faster to validate an idea) is a legitimate business decision — the problem is untracked or unacknowledged debt that compounds silently.

Why It Matters

Technical debt compounds like financial debt — small shortcuts accumulate interest in the form of increasing maintenance cost, defect rates, and developer friction until the debt is repaid or the system collapses.

Common Mistakes

  • Not tracking technical debt explicitly — unacknowledged debt is not managed or prioritised.
  • Treating all debt as bad — deliberate, time-bounded shortcuts are sometimes the right business decision.
  • Declaring 'debt sprints' without addressing root causes — debt that isn't tracked will return.
  • Allowing debt to accumulate in critical paths — debt in high-traffic, high-change code costs the most.

Avoid When

  • Using technical debt as an excuse to never refactor — debt must be actively managed, not accumulated indefinitely.
  • Taking on debt without documenting it — undocumented debt is invisible and never gets paid back.
  • Treating all shortcuts as debt — pragmatic decisions with known trade-offs are intentional, not debt.

When To Use

  • Deliberately when a deadline requires shipping quickly and there is a clear plan to repay the debt.
  • Tracking debt in a backlog with concrete remediation tasks — visibility is the first step to repayment.
  • Debt budgets — allocate a percentage of each sprint to debt reduction to prevent accumulation.
  • Before major feature work on a debt-laden area — pay the debt first or the feature will be harder.

Code Examples

✗ Vulnerable
// Deliberate but untracked debt — no ticket, no owner, no deadline:
function calculateTax(float $amount): float {
    // TODO: implement real tax logic
    return $amount * 0.2; // Hardcoded UK VAT — breaks for non-UK customers
    // No ticket linked, no one knows this exists
}
✓ Fixed
// Document debt explicitly — make it visible and trackable

// In code:
// TODO(2024-Q2): Replace O(n²) sort with priority queue (TICKET-1234)
// FIXME: Silently swallows errors — TICKET-5678

// In tech-debt.md:
# Technical Debt Register
## High Priority
- [ ] Split god class OrderManager into focused services (est. 5d)
- [ ] Replace raw PDO in UserRepository with typed query builder (est. 3d)

// PHPStan baseline — acknowledges existing debt, blocks new regressions:
$ vendor/bin/phpstan analyse --generate-baseline
# Baseline suppresses current errors; NEW errors still fail the build

Added 15 Mar 2026
Edited 25 Mar 2026
Views 152
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings F 0 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 1 ping W 1 ping T 1 ping F 1 ping S 1 ping S 0 pings M 2 pings T 0 pings W 1 ping T 0 pings F 0 pings S 2 pings S 0 pings M 1 ping T 0 pings W 1 ping T 0 pings F 0 pings S
No pings yet today
No pings yesterday
Scrapy 39 Amazonbot 10 Perplexity 9 SEMrush 9 Ahrefs 8 PetalBot 8 Google 6 Unknown AI 6 Bing 6 Majestic 2 Brave Search 2 Applebot 2 ChatGPT 1 Meta AI 1 Sogou 1 Twitter/X 1 Qwen 1 Baidu 1
crawler 109 crawler_json 3 pre-tracking 1
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: High
⚡ Quick Fix
Track debt explicitly in a backlog with business impact framing — 'this causes X minutes of developer time per sprint' not just 'this is messy code'
📦 Applies To
PHP 5.0+ web cli queue-worker
🔗 Prerequisites
🔍 Detection Hints
TODO/FIXME/HACK comments; code with no tests; high cyclomatic complexity; >6 months without refactoring
Auto-detectable: ✓ Yes phpstan phpcs phpmd phploc
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File Tests: Update


✓ schema.org compliant