Sub topic 2
Setting out the context and the problem
This chapter covers the second step in explaining a decision: describing the situation the decision answers. It assumes you have made or taken part in technical or project decisions, and that you know written team formats such as pull requests, design documents, and meeting notes. The previous chapter argued that reasoning matters as much as the decision itself. Here you learn how to write the context so that a reader can judge the reasoning for themselves.
Why context comes first
A decision is an answer. Without the question, a reader cannot tell whether the answer is good. "We will use PostgreSQL" is neither right nor wrong on its own. It is right or wrong for a particular team, deadline, workload, and set of risks.
The context section gives the reader the same view of the situation that you had when you decided. A reader who has that view can do three things:
- Check whether your reasoning follows from the facts.
- Notice facts you missed.
- Tell later, when circumstances change, whether the decision still holds.
The last point matters most over time. Six months after a decision, the team that made it may have moved on. The context is the only part of the record that tells a new reader what has changed since.
The parts of a context
A useful context has four parts. You do not need a heading for each one. You do need each one to be answerable from what you wrote.
- The problem. What is not working, or what is needed that does not exist yet? State it as a situation, not as a solution.
- The setting. The system, team, or product the problem lives in, with only the details that affect the choice.
- The forces. The facts that push on the decision: deadlines, skills, budget, existing systems, load, risk. The next chapter covers constraints and goals in detail. Here you only need to mention the ones that shaped the problem.
- The trigger. Why this decision is being made now and not earlier or later.
State the problem, not the solution
The most common mistake is to describe the problem in the shape of the answer. Compare these two statements.
- "We need a message queue."
- "Order confirmation emails are sent inside the checkout request. When the email provider is slow, checkout times out, and we lost about 40 orders last month this way."
The first statement has already chosen a solution. A reader cannot ask whether a queue is the best option, because the problem has been defined as the lack of one. The second names the actual failure, and several solutions fit it: a queue, a background job, a shorter provider timeout, or a different provider.
A quick test: if you can remove the proposed solution from the problem statement and the statement still makes sense, the problem is stated well.
Include only what bears on the choice
A context is not a history of the project. Each fact should be one that would change the decision if it were different. If the team had no PostgreSQL experience, would the choice change? Then include the team's skills. If the office is in Berlin, would it change? Probably not, so leave it out.
Too little context makes the decision look arbitrary. Too much hides the facts that matter. When you are unsure, include the fact and ask whether a reader could point to a place in your reasoning where it is used. If not, cut it.
Explain the trigger
Many problems exist for a long time before anyone decides anything. A reader will wonder why you are acting now. The trigger might be an incident, a deadline, a growth number crossing a threshold, a contract renewal, or the end of support for a tool. Naming it also helps with revisiting later, because a trigger often points to the conditions that would justify a new decision.
Separate what you know from what you assume
Context contains facts, and it also contains guesses that look like facts. "Traffic will triple by next year" is an estimate. "Traffic grew 20% last quarter" is a measurement. Both belong in the context, but a reader needs to see which is which.
A simple habit is to attach the source or the confidence to each important claim:
- "Profile reads are about 80% of database queries (from last week's query logs)."
- "We expect launch traffic to be about ten times current traffic (estimate from the marketing plan, not yet validated)."
A later chapter treats evidence and assumptions in depth. At this stage the rule is only this: do not let a guess pass as a measurement in the context section.
A worked example
Here is a weak context for a decision about release frequency.
We switched to weekly releases. Monthly releases were slow and caused problems.The reader cannot tell what "slow" means, what the problems were, or why the team acted now. Now a stronger version.
Until March we released once a month. Each release bundled roughly 60
changes. In the last three releases, a failure took between one and two
days to trace to its cause, because we could not tell which of the changes
was responsible. The team that handles on-call reported this as the main
source of overtime. A new customer contract in April requires us to fix
production defects within 24 hours, which the current process cannot meet.This version has the four parts. The problem is slow tracing of failures. The setting is a monthly release process with about 60 changes per release. The forces include the 24-hour contract requirement and the on-call load. The trigger is the April contract. Nothing in it mentions weekly releases, so a reader can still consider other fixes, such as better tracing tools, before reading the decision.
Where the context goes
The same context appears in different places depending on the document. Keep its content steady and change its length.
| Format | Where context goes | Typical length |
|---|---|---|
| Decision record | A "Context" section before the decision | One short paragraph to a few paragraphs |
| Pull request description | The first paragraph, before the change | Two to four sentences |
| Commit message | The body, after the summary line | One to three sentences |
| Design document | A "Background" or "Problem" section | One page or less |
| Meeting or chat update | The opening sentences before the announcement | One to two sentences |
In each format, put the context before the decision. A reader who sees the answer first tends to read the context only to confirm it. A reader who sees the context first forms an expectation and then compares it with your decision.
Context in a decision record
The Context, Decision, Consequences format puts this step in its own section. Here is the context from a record for the orders service.
## Context
The orders service needs transactional updates across orders and payments. The team has two engineers with PostgreSQL experience and none with other databases. We must launch in eight weeks.It is three sentences, and each does work. The first states the technical need. The second states the team's skills, which limit the realistic options. The third states the deadline, which limits how much learning the team can afford. A reader can see at once why a database that is unfamiliar to the team would be risky here, before reading a word about alternatives.
Notice what it leaves out. It does not describe the company or the product beyond the orders service. It does not say "PostgreSQL" in the context at all. The decision section does that.
Common errors
These errors appear often in real context sections.
- Solution-shaped problems. The problem is "we need X." Rewrite it as the failure or need that X would address.
- Writing the context after the decision. If you pick the facts that support the answer you already chose, the context becomes a justification and not an account. This is post-hoc rationalization. A check is to ask whether any fact in your context points away from your decision. If none does, you may have filtered them out.
- Hidden audience knowledge. Phrases like "the usual problem with the billing job" mean something only to people who were present. Name the problem.
- Vague quantities. "A lot of traffic" and "too slow" give the reader nothing to judge. Use numbers where you have them, and say so when you do not.
- Everything included. A context of several pages makes readers skip it. Keep what bears on the choice.
- Missing trigger. Without it, readers cannot tell whether the decision was urgent or only convenient.
A short checklist
Before you move on to constraints and options, check your context against these questions.
- Could a reader who was not in the room state the problem in one sentence?
- Is the problem free of the solution you chose?
- Does each fact bear on the decision?
- Are measurements separated from estimates?
- Does the context say why the decision is being made now?
- Would a reader who disagrees with your decision still agree that the context is fair?
The last question is the strongest test. A good context is one that people who disagree with your conclusion can accept as accurate. The disagreement is then about the reasoning, and that is where it can be settled.
Exercise
A teammate writes this context for a decision: "We need to adopt Kubernetes because our deployments are not modern enough." Name two problems with this context and rewrite it using the four parts (problem, setting, forces, trigger). You may invent plausible details, but mark any invented number as an estimate.
Show answer
Problems: (1) The problem is solution-shaped, since "we need Kubernetes" defines the problem as the lack of the chosen tool, which rules out other options. (2) "Not modern enough" is vague and gives the reader nothing to measure. A better version: "Our three services run on hand-configured virtual machines (setting). Deploying a new version takes about 45 minutes of manual steps and has failed twice in the last quarter, each time requiring a rollback by hand (problem). The team has four engineers, and two of them handle deployments, which limits who can release (force). We plan to add five more services by September (estimate from the roadmap), which would make manual deployment unmanageable (trigger)." The rewrite does not mention Kubernetes, so a reader can still consider other solutions.
Exercise
You are writing the context for a pull request that changes a retry policy from 3 attempts to 5. You know the following facts: the payment provider had a 10-minute outage last week, 120 payments failed during it, the office moved to a new building in June, and you think outages will become more frequent. Which facts belong in the context, and how should you label the last one?
Show answer
Include the outage, the 120 failed payments, and the fact that three attempts were not enough to ride out the outage, since each bears on the choice. Leave out the office move because it does not affect the decision. Label the belief that outages will become more frequent as an assumption or estimate, for example "we expect outages to become more frequent, but we have no data on this yet," so the reader does not mistake it for a measurement.