Pcornel
Automation · Automation Fundamentals

Imperative Automation

Cheat sheet · https://pcornel.dk/topic.php?topic=5156

Back to the Topic

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 check
  • shellcheck 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

BoundaryHealthy evidenceSuspicious evidence
Intent / inputsOwner, scope and authoritative inputs are explicit and versioned where applicableHidden defaults, stale inventory or competing sources of truth
Decision / executionPlan or decision is explainable and actions are bounded per targetBlind fan-out, implicit assumptions or success based only on executor status
State / verificationTarget is re-observed and acceptance criteria prove the intended outcomeNo read-back, perpetual drift, partial side effects or unresolved exceptions
Recovery / evidenceRetry, rollback or escalation behavior is defined and auditableUnknown 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

Confirmation

Confirm action

Continue?