Building StareBrain, Part 22: Plan Validation — Checking Safety Before Execution Begins
Part 21 covered the planning layer: how a raw user instruction becomes an AgentTask with concrete AgentStep s. Today we add a step that happens between planning and execution — plan validation.
The problem: TaskPlanner can generate a step that would trigger ConfirmationGuard at runtime. That's late. We want to catch high-risk steps before the agent starts moving, not mid-task when the user is watching something execute.
Why Validate Before Execution?
If ConfirmationGuard fires mid-task, the user has to pause, evaluate a confirmation prompt, and decide whether to continue — in the middle of a sequence of actions already underway.…