Start every risky automation run by collecting read-only evidence. The goal is to understand the current state before allowing an AI agent to write files, move assets, change routes, publish content, or run commands with lasting effects.
Begin by identifying the target surface. For a website, that may be a page route, component, generated JSON file, content folder, stylesheet, or publishing report. For each target, inspect what already exists and record the result.
Use commands that observe rather than modify. List files, read relevant source, check generated records, inspect route output, and capture screenshots when the issue is visual. Avoid cleanup, regeneration, or formatting until the current state is understood.
After inspection, classify the situation. If the desired output already exists, verify it and stop. If part of the output exists, repair only the missing or incorrect portion. If the state is ambiguous, pause and ask for review rather than guessing.
Only then should the agent act. The change should be the smallest one that addresses the confirmed gap. Broad rewrites, unrelated refactors, and speculative cleanup should be avoided during the same run.
The playbook is complete when the agent can show three things: the pre-change evidence, the specific change made, and the post-change verification. That evidence trail makes automation safer to repeat and easier to audit.