Module 05 Activity
Scenario
The crew is about to be trusted with something that cannot be undone. This is the layer that makes that defensible.
What you build
A guardrail that fails closed, assertions in callbacks, one well-placed human gate, and rejections an agent can act on.
Steps
- Write a guardrail checking parse, shape and policy, with the policy limits as data at the top of the file.
- Wrap it so that an error in the check BLOCKS rather than allows. Prove it by breaking the checker deliberately.
- Attach assertions to task callbacks - including one that flags hedging language in a decision output.
- Sort your steps by reversibility and place the minimum number of gates, immediately before the irreversible steps.
- Design the rejection format with three fields: what was wrong, what is correct, what to do next. Use it for human reviewers too.
- Measure what happens after a rejection - does the retry differ from the first attempt?
Evidence to hand in
- The guardrail with policy limits as data.
- Evidence that a broken checker blocks rather than allows.
- The callback assertions and what each catches.
- The reversibility table with the chosen gates.
- The three-field rejection form.
- Before-and-after outputs for one rejection.
Review checklist
- Policy limits are data, not prompt text.
- The guardrail fails closed, demonstrated by breaking it.
- One callback assertion catches hedging in a decision output.
- Gates sit immediately before irreversible steps, and the count is minimal.
- The retry after a rejection is measurably different from the first attempt.
