Technical Writing and Documentation Questions
The craft of producing durable, reference-quality written artifacts and keeping them accurate: READMEs and quick-start guides, design docs, RFCs and technical proposals, runbooks and deployment guides, model cards, datasheets and data dictionaries, bug reports and reproducible examples, postmortem write-ups, handoff documents, pull request descriptions, code comments, release notes, experiment reports, and knowledge-base articles. Covers structure and information design, writing for a specific audience and for future readers (including plain language and accessibility), templates and style standards, docs-as-code workflows with CI checks, testing of examples and snippets, documentation review and quality checks, versioning and freshness checks on the documents you own, keeping sensitive data out of docs, and measuring whether documentation works. Architecture decision records, API reference docs, PRDs and PR/FAQs, and live presentations are covered elsewhere.
Design a one-page postmortem template that works for both engineering readers and business stakeholders. Then fill in a short example for an outage that affected ten percent of users for three hours.
Sample Answer
Direct answer. A one-page postmortem answers, in plain order: what happened and how bad, why it happened, how we responded, and what we will change. A top block written for business readers (impact, duration, cause in one sentence, status) sits above an engineering block (timeline, root cause, contributing factors, action items). It is blameless: it describes systems and decisions, not individuals.
Template
TITLE / date / severity (how bad it was, on a scale such as SEV1 total outage to SEV3 minor) / author / status (draft, reviewed, closed)
SUMMARY (business readers): impact, duration, one-sentence cause, customer action needed
IMPACT: who, how many, what they experienced, measured how (include uncertainty)
TIMELINE (UTC): detection, escalation, mitigation, resolution
ROOT CAUSE and CONTRIBUTING FACTORS: technical cause, why it was not caught earlier
WHAT WENT WELL / WHAT WENT POORLY / WHERE WE GOT LUCKY
ACTION ITEMS: owner, due date, priority, how we will verify it worked
Example: an outage that affected ten percent of users for three hours (illustrative details)
Summary. On 14 March, 10% of users could not complete checkout for 3 hours (10:05 to 13:05 UTC). Cause: a configuration change reduced the connection limit (the cap on simultaneous connections the application may open to the database, also called pool size) on one of the ten database shards (the database is split into ten slices, each holding a share of users). Fixed by reverting the change. No data was lost. Affected customers were offered a retry link.
Impact. Users are assigned to shards by ID, so one shard of ten means about 10% of users. If we had 400,000 daily active users, that is roughly 40,000 users with failed checkouts; the estimate rests on the assumption that shard membership is even, and we checked actual failed-request counts in logs to confirm the range.
Timeline (UTC).
- 09:58 config change deployed to shard 7.
- 10:05 error rate on shard 7 rises; no alert fires (the alert threshold, the error level that triggers a page, covers the global rate only).
- 10:40 support tickets spike; the on-call engineer (whoever is currently responsible for responding to problems) is paged by support, not by monitoring.
- 11:20 root cause identified; 12:50 revert approved; 13:05 recovery confirmed.
Root cause and contributing factors. The root cause is the single change without which the outage would not have happened; contributing factors are conditions that let it last or go unnoticed. The change set the pool size too low for the traffic on that shard: the new limit was below what the shard needs even off-peak, and the old value had been sized for peak. Contributing: the global error-rate alert averages ten shards, so a 10% failure looks like noise; no canary (staged rollout to a small share first); the change review did not include capacity numbers.
What went well/poorly/luck. Well: once the revert was approved at 12:50, recovery was confirmed 15 minutes later. Poorly, three delays: 35 minutes from first errors (10:05) to the first page (10:40); 40 minutes from the page to an identified root cause (11:20), which is 75 minutes after the errors began; and 90 minutes from root cause to an approved revert (11:20 to 12:50). The approval delay is the biggest single lesson, since it was the longest wait and the fix was already known. Luck: it happened off-peak; at peak the same 10% of users would have seen failures on a larger share of their requests, and the pool would have been exhausted sooner.
Action items.
| Action | Owner | Due | Verified by |
|---|---|---|---|
| Per-shard error-rate alert | SRE | 2 weeks | Fire drill (a practice run that injects fake errors on purpose to see the alert fire) |
| Canary rollout for config changes | Platform | 6 weeks | Next change goes through canary |
| Capacity check in config review template | Engineering manager | 1 week | Template updated |
| On-call may revert a config change immediately, without waiting for approval | Engineering manager | 3 weeks | Written policy, then a timed revert drill |
Variants (same skeleton, different emphasis). Data-quality incident: replace "users affected" with which tables, which dashboards, and which decisions used bad numbers, and add a backfill plan. ML outage or recurring degradation: the impact includes a metric with a range ("precision fell 3 to 5 points, estimated from a labeled sample of 400 predictions"), the timeline includes feature snapshots and drift checks before and after, and the root-cause section separates data drift (inputs changed) from a code or pipeline change. The five-section short form is: what happened, impact, why, what we did, what changes, each opened with one sample sentence like "For 3 hours, 1 in 10 users could not check out."
What is the difference between a playbook, a runbook and a README? For each, say who reads it, what it contains, how often it needs maintenance, and a situation where you would choose it over the other two.
Sample Answer
Direct answer. All three are documents, but they answer different questions. A README answers "what is this and how do I start?", a runbook answers "what exact steps do I follow for this task or alert?", and a playbook answers "how do we handle this kind of situation, and who decides what?". Naming conventions differ between companies, so I state my definitions when I write one. In everyday terms: a runbook is an operating instruction sheet, like a recipe you follow exactly; a playbook is a team's game plan, which tells people their roles and when to make a call; a README is the front-door sign of a project.
| README | Runbook | Playbook | |
|---|---|---|---|
| Reader | New developer or user opening the repository | The on-call engineer or operator under time pressure | A team or incident commander (the person coordinating a response) plus other roles |
| Contents | What the project is, install and run, how to contribute, where to find more docs | Step-by-step commands for one procedure (restart a service, fail over a database), with checks and rollback | Higher-level plan for a scenario type: roles, decision points, escalation, communication, links to runbooks |
| Maintenance | Whenever setup or usage changes (on each pull request that alters them); reviewed each release | Every time the procedure or system changes, plus a periodic test (for example, quarterly, by running it) | After every real use or exercise, and at least yearly |
| Choose it when | You want a stranger to run the project in ten minutes | An alert fires and the response is a known, repeatable procedure | The situation needs judgement and coordination, such as a security breach or a regional outage |
Worked example: a payments service.
- README: "Payments API. Requires Python 3.12. Run
make dev. Tests:make test. Docs: link." - Runbook: "Alert: queue depth above threshold. 1. Check the consumer dashboard. 2. Run
kubectl rollout restart deployment/payments-consumer. 3. Confirm the queue drains within 10 minutes. 4. If not, roll back to the previous release (command)." Each step is unambiguous and checkable. - Playbook: "Suspected payment data leak. Incident commander declares severity. Security lead assesses scope. Legal decides on notification. Communications drafts customer message. Decision point: take the service offline? criteria listed." It links to the runbooks for isolating a host.
Choosing between them. If the reader must think, it is a playbook; if the reader must follow, it is a runbook; if the reader is arriving cold, it is a README. A typical mistake is writing a runbook full of judgement calls (it fails at 3am) or a playbook full of shell commands (it goes stale quickly).
How would you make technical documentation and runbooks easier to use for non-native speakers, junior engineers and people with accessibility needs? Give one example for each.
Sample Answer
Direct answer
I would design the document for the hardest reader first, since the fixes overlap: plain sentences, the reason behind each step, the expected result of each step, and information carried by text and structure rather than by colour, screenshots or idiom. Below is one concrete change for each group, all applied to the same runbook (a step-by-step guide for handling a known operational situation).
The starting text
Bounce the box if the queue is stuck (see red graph).
It uses slang, assumes knowledge, and relies on colour.
1. Non-native speakers: plain, literal, consistent language
- Avoid idioms and phrasal verbs ("bounce", "spin up", "kick off"), use one verb per action and one word per thing, and keep sentences short with no ambiguous "it".
- Use the exact label shown in the interface, in bold, so the reader can match it without translating.
- Example: replace "bounce the box" with "restart the worker service". The word "restart" is in dictionaries and translation tools and matches the command.
2. Junior engineers: context, the why, and the expected result
- Say where to run each command (which environment), why, what success looks like, and what to do if it does not.
- Example step: "Restart the worker to clear a stuck queue. This is safe: in-flight jobs are retried. Run
kubectl rollout restart deployment/queue-worker -n prod. Expected output:deployment.apps/queue-worker restarted. If you seeNotFound, check you are in the production cluster context and ask in the on-call channel."
What a junior needs to know to read that step: kubectl is the command-line tool for Kubernetes (a system that runs applications across many machines). A deployment is the named group of running copies of one application. -n prod picks the namespace (a named partition of the cluster) called prod. The cluster context is the setting that decides which cluster kubectl talks to, so checking it stops you restarting the wrong one. In-flight jobs are jobs being processed at that moment, and the on-call channel is the team chat room watched by the engineer currently responsible for incidents.
3. Accessibility needs: structure, and no information by colour or image alone
- Use real heading levels, descriptive link text (not "click here"), table header rows, and alt text (a short text description of an image) for every diagram. A screen reader (software that reads the page aloud) can only read what exists as text.
- Example: "the graph turns red" becomes "The Queue Depth chart is in alert when the line is above 10,000 messages for 10 minutes; its label then reads ALERT." The threshold is illustrative. It works for a person who cannot distinguish red, or uses a screen reader.
The revised runbook step
- Open the Queue Depth dashboard.
- If the line is above 10,000 messages for 10 minutes (label reads ALERT), restart the worker service:
kubectl rollout restart deployment/queue-worker -n prod. - Expected output:
deployment.apps/queue-worker restarted. Check that the depth falls within 5 minutes. - If not, escalate to the on-call lead (the person responsible for the incident decision that week).
How I would keep it that way
- A prose linter such as Vale (an open-source tool that checks writing against rules you define) can flag idioms and undefined acronyms in CI (continuous integration, the automatic checks that run on every proposed change).
- Have a junior colleague run the runbook in a test environment. Their questions are the bug list.
Trade-offs and pitfalls
- Over-explaining can insult experts. Keep the why short and let experienced readers skim, using a bold action line first and the context underneath.
- Machine translation can mangle code and labels, so wrap commands in code blocks that are never translated.
- Avoid a separate "accessible version" that will drift. Fix the one document.
Your infrastructure is ephemeral, for example disposable Kubernetes clusters. How do you keep runbooks and recovery procedures accurate? Discuss templates, capturing real cluster state as examples, anchoring the docs to infrastructure code, and how you test the steps.
Sample Answer
Direct answer
When clusters are disposable, a hand-written runbook is wrong almost immediately, so stop treating the doc as prose and treat it as a build artifact. Generate the environment-specific parts from the infrastructure code (IaC, meaning tools like Terraform or Helm, which define infrastructure in files), keep the doc in the same repository and version as that code, show real captured output rather than invented examples, and run the procedure against a fresh cluster on a schedule. If the run fails, the doc is stale, and you find out from a red build in CI (continuous integration, the automation that runs checks on every change) instead of a bad incident.
Terms in plain words
- Kubernetes cluster: a group of machines that runs containerized applications. A namespace is a named partition inside it (here, everything belonging to
payments). A pod is one running copy of an application, and it is Ready when it has started and passes its health check. - kubectl: the command-line tool for talking to a cluster. A context is a saved "which cluster am I talking to" setting, so
use-contextswitches clusters. - Velero: a Kubernetes backup and restore tool.
velero backup getlists backups andvelero restore create --from-backup Xrecreates the saved resources. - Terraform: a tool that builds infrastructure from code, and its outputs are named values (cluster name, bucket) it prints after building. A module is a reusable bundle of that code. Helm packages Kubernetes applications the same way.
- Tribal knowledge: things everyone on a team "just knows" but nobody wrote down.
1. Templates: separate the stable steps from the values that change
The sequence of steps (check backup, restore namespace, verify pods) changes rarely. Cluster names, regions and bucket names change with every cluster. Write the steps once as a template with placeholders, and fill the values in from IaC outputs at publish time. A missing value fails the build.
import json, re
from string import Template
# Shape of `terraform output -json`: each output is {"value": ..., "type": ...}
tf_outputs = json.loads("""{
"cluster_name": {"value": "prod-eu-3", "type": "string"},
"region": {"value": "eu-west-1", "type": "string"},
"backup_bucket": {"value": "s3://acme-velero-eu-3", "type": "string"}
}""")
values = {k: v["value"] for k, v in tf_outputs.items()}
runbook = Template("""## Restore namespace `payments` on $cluster_name ($region)
1. `kubectl config use-context $cluster_name`
2. `velero backup get` (pick the newest with status Completed)
3. `velero restore create --from-backup <backup-name from step 2>`
Backups live in $backup_bucket. Owner: $owning_team
""")
def render(t, vals):
try:
return t.substitute(vals)
except KeyError as e:
# CI fails here: the doc references a value the infrastructure code no longer outputs
return f"RENDER FAILED: template needs {e} but Terraform does not output it"
print(render(runbook, values))
print(render(runbook, {**values, "owning_team": "platform-sre"}))
It prints:
RENDER FAILED: template needs 'owning_team' but Terraform does not output it
## Restore namespace `payments` on prod-eu-3 (eu-west-1)
1. `kubectl config use-context prod-eu-3`
2. `velero backup get` (pick the newest with status Completed)
3. `velero restore create --from-backup <backup-name from step 2>`
Backups live in s3://acme-velero-eu-3. Owner: platform-sre
The first line shows the point: the template needed an owning_team that Terraform did not provide, so the build fails loudly instead of publishing a runbook with a blank owner.
2. Capturing real cluster state as examples
Invented sample output goes stale and can hide format changes. Instead, a CI job creates a throwaway cluster (for example with kind, a tool that runs Kubernetes inside containers), runs the read-only commands the runbook references (kubectl get nodes, kubectl get pods -n payments), and writes the output to files that the docs include. Each capture is stamped with the commit and date. Scrub secrets and account IDs in the capture step, not by hand.
3. Anchoring docs to infrastructure code
- The runbook lives beside the module that builds the cluster and is released with the same version tag, so "the runbook for module v1.14" is a real thing.
- Runbooks reference IaC names (module outputs, variable names), and a CI check scans the template for every placeholder and confirms each one still exists in the outputs. A minimal version, run for real after the bucket output was renamed:
import re
tf_outputs = {"cluster_name", "region", "velero_bucket", "owning_team"} # after the rename
runbook = "Restore on $cluster_name ($region). Backups live in $backup_bucket. Owner: $owning_team"
refs = set(re.findall(r"\$(\w+)", runbook))
for name in sorted(refs - tf_outputs):
print(f"runbook references '{name}' but Terraform no longer outputs it")
print("checked", len(refs), "references")
runbook references 'backup_bucket' but Terraform no longer outputs it
checked 4 references
- A pull request that changes a module output must touch or acknowledge the runbooks that use it (CODEOWNERS, a file that assigns required reviewers by path, makes the doc owner a reviewer). One line does it:
runbooks/restore-namespace.md @acme/platform-sremakes that team an automatically requested reviewer on any PR touching the file. It becomes a hard requirement only when branch protection has "Require review from Code Owners" enabled. Because a module-output change would not touch the runbook file, also add a CODEOWNERS line for the module path that requests the runbook owners, and the PR template asks "did you update or confirm the affected runbooks?", which is the acknowledge step.
4. Testing the steps
- Executable steps: each numbered step maps to a script or
maketarget, and a scheduled pipeline builds a new cluster, seeds sample data, runs the restore steps, and asserts the result (for example that the expected pods are Ready). - Game days (planned drills where a human follows the doc cold) catch what automation cannot: unclear wording, missing permissions, steps that assume tribal knowledge.
- Record time to complete and where the tester hesitated, then fix the doc, not the tester.
Worked example
The nightly pipeline stands up a clean cluster, restores a sample namespace from the newest backup, and asserts three pods reach Ready. One night a Terraform change renames backup_bucket to velero_bucket. The reference check fails the PR that made the rename, because the runbook still uses the old name. The author updates the template in the same PR. Without the check, the mismatch would have surfaced during a real restore.
Trade-offs and pitfalls
- Full automation of every step is expensive. Automate the recovery paths that matter most and rely on game days for the rest.
- Generated docs still need human sentences explaining why and what to do when a step fails. Generate values, hand-write judgement.
- A test cluster can differ from production (size, network, data), so state the gap in the doc rather than implying the drill proves everything.
- Old versions of the runbook must remain reachable for clusters that have not been rebuilt yet.
What makes a runbook usable by a tired on-call engineer in the middle of an outage? Walk me through the practices you follow when you write one for a data pipeline.
Sample Answer
Direct answer
A runbook is a step-by-step operating guide for one specific situation, usually opened from an alert. A tired on-call engineer (the person currently carrying the pager for the team) has almost no spare attention, so a usable runbook needs no interpretation: it starts from the alert they received, gives one action per step with the exact command, shows what a correct result looks like, and says plainly when to stop and call someone. For a data pipeline (a scheduled chain of jobs that moves and transforms data) I write each entry around a symptom such as "table not fresh by 06:00", never around the architecture.
Practices I follow for a pipeline runbook
- One entry per alert, linked from the alert itself. The page that fires should contain the URL of its entry, so nobody searches a wiki at 3 a.m.
- Symptom first, then a short decision path. Step 1 answers "is it still running, failed, or never started?" and each answer points to a numbered step. No background essays inside the steps.
- Exact commands and exact locations. Say where the command runs (a jump host, meaning a locked-down server you log into first to reach production, or a laptop with a named cluster context, the setting that says which cluster a command talks to) and paste it ready to copy, with placeholders in angle brackets.
- State the expected result after each step, so the reader knows whether to continue.
- Say whether an action is safe to repeat. Re-running a load is only calm if the job is idempotent (running it twice leaves the same data as running it once). Write "safe to repeat: yes, the load merges on order_id" or "NOT safe: creates duplicates, ask the owner first".
- Name the blast radius (how much else is affected if this breaks or your fix goes wrong): which dashboards, models or teams read this table, and who to notify.
- Escalation is a step, not an afterthought: after 30 minutes without progress, page the owning team, with the channel and rotation name (the rotation is the schedule that decides who is on call).
- Known failure table: last three real incidents as "log line seen, cause, fix", because pipelines fail in repetitive ways.
Worked example (illustrative excerpt)
ALERT: orders_daily table not updated by 06:00 UTC
Owner: data-platform-oncall Last verified: 2025-06-02 by a.rivera
Impact: finance dashboard and churn model read this table.
1. Is the run still going? (run from the jump host)
airflow dags list-runs -d orders_daily --state running
Rows returned -> wait 30 min, then go to step 4.
No rows -> go to step 2.
2. Open the DAG's runs in the orchestrator UI.
No run at all for today (it never started) -> check the DAG is not paused and the
scheduler is healthy, then go to step 4
A red (failed) run: open the failed task's log and match the last line:
"Connection refused ... source-db" -> source outage, go to step 4
"duplicate key" -> STOP, do not re-run, escalate
3. Clear (re-run) the failed task load_orders. Safe to repeat: yes (MERGE on order_id).
Expected: task turns green in about one normal run time.
4. Escalate to data-platform-owners if not green after 30 minutes.
Reading the excerpt: Airflow is a scheduler that runs a chain of jobs in order, and a DAG (directed acyclic graph) is one such chain of tasks with a fixed order and no loops. airflow dags list-runs -d orders_daily --state running lists the runs of the orders_daily DAG that are in progress right now. The orchestrator UI is Airflow's web page showing each task's status and logs. To "clear" a failed task means to tell Airflow to run it again. MERGE on order_id is a SQL statement that updates rows that already exist and inserts new ones, matched by order_id, which is why repeating it does not create duplicates.
Fields I validate before publishing (and re-validate on a schedule)
- A named owner that is a team or rotation, not a person who may leave.
- A last-verified date and who verified it, with a review interval (for example 90 days) after which the page is flagged stale.
- Tested commands: someone other than the author ran every command against staging or a copy and the output matched what the step promises.
- Links resolve, and the alert's runbook link points to this exact page.
Pitfalls
- Paragraph prose instead of numbered steps.
- "Check the logs" without saying which logs and what to look for.
- Commands that only work with context the author carries in their head.
- A runbook that has never been used under pressure. Run a drill and fix every place the reader hesitated.
Unlock Full Question Bank
Get access to all 12 Technical Writing and Documentation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.