Chapter 11: Design

SOLID

Five design rules for code built from classes, under one acronym: Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion. They give you words for arguing about design.

Asking an agent to "apply SOLID" is a good way to get more classes. Ask for the one letter you need and say why. In a small codebase made of plain functions, several of the letters hardly apply.

Say it to your agent

“Don't apply SOLID in general. Tell me which one of its five rules this change breaks, on which line, and which future change that makes expensive. If you can't name that change, leave the code alone.”

The workshop

Name a word, or describe what you mean in everyday language.