Imperative Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5156
Answer
Imperative Automation encodes the ordered actions required to perform a task, giving explicit procedural control over how state changes occur.
Remember
- Imperative ≠ non-idempotent automatically; procedures can check state and safely converge.
- Imperative ≠ manual; the steps are still software-executed and can scale rapidly.
- Explicit sequence ≠ complete state model; omitted preconditions can still make behavior context-dependent.
- Successful last step ≠ successful workflow if earlier partial actions left inconsistent state.
First checks
bash -n script.sh— syntax checkshellcheck script.sh— lint- Explicit checks before each step — guarded steps
Verify in this order
step 1 → step 2 → … (each guarded)
Where it usually breaks
An imperative workflow proves its encoded procedure ran; it does not prove the target was in a compatible starting state or that partial side effects were recovered.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Imperative Automation automation boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / inputs | Owner, scope and authoritative inputs are explicit and versioned where applicable | Hidden defaults, stale inventory or competing sources of truth |
| Decision / execution | Plan or decision is explainable and actions are bounded per target | Blind fan-out, implicit assumptions or success based only on executor status |
| State / verification | Target is re-observed and acceptance criteria prove the intended outcome | No read-back, perpetual drift, partial side effects or unresolved exceptions |
| Recovery / evidence | Retry, rollback or escalation behavior is defined and auditable | Unknown partial completion, unsafe retry or evidence lost during remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5156