Creates boundary-point validation contracts, defines invariant-based success criteria, and sets up automated verification probes so reliability workflows trigger on objective evidence rather than intuition. Use when designing robust handoff, memory-persistence, or tool-call reliability workflows; when you need to verify handoffs work, check memory persistence, validate tool calls succeeded, or convert vague reliability goals into concrete, testable checks at each boundary point with explicit failure-class mapping (operational vs. critical); or when you want to test your workflow end-to-end, make sure it works, or verify your automation runs correctly using read-back probes and escalation triggers rather than agent confidence. Includes explicit untrusted-content/prompt-injection guardrails for third-party inputs.
96
Quality
90%
Does it follow best practices?
Impact
98%
1.25xAverage score across 9 eval scenarios
Convert vague reliability goals into explicit, testable checks.
For each boundary, include:
| Boundary | Required Invariants | Verification Probes | Failure Class | Escalation Trigger |
|---|---|---|---|---|
| File handoff | Path(artifact).exists() · file size > 0 · checksum matches | Read-back: re-open and hash; schema: json.loads(content) | Missing file → critical; bad schema → operational | Retry once, then halt and report |
| Tool call | HTTP status 2xx · response has required fields · latency < threshold | Re-fetch result; validate required keys present | Non-2xx → operational; missing fields → critical | Escalate after 2 consecutive failures |
| Memory resume | Key exists in store · timestamp < max_age · value deserialises | store.get(key) returns non-null; replay test question | Stale entry → operational; missing key → critical | Force re-computation before proceeding |
# Artifact exists and is readable
assert Path(artifact).exists(), f"Artifact missing: {artifact}"
# Schema valid (JSON)
data = json.loads(Path(artifact).read_text())
# Timestamp fresh (within 5 minutes)
assert (time.time() - data["timestamp"]) < 300, "State is stale"
# Checksum matches
assert hashlib.sha256(content).hexdigest() == expected_hash, "Checksum mismatch"