Technical debt = the cost of past shortcuts. In Salesforce: schema sprawl, deprecated automation tools, complex flows, custom code that should have been declarative, untested code, stale fields, unused customisations.
Identify:
- Custom field count per object — when nearing 500/800 limit.
- Active flow count per object — when many overlap.
- Apex test coverage — below 75% blocks deploys.
- PMD / static analysis findings — identifies anti-patterns.
- Salesforce Optimizer — built-in debt analyzer.
- Field utilisation — fields rarely populated.
- Code duplication — copy-pasted logic.
- Process Builder still active — end-of-life tool.
- Manual deployments — vs DX-driven.
Quantify:
- Maintenance hours spent on debt (vs feature work).
- Incidents traced to debt-related root causes.
- Time-to-deploy trending.
Communicate:
- "We can't ship X next quarter because we need to address Y" — tie debt to business outcomes.
- Show stakeholders concrete examples of debt's cost.
Address:
- Tech debt sprints — dedicated capacity (10-20% of team time).
- Quarterly cleanup — concentrated effort.
- As-you-go — every new feature includes cleanup of related debt.
- Major modernisation — periodic large investment to address accumulated debt.
Prioritisation:
- High-friction debt — blocks new work or causes incidents.
- High-leverage debt — fixing it unblocks many things.
- Low-cost debt — opportunistic.
- Cosmetic debt — only address when adjacent.
Common debt categories in Salesforce:
- Process Builder + Workflow Rule still in use; should migrate to Flow.
- Aura components that should migrate to LWC.
- Visualforce pages with no Lightning equivalent built.
- Custom code for what's now native.
- Deprecated AppExchange packages lingering.
- Profile sprawl — many similar profiles, should be permission set groups.
- Org-wide defaults that don't reflect current security stance.
Anti-patterns:
- Ignoring debt — accumulates exponentially.
- Address-it-all-at-once rewrite — risky, expensive.
- Tech debt sprints without measurement — work done but no visible improvement.
Senior architects normalise tech debt management as ongoing operational practice. Without it, orgs stagnate.
The senior insight: tech debt is OK in moderation, lethal at extreme. A little debt is the cost of velocity. Too much, and velocity collapses.
