A subclass that no longer differs meaningfully from its parent — an empty subclass, or one that overrides nothing the parent didn't already do.
A subclass that no longer differs meaningfully from its parent; the agent navigating the hierarchy traverses indirection for no behavioral variation.
A subclass that no longer differs meaningfully from its parent merges back in.
The subclass folds into the parent; the agent reads one class instead of a degenerate two-class hierarchy.
Before the refactoring
class Employee {}class FullTimeEmployee extends Employee {}
After the refactoring
class Employee {}
Readers navigate a hierarchy that adds no value; ceremony around construction and dispatch persists; future maintenance must touch both classes for any change.
The agent's reasoning pays the hierarchy ceremony cost on every reference; future maintenance touches both classes for any change.
Collapsing too eagerly destroys an extension point the team will later want — only collapse when the variant has been zero-sum for a sustained period.
If the subclass documents a future variation (extension point, planned divergence), collapsing destroys it; the agent that collapses without checking forecloses options.
Smaller hierarchy, less ceremony, fewer files to navigate.
Smaller hierarchy; less ceremony; the agent loads one class instead of navigating a degenerate two-class chain.
Collapsing a hierarchy whose subclass is currently quiet but documents a real future variation — destroys an extension point the team will need to re-introduce later at higher cost.
Collapsing subclasses that document planned future variation destroys extension points the agent will need to re-introduce later at higher cost.