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.
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.
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).
Tell me about a technical proposal or RFC you wrote for reliability work. How did you structure it, what convinced reviewers, and what would you change now?
Sample Answer
Direct answer
The proposal (an RFC, "request for comments": a written design put out for peer review before building) that I would describe was an illustrative composite: it fixed repeated overload of a shared job queue. I structured it around evidence from real incidents, three options compared on cost and risk, a phased reversible rollout, and success measures agreed up front. It convinced reviewers because it showed the failure reproduced, offered the cheapest fix first, and could be switched off. Today I would establish the baseline earlier and involve the most affected team sooner.
Structured elaboration (situation, task, action)
Situation. Several teams sent jobs to one shared queue. Roughly every two months, one tenant's (one team or customer sharing the platform) failing jobs retried in a tight loop, filled the queue, and delayed everyone else's work. Each time the on-call engineer (the person responsible for responding to alerts out of hours) drained the queue by hand.
Task. I owned the reliability of that queue and had to move the team from firefighting to a fix that other teams would accept, since some of them had to change their retry code.
Action. I wrote the RFC with these sections:
- Problem and evidence: three postmortems (written incident reviews) laid on one timeline, showing the same trigger each time. This made it a pattern, not an anecdote.
- Goals and non-goals: goal, one tenant can no longer delay others. Non-goal, rewriting the queue technology.
- Options: (a) per-tenant rate limits (a cap on how many jobs one tenant may submit per minute), (b) retry backoff with jitter (random delay so retries do not all fire together) plus a dead-letter queue (a holding area for jobs that keep failing), (c) migrate to a different queue product. I recommended a plus b, and rejected c as costing months for a problem we could fix in weeks.
- Rollout: a flag, shadow mode first (log what would be limited without limiting), then one tenant, then all.
- Success measures, defined before rollout: count of overload pages per quarter, and the age of the oldest waiting job. Written with a baseline and a target, for example (illustrative numbers): "baseline: 3 overload pages in the last two quarters, taken from the pager history; target: 0 over the next two; oldest waiting job under 10 minutes." Without the baseline, nobody can say later whether it worked.
- Risks and reviewers' asks: what each dependent team had to change.
Worked example: what convinced reviewers, and the result
- We reproduced it. I replayed recorded incident traffic in staging and showed the queue saturating (filling to capacity so nothing new could get through), then showed it holding with the limits on.
- Cheapest reversible option first. Shadow mode meant nobody had to trust the design; they could see its decisions before it acted.
- I pre-reviewed with the noisiest team. Their objection (a hard limit could drop legitimate bursts) became a design change: a burst allowance (letting a tenant briefly exceed its cap for a short spike, then refilling slowly).
- Result (qualitative): the overload pages stopped recurring in the following quarters, and the on-call runbook (the step-by-step guide an engineer follows when an alert fires) lost its manual-drain step (emptying the queue by hand). I would not quote a precise percentage I cannot reconstruct.
Trade-offs, pitfalls and what I would change now
- Change 1: capture the baseline before writing, not during rollout, so the "before" number is not a reconstruction.
- Change 2: bring the affected team in at the outline stage, not the draft stage. Their burst objection cost a rewrite that an earlier conversation would have avoided.
- Change 3: the first draft ran to eight pages; reviewers replied to the parts they read. A two-page body with an appendix got better comments.
- Change 4: add a date to review the outcome (say, 90 days) so the proposal is judged against its own success measures.
- A pitfall in telling this story: naming virtues ("I collaborated") instead of the specific action. Interviewers remember the timeline overlay and the shadow mode, not the adjectives.
On-call engineers want highly detailed runbooks, while auditors want concise documentation. How would you design the documentation for one system so it serves both without two copies drifting apart?
Sample Answer
Direct answer
I would keep one source of truth written for the on-call engineer (the detailed runbook, a step-by-step procedure for handling an operational task or incident) and generate the auditor's view from it, instead of maintaining a second, shorter document. Auditors rarely need less truth, they need a different entry point: which control (a required safeguard, such as "we can recover a failed service") is covered, who owns it, how often it is tested, and where the evidence is. Those are metadata and links, and they can be derived from the runbook, so nothing can drift.
Design
- Docs-as-code (documentation stored as files in version control and reviewed like code). The runbook is a Markdown file in the service's repository, so every change has an author, a review and a timestamp. That history is itself audit evidence.
- Structured metadata at the top of each runbook (front matter, a small block of fields the file starts with):
id: RB-PAY-014
title: Recover a failed payments-api instance
owner: payments-oncall
last_verified: 2025-06-02
verified_by: a.rivera
drill_link: https://wiki.example.com/drills/2025-06-02
control_ids: [IR-2, BC-4]
review_every_days: 90
- A generated audit index. A small script reads the fields and produces a table, so the auditor's page is regenerated on every merge and never hand-edited. The script runs in the same CI job as the checks below, reads every runbook file's front matter in the repository, and writes the table to the audit page. Here are the two runbooks' front matter blocks (the second one differs in
id: RB-ORD-003,owner: orders-oncall,last_verified: 2025-02-10,control_ids: [IR-2]) and the whole script, run with a fixed "today" of 2025-08-15. One trap worth knowing: PyYAML'ssafe_loadalready turns2025-06-02into a Pythondate, so callingdate.fromisoformaton it raises a TypeError.
import glob
from datetime import date
import yaml # PyYAML
today = date(2025, 8, 15) # fixed so the output is reproducible
print("| Runbook | Owner | Controls | Days since verified | Status |")
print("|---|---|---|---|---|")
for path in sorted(glob.glob("*.md"), reverse=True):
front = open(path).read().split("---")[1] # text between the first two --- lines
fields = yaml.safe_load(front)
age = (today - fields["last_verified"]).days
status = "STALE" if age > int(fields["review_every_days"]) else "current"
print(f"| {fields['id']} | {fields['owner']} | {', '.join(fields['control_ids'])} | {age} | {status} |")
The script reads every runbook file in the folder and prints one table row per runbook. The output:
| Runbook | Owner | Controls | Days since verified | Status |
|---|---|---|---|---|
| RB-PAY-014 | payments-oncall | IR-2, BC-4 | 74 | current |
| RB-ORD-003 | orders-oncall | IR-2 | 186 | STALE |
Age is the date difference. RB-PAY-014: June 2 to August 15 is 74 days, under its 90-day interval, so current. RB-ORD-003: February 10 to August 15 is 186 days, over 90, so STALE.
- Summary layer by link, not copy. An audit-facing page holds two to three sentences per control plus permalinks (stable links that keep pointing at the same section even if the page is renamed or moved) to the runbook section. It never restates steps.
- Evidence is produced by doing, not by writing. Drill records (dated records of a practice run, such as deliberately failing over a service to prove the steps work), CI results and incident tickets are linked from the metadata. Auditors trust a dated drill link more than a long paragraph.
- Enforcement in CI (the automated checks that run on every change): fail the build if owner or last_verified is missing, and open a ticket when an entry passes its review interval.
Worked example
Auditor asks: "Show me how you recover a failed payments instance and how you know it works." They open the index row for RB-PAY-014, see control IR-2 (an internal control ID), owner, verification date and the drill link, and click through to the exact steps. The on-call engineer never sees the audit wrapper and the auditor never has to read a 4-page procedure unless they choose to.
Trade-offs and what would change my call
- Generation adds tooling to maintain, which is worth it once there are more than a handful of runbooks.
- Metadata can become theatre (a show of compliance: dates bumped without real verification). Guard by requiring a linked drill or run record with the date, not just a field edit.
- If an audit regime (the rules an auditor applies and how often they check) demands frozen point-in-time documents (copies that show exactly what was true on one date and never change afterwards), I would tag a snapshot of the generated view at each audit period, keeping one source of truth.
- If the wiki has no version control, I would use page properties (structured fields attached to a wiki page, which play the role of front matter) plus a scheduled export (a job that copies the pages out on a timer), but I would still refuse two hand-written copies.
Pitfalls
- Writing the "short version" by hand once and promising to update it.
- Making the runbook shorter to please auditors, which harms the reader who needs it most under pressure.
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."
Unlock Full Question Bank
Get access to all 9 Technical Writing and Documentation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.