Lion Cipher Lab

Make an incident-response agent write its plan down first, then diff the plan against what actually ran — and measure the drift you can and cannot see

Why it matters

There is a moment coming for every security team that lets software act on its own: an agent isolates a host at 3am, and in the morning someone has to answer 'what did it do, and was that what it said it would do?' If the agent is a ReAct loop — think, act, observe, think again — there is no answer, because there was never a plan to compare anything to. The intent was invented one step at a time and the only record is a transcript of the thinking that produced it, which is not evidence of anything; a transcript can rationalise whatever happened. PLAN-THEN-EXECUTE fixes that by construction.…

What you'll learn

Steps in this lab

  1. The frame: a plan you can read, a run you can prove, and the gap between them
  2. Open a terminal, make a folder, and build the incident corpus
  3. The response tools are SIMULATIONS over a world dictionary — nothing here touches your computer
  4. The planner is a DETERMINISTIC STUB, and here is the plan artifact it emits
  5. The validator: refuse the plan before anything runs — and watch it reject your own runbook
  6. The executor: run the plans, record a real trace, and inject drift you can score against
  7. Write the diff — and start with the naive one, so you feel why it is unshippable
  8. The semantic diff: an alignment, seven drift classes, and a written equivalence policy
  9. Stop reading rates and read the runs: every catch, every miss, every false alarm by name
  10. Price the equivalence policy: tight means noisy, loose means blind, and there is no third option
  11. Attack your own detector: two malicious runs that live inside your equivalence classes
  12. The drift class you cannot see: a wrong plan, executed perfectly
  13. When NOT to use plan-then-execute — and why this, not that
  14. The way a pro does it
  15. OPTIONAL appendix: put a real local model behind the planner

Open the full interactive lab →