Sub topic 6
Setting scope, assumptions and constraints
This chapter assumes you can tell functional from non-functional requirements and have already gathered input from stakeholders. It also assumes you can read short Python snippets. Here you turn that input into a written boundary for the design.
Three different things
Scope, assumptions and constraints are often mixed together. They answer different questions.
| Item | Question it answers | Example |
|---|---|---|
| Scope | What will this system do, and what will it not do? | Redirects are in scope. Click analytics are out of scope. |
| Assumption | What are we treating as true without proof? | Each user makes 20 requests per day. |
| Constraint | What is fixed and not up for debate? | The service must run on the company's existing cloud account. |
An assumption can be wrong, so you must check it later. A constraint is imposed from outside, so you design around it.
Setting scope
Scope has two sides. The in-scope list holds the functional requirements and the quality targets you commit to. The out-of-scope list names things a reader might reasonably expect but that you are deliberately leaving out.
Write the out-of-scope list explicitly. Silence invites stakeholders to assume a feature is included. The requirements document from the URL shortener example does this with its out_of_scope section:
service: url-shortener
functional:
- id: FR-1
text: A user can submit a long URL and receive a short URL.
- id: FR-2
text: Requesting a short URL redirects to the original long URL.
- id: FR-3
text: A user can delete a short URL they created.
out_of_scope:
- Click analytics
- Custom domainsEach out-of-scope item is a decision. If someone later asks for analytics, you can point to the decision and treat the request as a change, not a missed requirement.
Recording assumptions
Every capacity number you use rests on an assumption. Record each one with a value and, where you can, an owner who can confirm it.
daily_active_users = 10_000_000 # assumption A-1
requests_per_user_per_day = 20 # assumption A-2
peak_factor = 3 # assumption A-3
requests_per_day = daily_active_users * requests_per_user_per_day
average_rps = requests_per_day / 86_400
peak_rps = average_rps * peak_factor
print(round(average_rps)) # 2315
print(round(peak_rps)) # 6944Naming the assumptions as variables keeps them visible. If A-3 turns out to be 5 instead of 3, you change one line and the peak rate updates.
Constraints
Constraints usually come from four places:
- Budget, such as a monthly spending cap.
- Technology, such as a required database or language.
- Regulation, such as rules on where user data may be stored.
- Time and team, such as a launch date or a team of three engineers.
Unlike assumptions, constraints rarely need validation. They need recording, because they remove options before you start comparing designs.
A simple workflow
- List what stakeholders asked for and sort each item into in scope or out of scope.
- Write down every number and belief your estimates depend on as a numbered assumption.
- Record the fixed limits as constraints.
- Share the three lists and ask stakeholders to correct them.
Exercise
A team writes "We assume the database will be PostgreSQL" because the company already licenses and operates it, and no other database is allowed. Is this an assumption or a constraint, and why does the difference matter?
Show answer
It is a constraint, because the choice is fixed from outside and cannot be changed by the design team. Treating it as an assumption would waste effort on validating it or comparing alternatives. Recording it as a constraint removes other databases from the option list before design begins.