A class or interface with multiple cohesive sub-concepts inside it — Person carrying officeAreaCode + officeNumber + telephoneNumber() method, where Phone is hiding.
A class or interface whose surface mixes multiple cohesive sub-concepts; the agent reasoning about any single concept must skim past the others to find what it needs.
A cohesive sub-concept inside a class or interface becomes its own type with its own name, fields, and methods.
Each type has one purpose; the agent loads a small focused file to reason about any single concept.
Before the refactoring
class Person {name;officeAreaCode;officeNumber;telephoneNumber() { return `(${this.officeAreaCode}) ${this.officeNumber}`; }}
After the refactoring
class Phone {areaCode;number;toString() { return `(${this.areaCode}) ${this.number}`; }}class Person { name; phone; }
The parent type's surface grows past what one type should own; tests touch unrelated concerns together; changes to one concept risk side effects on another.
The agent's reasoning context per method inflates with unrelated members; changes to one concept require reasoning about all of them.
Premature extraction adds ceremony — extract when 3+ fields and at least one operation cluster around a single concept that the parent type doesn't own.
Extracting too eagerly — 1-2 fields with no behavior — adds a file the agent must load with no encapsulation gain.
Each type has one purpose; tests target the small unit; the parent type shrinks.
Each type holds one responsibility's data and methods; queries about one responsibility load only its file, and the unrelated payload that previously sat in the same window for every read is gone.
Extracting when the candidate concept is just 1-2 fields without behavior — adds a file with no encapsulation gain.
Extracting candidate concepts that are just trivial field groups creates files the agent must navigate without buying any encapsulation gain.