Use this when documenting automation so others can run, review and fix it.
Automation Documentation
Automation documentation explains what a job does, its inputs, outputs, dependencies, error messages, examples and rollback, so others can run, review and fix it without asking the author.
1. Automation documentation: README, runbooks, architecture, inputs/outputs, dependencies, examples, errors, rollback, change history.
2. Docs live with code.
3. Review in PRs.
4. Keep short and accurate.
5. Examples that work.
code + docs → reviewed together → users
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Record runbook/version, execution ID, operator/request ID and target object identifiers; inspect the runtime/control-plane result; then query the documented operational outcome and the systems modified by the runbook through an independent read path and compare it with the versioned intent.
Step 2 Where it fails Narrow the fault
Common failure classes include stale documentation, hidden prerequisites, copy/paste ambiguity, unreviewed examples, broad parameters, irreversible steps and runbook completion without target verification. Before retrying a mutating operation, read current target state using the stable identity runbook/version, execution ID, operator/request ID and target object identifiers; if state is unknown, stop broad retries.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
A README is the first document in an automation repository: what it does, prerequisites, how to run it with an example, inputs and outputs, and where to get help.
Subtopic RunbookA runbook documents how to operate an automation: when to run it, how to start it, what to check, how to handle common failures and who to contact.
Subtopic ArchitectureArchitecture documentation for automation describes components, data flows, where the job runs, which systems it touches and how credentials are used, often with a simple diagram.
Subtopic InputsDocumenting inputs lists every parameter, its type, allowed values, default and whether it is required, so users know exactly what to provide.
Subtopic OutputsDocumenting outputs describes what the automation returns or creates — files, objects, IDs, reports and exit codes — so other jobs and people know what to expect.
Subtopic DependenciesDocumenting dependencies lists the tools, versions, modules, services, permissions and network access an automation needs, so it can be set up and run elsewhere.
Subtopic ExamplesExamples in automation documentation show real, copyable invocations with typical inputs and expected outputs, which is usually the fastest way for someone to use the job correctly.
Subtopic Error MessagesDocumented error messages explain what each error means and what to do, and good automation writes errors that name the failed step, the target and the likely cause.
Subtopic RollbackRollback documentation describes exactly how to undo an automation's changes, manually or with a rollback job, including when to roll back and how to verify the result.
Subtopic Change HistoryChange history documents what changed in an automation, when and why, through Git commits, pull requests and a changelog, so regressions can be traced and reverted.
- A README with one working example is the minimum.
- Document inputs, outputs, dependencies and rollback.
- Keep docs in the same repository as the code.
- README per automation repo — entry point
- Runbooks for operators — operations
- Docs reviewed with code changes — currency
ReferenceWhy it matters1 section · depth on demand
In depth
Automation documentation lets people other than the author understand, run, troubleshoot and safely change an automation. Without it, automations become black boxes that nobody dares to touch — or that someone runs incorrectly.
The topics in this group cover the essential parts:
| Document | Answers |
|---|---|
| README | What it does, how to start |
| Architecture | How it is built, what it depends on |
| Runbook | How to operate it and handle failures |
| Inputs/outputs | What it needs and produces |
| Examples | How to use it in practice |
| Rollback | How to undo its changes |
Keep documentation in the same repository as the code and update both in the same pull request, so they never drift apart.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Its durable intent is versioned runbook/procedure with parameters, prerequisites, permissions, steps, verification and rollback; the stable identity contract is runbook/version, execution ID, operator/request ID and target object identifiers. The consumer-visible target is the documented operational outcome and the systems modified by the runbook. The operating invariants are that inputs and prerequisites are explicit, steps are reproducible, dangerous scope is bounded, verification and rollback are executable and examples match current implementation.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Documentation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/enable-automation · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture at minimum runbook/version, request/execution ID, parameters, prerequisite results, step status, commands/actions, target IDs, verification evidence and closure state.