Skip to content
Ameen Abozaid
MID-063

Technical documentation

  • 7 Lessons
  • 3 h practice (estimate)
On this page 8 topics

Overview

Topics

  • ADRs
  • RFCs
  • sequence diagrams
  • C4 diagrams

Learn first

3 h of practice (estimate)

Learning outcomes

  1. Write ADRs capturing context, options, decision, and consequences.
  2. Write an RFC/design document for a change that needs review before building.
  3. Draw C4 context, container, and component diagrams and sequence diagrams as code (Structurizr, PlantUML, or Mermaid).
  4. Write an operational runbook for a known failure.

Lessons

  1. 01Documentation that gets read
  2. 02Architecture decision records
  3. 03RFCs and design docs
  4. 04C4 diagrams
  5. 05Sequence diagrams
  6. 06Runbooks
  7. 07Demo: C4 diagrams of Shop Platform as code

Lab and exercises

Lab

MID-063-LAB1 · Shop docs

Outcomes: 1–4 · Time: ~3 h

  1. Produce C4 level 1, 2, and 3 diagrams as code, with titles and legends.
  2. Draw sequence diagrams for the order saga: happy path and one compensation path.
  3. Write ADRs for the five biggest Shop decisions, each with real alternatives and consequences.
  4. Write runbooks for three alerts.
  5. Give the docs to a peer unfamiliar with Shop with ten questions.

Acceptance: the peer answers the ten questions using the docs alone.

Exercises (assessment: documentation review; five exercises)

IDOutcomeTask
MID-063-EX011Review a diagram without a legend; list five things a reader cannot know and fix them.
MID-063-EX021Write an ADR for "outbox instead of dual writes", with at least two alternatives and consequences.
MID-063-EX032Write a one-page RFC outline for adding returns and refunds to Shop, including goals, non-goals, and rollout.
MID-063-EX043Draw a C4 container diagram of Shop as code and a Mermaid or PlantUML sequence diagram for payment failure.
MID-063-EX054Write a runbook for the alert "consumer lag above threshold for 10 minutes".
Show solutions
  • EX01 Unknown: meaning of shapes, sync versus async, technology, owner or date, scope. Fix with a legend, labeled arrows, title, and date.
  • EX02 Context: dual writes can lose events. Options: outbox, two-phase commit, best-effort publish. Decision: outbox. Consequences: relay to run, at-least-once delivery so consumers are idempotent.
  • EX03 Problem, goals, non-goals (for example no marketplace refunds), proposal, alternatives, risks, rollout in slices, open questions, reviewers and deadline.
  • EX04 Containers: web, gateway, orders, inventory, payments, Postgres, Kafka with labeled arrows; sequence shows PaymentFailed then ReleaseStock.
  • EX05 Symptom, impact, check lag dashboard and consumer logs, scale or restart consumer, check poison message and dead-letter topic, verify lag falls, escalation contact.

Quiz

Outcomes: O1 ADRs · O2 RFCs and design docs · O3 C4 and sequence diagrams as code · O4 runbooks.

A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.

  1. 1An ADR records:O1
  2. 2When should an ADR be written?O1
  3. 3An outdated ADR should be:O1
  4. 4An RFC is most useful for:O2
  5. 5A non-goal in a design doc states:O2
  6. 6C4 level 2 shows:O3
  7. 7Why keep diagrams as code?O3
  8. 8A sequence diagram is best for showing:O3
  9. 9A good runbook includes:O4
  10. 10Alerts should:O4

Practical part

Five exercises MID-063-EX01 to EX05 plus the lab. Pass: documentation review with no missing legends or alternatives, and a peer answering the ten questions from the docs alone.

Common mistakes

Diagrams with no legend; ADRs written after the fact without the alternatives.

Assessment

Documentation review (COM dimension).

Career relevance

Architecture documentation (SRC-010) and solution documentation (ARC-043).

Type to search levels, phases, modules and lessons.