Skip to main content

The Foreman Analogy

Think of Enact like a foreman supervising an AI carpenter. The carpenter is capable and fast, but needs oversight. When the carpenter says “I want to tear down this wall”:
  1. Permit check — Before any tool is picked up, the foreman checks the plans. Load-bearing? Utilities inside? Approved? If not: work stops, written reason recorded.
  2. Blueprint — If approved, the carpenter follows exact step-by-step instructions — not just “tear down the wall” but each specific action in order. No improvising.
  3. Work log — A signed record of every nail pulled, every stud removed, exact before-and-after state. Cryptographically sealed so it can’t be altered later.
  4. Change order — If the carpenter tore down the WRONG wall, the foreman issues a change order. Enact uses the work log to reverse every step and put it back.

The Four Pieces

PieceWhat it isAnalogy
PolicyA Python function that returns pass/failThe permit check
WorkflowA Python function that does the actual workThe blueprint the carpenter follows
ReceiptA signed JSON record of what happenedThe signed work log
RollbackOne call that reverses an entire runThe change order + teardown

How They Fit Together

Agent wants to do something
         |
         v
    +----------+
    | POLICIES |  <-- "Is this approved?" (permit check)
    +----------+
         |
    PASS |  BLOCK --> Receipt (denied + reason)
         v
    +-----------+
    | WORKFLOW  |  <-- "Follow the blueprint, step by step"
    +-----------+
         |
         v
    +----------+
    | RECEIPT  |  <-- "Signed work log — what happened, what changed"
    +----------+
         |
    if needed:
         v
    +----------+
    | ROLLBACK |  <-- "Change order — reverse every step using the work log"
    +----------+

Why This Matters

These weren’t bugs — the agents did exactly what they were told. The problem was no permit check, no work log, no way to undo it:
IncidentWhat HappenedSource
ReplitAgent deleted a production database containing data for 2,400+ executivesFortune, Jul 2025
Amazon KiroAgent deleted an EC2 environment → 13-hour AWS outageAwesome Agents, Feb 2026
Claude CodeAgent ran rm -rf ~/ — wiped developer’s entire home directoryByteIota, Dec 2025

Dive Deeper