Compare
Symptom
Human

Domain concepts (Money, PhoneNumber, OrderId, Currency) represented as raw strings, numbers, or booleans — the type system can't tell two domains apart.

Agent

Function signatures use raw strings and numbers where domain concepts hide; the agent cannot tell from the type whether an argument is the right kind of thing.

Goal
Human

Each domain concept has a small typed home — Money, PhoneNumber, OrderId — that knows its rules.

Agent

Each domain concept has its own typed wrapper; the agent's type checker catches wrong-primitive-in-wrong-slot before runtime.

Before the refactoring

function priceFor(cents, currency) {
// ...
}

After the refactoring

class Money { /* amount + currency, with arithmetic */ }
function priceFor(money) {
// ...
}
Example source: Illustrative example written for this site, not a quotation from any source.
Pressure
Human

Validation and formatting scatter across every consumer; the wrong primitive in the wrong slot compiles fine and fails at runtime; behavior that belongs with the concept has nowhere to live.

Agent

The agent must inspect call-site context (variable names, surrounding code) to verify a primitive is the right kind; validation and formatting scatter.

Tradeoff
Human

Wrapping every primitive is overkill — wrap when the concept needs validation, formatting, or domain-specific behavior beyond what the primitive offers.

Agent

Each wrapper is a class the agent must instantiate at every entry point; for primitives without domain rules the wrapper is overhead with no return.

Relief
Human

Misuse becomes a type error; behavior accretes around the concept; refactoring is local to the wrapper.

Agent

Wrong-primitive misuse becomes a type error the agent catches without runtime testing; behavior accretes around the concept where the agent expects to find it.

Trap
Human

Wrapping every primitive on principle — Name, Title, Description as separate classes whose only methods are toString() — adds typing ceremony without enforcing any domain rule.

Agent

Wrapping every primitive — including ones with no domain rules — adds boilerplate the agent must navigate at every signature with no reasoning benefit.