Compare
Symptom
Human

A class or interface with multiple cohesive sub-concepts inside it — Person carrying officeAreaCode + officeNumber + telephoneNumber() method, where Phone is hiding.

Agent

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.

Goal
Human

A cohesive sub-concept inside a class or interface becomes its own type with its own name, fields, and methods.

Agent

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; }
Example source: Illustrative example written for this site, not a quotation from any source.
Pressure
Human

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.

Agent

The agent's reasoning context per method inflates with unrelated members; changes to one concept require reasoning about all of them.

Tradeoff
Human

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.

Agent

Extracting too eagerly — 1-2 fields with no behavior — adds a file the agent must load with no encapsulation gain.

Relief
Human

Each type has one purpose; tests target the small unit; the parent type shrinks.

Agent

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.

Trap
Human

Extracting when the candidate concept is just 1-2 fields without behavior — adds a file with no encapsulation gain.

Agent

Extracting candidate concepts that are just trivial field groups creates files the agent must navigate without buying any encapsulation gain.