Multiple conditions in sequence (or chained) leading to the same action — three guard clauses each returning 0, or three branches each running the same handler.
Multiple conditions in sequence lead to the same action; the agent must verify each branch leads to identical behavior and that adding a new condition won't accidentally diverge.
Multiple conditions leading to the same action collapse into one named predicate.
The predicate lives at one named function the agent reads once; edits to the rule land at the function definition and propagate to every caller through reference.
Before the refactoring
if (employee.seniority < 2) return 0;if (employee.monthsDisabled > 12) return 0;if (employee.isPartTime) return 0;
After the refactoring
if (isIneligibleForBonus(employee)) return 0;
The shared rationale is invisible; adding a new condition with the same effect means touching N places; bugs hide where one of the branches diverges accidentally.
Adding or modifying any branch's behavior requires the agent to update every branch consistently; the shared rationale is invisible.
Combining conditions can hide their independent reasons — only consolidate when they truly express the same business rule.
If the conditions encode independent reasons (different rules that happen to produce the same outcome today), collapsing them hides distinctions the agent will need to re-split later.
The shared rationale becomes visible and namable; new conditions extend one place instead of N.
The predicate lives at one named function; edits to the rule land at the definition and propagate through reference, removing the chance of one branch updating without the others.
Combining conditions that look the same but encode independent reasons — the consolidated predicate hides distinct rules that need to evolve separately.
Collapsing conditions that look the same but encode independent rules hides distinctions the agent will need to re-split when one rule evolves differently from the others.