What makes code good to change: naming, coupling, complexity, refactoring, and how slop gets in.
Every test passes, the agent says it is finished, and it is right. Three months later a small request takes all afternoon, because one rule now lives in four files and nobody can say which of them matter. Nothing failed along the way. No check turned red on the day that went wrong, because no check was looking.
This chapter takes one position: good code is code that is cheap to change. That matters more when something else keeps changing it. An agent will make the next change whether the code is ready for it or not, and it reads the mess afresh at the start of each session. It can also make code quietly harder to change at a rate no person could manage.
Be careful with what follows, because most of it is craft. These ideas come from people who wrote a lot of software and noticed patterns, and very few of them have been tested properly. Martin Fowler says of his own central belief, that design pays for itself, that "there is no objective proof that this phenomenon actually occurs." Experts disagree in writing, and this chapter shows you where.
Where a number exists, this chapter hands it to you to operate, including a case where its own author forced a score down and made the code worse. Knowing what a metric can't see is as useful as knowing what it says.