Unit 07.03: Choosing the step that needs a human
Which steps get a human gate is a design decision with a clear criterion, and adding more gates makes review worse rather than better.
Reversibility, and gate placement
Sort the steps by how hard they are to undo. Reversible steps do not need a gate; irreversible ones do, and the gate goes immediately before them.
The code sorts five steps of a support workflow.
STEPS = [
("fetch the account record", "reversible", "no"),
("draft the reply", "reversible", "no"),
("issue a refund", "hard to reverse", "yes"),
("send the reply to the customer", "irreversible", "yes"),
("write an internal note", "reversible", "no"),
]
print(f"{'step':34} {'reversibility':17} human?")
for step, reversibility, needs in STEPS:
print(f"{step:34} {reversibility:17} {needs}")
gates = sum(1 for _, _, n in STEPS if n == "yes")
print(f"\n{gates} gates out of {len(STEPS)} steps")
print("""
Place the gate immediately before the irreversible step, not at the end of the
run. A review that happens after the email was sent is a notification.
And keep the count low. A workflow that pauses five times is not reviewed more
carefully -- reviewers approve everything by the third gate.
""")
Two gates out of five steps. Both sit directly before something that cannot be taken back - issuing a refund and sending a message to a customer.
Placement is as important as selection. A review at the end of the run, after the email has gone out, is a notification. The gate has to be at the last moment where stopping still prevents the consequence.
The mistake this prevents
The mistake is adding gates for safety in proportion to anxiety rather than to reversibility. A workflow that pauses five times is not reviewed five times as carefully - reviewers approve everything by the third gate, and the two that mattered get the same reflexive click as the three that did not.
Takeaway
Gate on irreversibility, and place the gate immediately before the irreversible step. Keep the count low: every extra gate reduces the attention paid to the ones that matter.
