I Do Not Automate the First Successful Run
I do not automate the first successful run.
The first success is seductive. A command worked, an agent completed the task, a deployment reached production, and the obvious next thought is: schedule it. Remove the operator. Turn the path into a button or a cron job.
I resist that move because one successful path proves only that the path exists. It says almost nothing about the shape of the inputs, the boundary of the side effects, or the failures that will appear when nobody is watching.
Automation multiplies a procedure. If the procedure is still partly intuition, automation multiplies hidden assumptions.
The first run discovers the path
On a first run, I am still solving the problem and observing the system at the same time. I notice that one configuration file is authoritative, that a generated directory must not be edited, that a provider sometimes returns an ambiguous result, or that a restart is safe only after a health check. Those facts are not incidental. They are the beginning of the operating contract.
A transcript cannot be that contract. It contains every detour, correction, and accidental success in one narrative. If I convert the transcript directly into a script, I preserve the route I happened to take rather than the conditions that made the route safe.
The first run should therefore produce observations, not automation:
input boundary what may vary?
effect boundary what persistent state may change?
success evidence what proves the intended outcome?
failure states what can remain unknown or partial?
recovery path what restores or reconciles state?
This is deliberately smaller than a platform design. It is enough to separate a repeatable operation from a lucky sequence of commands.
Repetition is not the gate; understanding is
I do not follow a literal “do it three times, then automate it” rule. Repetition helps, but a familiar mistake does not become safe through practice.
The gate is whether I can explain the operation without relying on memory between steps. A second run is valuable because it tests what changed. Did the same input produce the same kind of artifact? Did a cached result hide a missing dependency? Did the operator silently repair a precondition? Did the rollback instruction still work after state advanced?
By the time I automate, I want a compact readiness card:
automation_readiness:
trigger: "new localized article set is approved"
inputs:
- slug
- en_source
- ru_source
- zh_source
allowed_effects:
- install_three_source_files
- replace_static_output_after_build
success_evidence:
- build_exit_zero
- three_http_200_responses
- sitemap_and_index_entries
stop_on:
- pre_existing_target
- build_failure
- locale_parity_failure
recovery:
- restore_only_this_run
The example is close to how I think about publishing, but the pattern applies to migrations, model evaluations, dependency upgrades, and agent workflows. The card does not describe every implementation detail. It names the invariants that an implementation must preserve.
This is also why I prefer an IOSM cycle with a baseline, hypothesis, and gates over an agent instruction to “improve the system.” The cycle turns observations into artifacts before repeated execution turns them into policy.
An automated unknown is still unknown
The hardest case is not a clean failure. It is an operation that may have succeeded.
A timeout after an external API call does not tell me whether the effect happened. Retrying may repair transport or duplicate the effect. A deployment command may exit early while the service has already switched versions. An agent may stop before its final summary after changing files successfully.
Manual operation often hides these states because the operator investigates them in the moment. A script loses that judgment unless the uncertainty becomes explicit. Before automation, I need one of three things:
- an idempotent effect keyed by stable identity;
- a reconciliation query that reads the real target state;
- a stop state that refuses to guess.
Without one of them, retry is not recovery. It is another side effect launched from incomplete knowledge.
I have written before about unknown tool outcomes and intentional interrupts. The same principle starts earlier than runtime architecture: do not automate a step whose ambiguity is currently resolved only inside the operator's head.
Keep the observation layer after automation
Once the procedure becomes a script, I do not discard the manual understanding that produced it. I encode it as checks around the action.
A useful automation has four phases:
observe -> decide -> act -> verify
observe reads the current state and prerequisites. decide applies explicit admission rules. act performs a bounded effect. verify reads the target again rather than trusting the command's exit status.
The model may help in any phase, but it should not collapse them into one confident story. In an AI engineering runtime, the distinction between proposal and execution exists precisely because intelligence and authority are different responsibilities.
This structure may look slower than a single generated shell command. It is faster over the lifetime of the system because failures become local. I know whether the input was invalid, admission refused, execution failed, or verification disagreed. The automation has not merely removed keystrokes; it has preserved the operator's distinctions.
The right time to automate
I automate when the procedure has stopped teaching me essential facts about its own boundary.
That does not mean the world has stopped changing. It means change has somewhere explicit to appear: a rejected precondition, a versioned input, a failed gate, an unknown outcome, or a verification mismatch. New cases can extend the contract instead of being absorbed as another silent workaround.
The first successful run gives me confidence. The first explainable run gives me a candidate process. The first recoverable run gives me something worth automating.
I want automation to remove repetition, not judgment that the system has not yet learned to represent. So I wait—not for ceremony, and not for an arbitrary count, but until the path has edges.
Then I automate the edges too.