Managing Technical Debt With Evolutionary Architecture and Fitness Functions

Intermediate · 18 min

Technical debt as a deliberate trade-off, not a moral failing, and fitness functions as the automated check that keeps architecture from drifting as it evolves.

Before thisArchitecture Decision Records and How to Argue a Trade-off

GOTO Conferences · 18 min

Managing Technical Debt With Evolutionary Architecture and Fitness Functions

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by GOTO ConferencesReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • Technical debt is a trade-off made deliberately under time pressure, not simply a synonym for bad code — the metaphor only works if someone knew they were borrowing and against what.
  • Debt taken on without anyone deciding to take it on isn't debt in the useful sense of the word, it's just an unrecorded liability — the fix is tracking it the moment it's incurred, the same way an ADR records a decision when it's made, not months later from memory.
  • Not all debt is equal: reckless-and-deliberate debt ("we know this is wrong, we don't care") is the kind to be most worried about, while prudent-and-deliberate debt ("we know the ideal design, we can't afford it yet, here's the plan to get there") is often the right call under real constraints.
  • Evolutionary architecture treats a system's ability to change as a property to design for explicitly, not an accident of how clean the code happens to be at any one moment.
  • A fitness function is an automated, objective check — a test, a static-analysis rule, a dependency-direction check — that runs continuously and fails loudly the moment a change violates an architectural characteristic the team decided actually matters, such as a module boundary or a performance budget.

Debt as a deliberate trade-off, not a verdict

Ward Cunningham coined “technical debt” as a financial metaphor with a specific shape: borrowing against the future is fine, even smart, as long as you know you’re doing it and you service the loan. The metaphor breaks the moment it’s used as a synonym for “code I don’t like” — that usage drains the word of its actual meaning and makes every disagreement about code quality sound like a crisis.

The useful version distinguishes debt by whether it was deliberate and whether it was reckless, which produces four combinations worth naming explicitly:

  • Prudent and deliberate — “we know the better design, we don’t have time for it now, and we know exactly what we’re trading away.” This is often the right call, made consciously, by people who understand the cost.
  • Reckless and deliberate — “we don’t have time to do this right, and we don’t care.” This is the kind of debt that actually threatens a system’s long-term health, because nobody involved intends to pay it back.
  • Prudent and inadvertent — “now that we’ve built it, we know how we should have designed it.” Learning this only after shipping is normal; it only becomes a problem if the new knowledge never gets acted on.
  • Reckless and inadvertent — “what’s a layer?” This is a knowledge gap, not a trade-off, and no amount of “paying down debt” language fixes it — it needs mentorship and review, not a backlog item.

The practical discipline that falls out of this: track debt the moment it’s taken on, not months later from memory. A trade-off made consciously and recorded — “we’re shipping with a synchronous call here instead of a queue because we don’t have time to build retry logic this sprint, and here’s the ticket to fix it” — behaves like a prudent loan with known terms. The same shortcut, taken silently and never written down, is a liability nobody can see coming until it causes an incident. This is the same discipline architecture-decision-records-and-tradeoffs teaches for decisions generally, applied specifically to the moment a corner gets cut.

Evolutionary architecture: designing for change as a property, not an accident

Most systems are expected to change for years after they first ship, yet very few are explicitly designed with “the ability to change safely” as a property anyone engineered for — it’s usually left to how disciplined the team happens to be at any given moment, which decays as people rotate off the project and pressure to ship increases. Evolutionary architecture, the term Neal Ford, Rebecca Parsons, and Patrick Kua use for this, treats evolvability as a first-class architectural characteristic to design for deliberately, the same way you’d design explicitly for availability or security rather than hoping for it.

The core tool for doing that is the fitness function: an automated, objective test of whether the architecture still has a characteristic the team decided matters. A fitness function can check almost anything that can be made measurable — a static-analysis rule that fails the build if a module in the domain layer imports anything from the database layer (enforcing the inward-dependency rule from architectural-patterns-and-dependency-injection), a performance test that fails if p99 latency crosses a budget, a dependency-count check that fails if a service starts calling more than a sanctioned number of other services directly, a coupling metric that fails if two modules that were split apart start silently depending on each other again.

The key property that makes a fitness function different from a design guideline written in a wiki page is that it’s enforced automatically, continuously, as part of the same pipeline that already gates every change — not something a human has to remember to go check. A guideline that depends on a reviewer noticing a violation decays the moment review attention is thin, which is exactly when architectural drift is most likely to happen. A fitness function fails the build the same day the violation is introduced, which is early enough that fixing it costs almost nothing, instead of being discovered a year later when three more features have been built on top of the drift.

Where debt and fitness functions meet

The two ideas connect directly: a piece of prudent, deliberate technical debt is exactly the kind of thing worth protecting with a fitness function rather than a comment. If a team ships a shortcut knowing it needs to be revisited once a dependency becomes load-bearing, a fitness function that fails once that dependency crosses a threshold (a call volume, a data size, a number of consumers) turns “we’ll fix this eventually” from a hope into an automatically enforced trigger. That’s the same instinct that makes an ADR useful — making an implicit, easily-forgotten decision explicit and checkable — applied continuously instead of once.

Check yourself

  1. 01Why does "technical debt" only meaningfully apply to a trade-off someone knowingly made?

    The term implies a choice to borrow time now against a cost paid later — code that is simply bad because nobody understood the problem isn't debt in that sense, it's a mistake, and treating the two the same way hides which issues were accepted trade-offs and which were accidents worth actually fixing at the root.

  2. 02What distinguishes prudent-and-deliberate technical debt from reckless-and-deliberate technical debt?

    Prudent-and-deliberate debt comes with a known correct design and a real plan to get there once time allows; reckless-and-deliberate debt is taken on knowing it's wrong with no intention of ever paying it back, which is the kind that actually threatens the system's health.

  3. 03What makes a fitness function different from a manual architecture review?

    It's automated and runs continuously as part of normal delivery — a test or static check that fails the build the moment a change violates a stated architectural characteristic — rather than relying on a human remembering to check for the violation during an occasional review.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark