# Defensive Programming
Source: https://humanspark.ai/frameworks/defensive-programming/

*Wrap unpredictable AI in predictable checks before anything acts.*

**When to use:** Designing any AI workflow where a wrong output could do real damage.

Predictable software checks *unpredictable* AI.

Validate the output against rules before anything happens downstream - and never give the AI a button that acts on its own. The AI drafts; a human or a hard rule controls the irreversible step.
