ContentsClose contents
Pre-release
Chapter 2 · Business requirements, product scope, and user storiesCHAPTER 02

Six-part pre-release for review, with 13 figures and seven tables. Proposed policies and open decisions are labelled; content approval remains open.

Working towards: Plan ready (Chapter 5). A product brief, written requirements, web vocabulary, a checked Python setup, and a proposed architecture. Django is not installed yet. All milestones

CHAPTER TWO

Business requirements, product scope, and user stories

Stage 1: Requirements and first project (Chapters 1 to 8)

Prerequisites: Chapter 1: the problem, the people, and the first business requirements

What you’ll build: a structured BRD, a first-release scope, two journeys, stories with acceptance criteria, product rules, a working PRD, and a traceability register.

Why This Matters

Chapter 1 described the problem in Sam, Sai, Raj, and Soni’s words. That is enough to agree that Otahque is worth building, but not enough to build it. “Attendees can cancel” leaves every hard question open: until when, what happens to the place, what Raj sees if his connection drops, and what happens if two people want the last place at once.

Those questions are cheapest to answer now, on paper. Answered later, in code, each one becomes a bug report, a migration, or an argument about what the product was supposed to do. This chapter turns the needs into documents a team can review: who has a stake, what the first release includes and leaves out, stories with observable acceptance criteria, product rules with their edge cases, quality expectations, and a register that traces each requirement to the checks that will prove it.

None of it is code, and none of it is approved. It is a reviewable draft, and every later chapter tests its work against it.

By the end of the chapter, you will be able to:

  • separate a need from a proposed solution, and evidence from a hypothesis;
  • define the scope of a first release and follow its journeys;
  • write user stories with observable acceptance criteria;
  • state product rules for capacity, timing, and repeated actions;
  • describe quality expectations without inventing measurements;
  • trace a requirement to a planned check.

You will produce three working documents: a business requirements document (BRD), a product requirements document (PRD), and a traceability register. All three are review drafts, not approved specifications.

PAGE 001

What You Need to Know

Needs and agreed outcomes

Sam has a list of workshop registrations. Raj has sent a cancellation message, but the list still includes him. Sai asks whether her registration succeeded. Before deciding what to build, we need to say whose difficulty we are addressing and what a useful result would look like.

Chapter 1 gave us a short brief. We will now turn it into a business requirements document, or BRD: a shared record of the problem, the people affected, the outcomes sought, and the boundaries of the work. Its purpose is to make our understanding available for review. Writing it does not make its contents agreed.

Who has a stake in the result?

A stakeholder is someone who is affected by the product or has a responsibility for it. A person can be a stakeholder without using every screen. The person responsible for community access, for example, has a stake in who may manage an event.

Sam needs a dependable registration list for planning. Sai needs to know whether her place is confirmed. Raj needs his cancellation to be reflected in the record. Soni needs clear event information before she decides to register. These names make our examples concrete; they do not represent four special accounts that the application must create.

Chapter 1 described three roles: visitor, attendee, and organizer. From this chapter on, we need two more words. A member is a person with an Otahque account. An attendee is a member who holds a registration for a particular event. Sai is a member because she has an account, and she is an attendee of the workshop while her registration is active. Soni remains a visitor until she creates an account.

The community administrator is a new stakeholder. The administrator manages accounts and access, including who may organize events. We still need to decide how organizers are appointed. Naming a responsibility helps us identify a question; it does not answer every permission question.

Four people, each with a role and a need. Sam, organizer: plan using current registrations. Sai, attendee: know whether her place is confirmed. Raj, attendee: see his cancellation recorded. Soni, visitor: decide whether the event suits her.
Figure 2.1 — Sam needs current registrations; Sai needs confirmation; Raj needs his cancellation recorded; Soni needs enough information to decide.

Separate a need from a proposed solution

Suppose Sam says, “Send me a spreadsheet every evening.” That is a proposed solution. Ask what decision the spreadsheet supports. Sam might need to prepare enough seats using the current registrations. An evening export could already be out of date when Raj cancels the next morning.

The useful outcome is that Sam can plan from the current registration record. The product behaviour that supports it is access to an up-to-date list for the event he manages. The format of an export can be decided later. This distinction keeps the reason for a feature visible when its design changes.

Three linked boxes. The proposed solution, a nightly spreadsheet, leads by asking why to the business outcome, planning from current registrations, which is supported by the product behaviour, an up-to-date list for Sam’s event.
Figure 2.2 — Ask why Sam wants a nightly spreadsheet: the outcome is reliable planning, supported by an up-to-date registration list.

Que. 1 Does “Sam needs a nightly spreadsheet” fully describe the business need?

Flip to check your answerFold answer back

Answer. No. It names a possible delivery method. We must first establish what Sam needs to decide and how current the information must be. Here, the desired outcome is reliable preparation using current registrations.

Trust, privacy, and accountability

Trust here has a concrete meaning: Sai’s displayed registration status and Sam’s list must agree about whether she has a place. If Raj cancels successfully, both views must reflect his cancellation. Conflicting answers can lead to unnecessary travel, mistaken preparation, and extra messages to resolve the uncertainty.

Privacy means setting boundaries around personal information. Soni needs public event details to decide whether to attend; that need does not justify showing her everyone else’s registration information. Attendees manage their own participation, and organizers manage their assigned events.

Accountability means being able to establish who was responsible for an important action. If access to an event is changed, the community needs a way to investigate who made that change. We are recording the need here. Later chapters will decide which records support it, who may read them, and how long they are kept.

What do we actually know?

Our workshop is a fictional teaching example. It makes the problem understandable, but it is not evidence that real organizers experience the same difficulty or would adopt Otahque. Evidence is information we have actually gathered, such as an observed workflow or an interview record, with its source and context.

A hypothesis is an idea we intend to investigate. “Small volunteer-led communities would spend less time reconciling registrations if the records stayed connected” is a hypothesis. Independent technical communities and college clubs are proposed audiences to investigate. Neither demand nor time savings has been established.

A useful investigation would ask an organizer to walk through a recent cancellation: where it was received, which records changed, who updated them, and what remained uncertain. Record what happened separately from our interpretation. Do not turn one person’s account into a claim about all communities.

To investigate time savings, first measure the current work for a defined task, such as reconciling registrations before an event. That starting measurement is a baseline. Later, compare the same task under comparable conditions. We have no such measurement yet, so our draft must not promise a percentage reduction.

Constraints and open questions

A constraint is a boundary our solution must respect. For the book’s first release, we have chosen one community, free events, and individual registration through member accounts. These are project decisions, not findings from customer research. They keep the first product small enough to build and verify.

Closing times and re-registration after cancellation remain open questions. Record them instead of quietly choosing answers while writing code. Later volunteer assignments and sponsor reporting are possible extensions; they do not grant additional access or expand this first release.

Que. 2 Can we write “organizers save two hours per event” in the BRD?

Flip to check your answerFold answer back

Answer. Not as an established result. We have no measurement supporting it. Record the proposed benefit and the investigation needed to assess it instead.

New Concept: business requirements document (BRD)

What problem exists? Needs gathered in conversations are easy to lose, and different people remember them differently.

What did people do before? Needs lived in separate notes, emails, and conversations, which held different versions until someone reconciled them.

What is a BRD? A short document recording the problem, the people affected, the outcomes the organization needs, the constraints, and the open questions, in a form others can review.

Why write one? It gives every later decision a shared reference: a feature is worth building if it serves an outcome the BRD records.

Now let’s structure ours.

Our first structured BRD

Table 2.1 brings the discussion into one reviewable record. Each row has a separate purpose, so a reader can distinguish what the product is for from what we have assumed and what is still undecided.

Table 2.1 — Our first structured BRD (draft for review)
Part Draft content
Status Draft for review, based on the fictional workshop. No stakeholder has approved it.
Problem Separate registration records and cancellation messages can leave organizers and attendees with conflicting answers about current participation.
People and desired outcomes Sam can plan from current registrations for assigned events. Sai can establish whether her place is confirmed. Raj can see his cancellation reflected in his status. Soni can decide whether an event suits her. The administrator can manage account access within defined responsibilities.
Boundaries and responsibilities One community runs free events with individual member registrations. Event publication, confirmation, cancellation, and current registration lists belong to the first release. Attendees control their own participation; organizers manage assigned events. Public event information does not include a public registration list.
Evidence and assumptions The workshop is a teaching scenario, not field research. The proposed audience and any reduction in reconciliation work need investigation. No measured baseline exists.
Open questions Closing times, re-registration, organizer appointment, and the identity and contact details we must collect.

In practice: checking an assumption before building

Situation. A team suspects that attendees repeatedly ask organizers for confirmation because the existing process is unclear.

Application. Discuss recent examples with attendees and organizers, then separate observed difficulties from the team’s proposed explanation in the requirements record.

Consideration. A few conversations can reveal useful questions without proving that every attendee has the same experience. Record the limits of the evidence.

Try it yourself

Write three sentences about Raj’s cancellation: the desired outcome, a boundary that must hold, and one unresolved question. Check that each sentence serves a different purpose.

Que. 3 What could those three sentences say?

Flip to check your answerFold answer back

Answer. Outcome: Raj can tell that his cancellation succeeded. Boundary: Raj can cancel only his own registration. Open question: until what time may he cancel? The first explains the benefit, the second limits authority, and the third identifies a decision still needed.

PAGE 002

How We Build It

Starting point: the structured BRD from What You Need to Know. Work on paper or in a text file; there is no code or installation. Each step produces one reviewable document, and together they form the working product requirements that later chapters build and test against.

The Custom Way: a feature list

The quickest way to start a product is a list of features: event pages, registration, cancellation, an attendee list, perhaps reminders. Each item sounds clear until someone builds it. The list says nothing about when cancellation stops, what an attendee sees when an event is full, who may change an event, or what “current” means for Sam’s list. Every developer fills those gaps differently, and the differences surface as bugs. The steps below replace the list with documents that state the scope, the observable results, the rules, and how each will be checked.

Step 1: Choose the scope and follow the journeys

Sam agrees that current registrations would help with workshop preparation. Then more ideas arrive: could Otahque also issue certificates? Someone suggests a waiting list, and someone else asks for sponsor reports. Each idea may be useful. We still need a clear answer to a smaller question: what will the first release let people finish?

Scope is the boundary of the work we are choosing to do. It states what belongs in a release and what stays outside it. A release is a version of the product made available for use. For Otahque, the first release must connect event information, registration, and cancellation into a complete, dependable experience.

Choose a small but complete first release

A minimum viable product, often shortened to MVP, is a small usable product through which we can learn whether an approach meets a real need. “Minimum” concerns how much we include. It does not excuse incorrect registration counts, unclear results, or access to someone else’s private information.

Our first release serves one community running free events. A person can browse published events without registering for one. To register for a place, the person uses a member account. An account lets the product associate registrations with the person who can view and manage them. We have not yet chosen the account screens or their technical implementation.

Included in the first release

Visitor: browse published events and read the details needed to decide whether an event is suitable, including when and where it takes place and, for an event still to come, how many places are left. Events that have ended stay listed, after current and upcoming ones, marked as past.

Member: create an account, sign in, register for an event, see the result, return to registration history, and cancel their own registration when cancellation is allowed. The same person may browse as a visitor before signing in.

Organizer: prepare an event draft, preview it, publish it, edit an assigned event, and view its current registrations. A draft is work in preparation; publishing makes the event available to visitors. Exact rules for changing a published event still need to be settled.

Administrator: manage accounts and access. This responsibility supports the other journeys, but it does not yet settle how someone is appointed as an organizer or which exceptional actions an administrator may take.

The release must also respect event capacity, registration times, and ownership of records. Capacity means the number of available places. A small feature list still needs correct behaviour when requests repeat or two people seek the last place. We will specify those cases in Step 3.

Que. 4 Can we postpone cancellation because registration already works?

Flip to check your answerFold answer back

Answer. Not within our chosen first-release scope. Raj needs to manage his participation, and Sam needs the current record to reflect a successful cancellation. Deferring cancellation would leave that agreed journey incomplete.

Prefer a waiting list in the first release?

A waiting list that offers released places to the next member sounds like a small addition. It brings its own rules, though: who is next, how long an offer lasts, and what happens when nobody replies. We leave it for later, record it as deferred, and make sure the first release never pretends to keep a waiting list it does not have.

Keep later work visible

Deferred means deliberately left for later consideration or a later release. Waiting lists, reminders, check-in, imports and exports, certificates, volunteer assignments, and sponsor reporting are outside this first release. Recording them prevents useful ideas from quietly becoming extra work in the current step.

For example, registration records that a person has a place. Check-in records evidence of arrival at an event. Our first release handles registration; it does not claim to establish who actually attended. A registration history must not be described as an attendance history.

Multi-community support, subscription billing, team events, and jobs have later places in the book. Their presence in the curriculum does not put them into the first product release. Paid event tickets are also outside our free-event boundary. A deferred idea is not automatically a promise that we will build every proposed extension.

If a proposed addition becomes essential, revisit the scope explicitly. Identify the need, the extra work, and what would move out or change. Adding a certificate button, for example, would raise questions about eligibility and attendance evidence that registration alone cannot answer.

Follow an attendee’s journey

A user journey is the sequence of steps a person takes to reach an outcome. It helps us find gaps between features. A list containing “events”, “accounts”, and “registration” does not tell us whether Soni can move from reading an event to knowing that her place is confirmed.

Start with Soni as a visitor. She opens the published event details and checks whether the workshop suits her. If it does and she chooses to register, she creates an account or signs in to an existing one. After signing in, the event must remain easy to find so she can continue her task.

Soni requests a place. The request is not itself confirmation: Otahque must determine whether registration is allowed and show a clear result. If it succeeds, Soni can later find the registration in her history. If the event is full or registration has closed, the product must explain that no place was confirmed. The first release does not silently put her on a waiting list.

Soni’s journey as a flow: read the published event, sign in or create an account, then request a place. The request branches: if allowed, a confirmed place she can find later in her history; if full or closed, a clear result that no place was confirmed. Badges number the first three steps 1 to 3.
Figure 2.3 — Soni’s registration journey. A full event or closed registration leads to a clear unsuccessful result instead of confirmation.

Sai’s confirmation question provides a useful check on this journey: can a member return later and establish the current result? Raj adds another branch. He opens his existing registration and requests cancellation. When cancellation succeeds, Raj sees the cancelled status, and Sam’s current registration list reflects the change. The cancellation deadline remains an open rule for Step 3.

Que. 5 Does clicking Register mean Soni has a place?

Flip to check your answerFold answer back

Answer. No. The product must check whether it can confirm a place and show the result. The journey must explain unsuccessful requests as well as successful ones.

Follow an organizer’s journey

Sam signs in with permission to manage the workshop. He prepares its details as a draft, previews what visitors will see, corrects mistakes, and publishes it. Previewing helps him inspect the information before making it public; a preview is not publication.

Once the event is published, visitors can find it, and members can request places while registration is allowed. Sam returns to the current registration list to prepare for the event. A successful registration adds an active participant; a successful cancellation removes that person from the current active list. The member’s history can still show the cancellation.

Sam’s journey as a flow: prepare a draft, preview it, and loop back to correct mistakes; then publish, making the event visible; then review current registrations. A note says this applies only to events assigned to Sam. Badges number the four steps 1 to 4.
Figure 2.4 — Sam prepares and publishes an assigned event, then uses current registrations to plan. Organizer access applies to assigned events, not every community event.

This is where the two journeys meet. Soni’s successful registration must be visible to her and reflected in Sam’s list. Raj’s successful cancellation must be reflected in both places too. Drawing the journeys separately must not lead us to treat them as unrelated records.

Sam may also need to edit published details. We include that capability while keeping its detailed rules open: which changes are allowed after people register, and how should affected members learn about them? A journey exposes such questions; it does not authorize us to invent a notification policy or automatically add reminders.

Que. 6 Can Sam manage another organizer’s event simply because he is an organizer?

Flip to check your answerFold answer back

Answer. No. Our scope gives organizers responsibility for assigned events. The journey must preserve that boundary whenever Sam opens, edits, or views registrations for an event.

Review the scope through a complete task

To review the first release, follow one event from Sam’s draft through publication, Soni’s registration, a later status check, and Raj’s cancellation of his own registration. At each step, name what the person does, what result they need to see, and who else needs the record to change. Keep unresolved timing and event-change rules beside the journey for the next sections.

In practice: demonstrating a complete journey

Situation. A team is reviewing an early version and sees that its registration page looks finished.

Application. Walk through registration, checking the saved status, and cancellation using the same event. This reveals whether the connected steps support the attendee’s task.

Consideration. Keep deferred features outside the demonstration’s success criteria. A reminder or certificate is not required merely because it would fit the story.

Try it yourself

Sam asks for a sponsor attendance report. Classify that request as included, deferred, or unresolved in the current scope. Then identify one included behaviour that would help him prepare for the workshop today.

Que. 7 How should we classify Sam’s request?

Flip to check your answerFold answer back

Answer. Sponsor reporting is deferred. Attendance evidence also requires later capabilities; registrations alone cannot prove attendance. An included behaviour is viewing current registrations for Sam’s assigned workshop. An unresolved rule, by contrast, is the exact cancellation deadline for that included workflow.

Step 2: Write stories and acceptance criteria

Sai returns to Otahque after requesting a workshop place. The registration page looked reassuring, but she still wants to know: “Am I on the list?” Our journey identifies that moment. We now need a short description of the need and clear conditions for deciding whether the product meets it.

Write the need from the person’s point of view

A user story describes a capability someone needs and the reason it matters. A useful starting pattern is “As a [person or role], I want [capability], so that [benefit].” The pattern helps us ask who, what, and why. Filling in its blanks does not make an unclear requirement useful.

For Sai: “As a member, I want to see the current status of my registration, so that I know whether I have a place.” This keeps the benefit visible. “As a user, I want a green message” chooses a display detail without saying what the person must learn.

For Raj: “As a member, I want to cancel my own registration, so that my decision is reflected in the event record.” For Sam: “As an organizer, I want to see current registrations for my assigned event, so that I can prepare for the people who have places.” These stories describe related needs without combining every action into one oversized story.

Stories are not only about registration. For Sam: “As an organizer, I want to preview my event before publishing it, so that visitors see correct details.” For Soni: “As a visitor, I want to read a published event’s date, start and end times, place, and intended audience, so that I can decide whether to register.” Publication and browsing belong to the same first release as registration.

New Concept: acceptance criteria

What problem exists? “Registration works” means different things to the person who asked for it and the person who builds it.

What did people do before? Without written criteria, reviewers often discovered that they expected different results only after a feature was built.

What are acceptance criteria? Observable conditions a behaviour must satisfy before we accept it, often written as Given (the starting situation), When (the action), Then (the result anyone can check).

Why write them first? They turn a story into something that can pass or fail, and they become the outline of the automated tests from Chapter 9.

Now let’s write them for registration.

Describe observable conditions

Observable means that someone can inspect the result. “Registration works properly” is too vague. “After a successful registration, Sai sees a confirmed status and appears once in Sam’s active registration list” gives us something to check.

Common Error: a criterion nobody can check

“Registration is easy” gives a reviewer no starting situation or observable result. Describe one action and what the person sees afterwards, then include a refusal case. Keep any undecided policy labelled as a proposal.

Given, When, Then is a writing aid, not a requirement to use a particular testing tool.

Given: the event is published, registration is open, Sai is signed in, she has no active registration for it, and a place remains. When: Sai requests a place. Then: she receives confirmation, can find that registration later, and appears once in the assigned organizer’s current list. The active count increases by one.

Given: Sai already has an active registration for that event. When: she submits another registration request. Then: the product shows her existing registration; it does not create another active place or increase the active count. Repeating an action is common, even without anyone trying to cause harm.

Three columns. Given: the event is published, registration is open, Sai is signed in with no active registration, and a place remains. When: Sai requests a place. Then: she sees confirmation, appears once in Sam’s list, and the active count rises by one.
Figure 2.5 — A registration example separates the starting conditions, the action, and the observable result. All the starting conditions must hold for confirmation.

Criteria for publishing an event

Publication needs criteria too, because visitors rely on the details Sam publishes.

Given: Sam is assigned to a draft event with a title, description, start and end times, timezone, place, capacity, and registration times. When: he previews it. Then: he sees the details as visitors will see them, and the event is still not visible to visitors.

Given: the same draft is complete and valid. When: Sam publishes it. Then: visitors can find and read it, and members can request places once registration opens.

Given: a draft is missing its timezone, its end time is not after its start time, or its registration would close after the event starts. When: Sam tries to publish it. Then: publication is refused, the event stays a draft, and the message names each detail he must correct without discarding the details he has already entered. “Step 3: Define product rules and edge cases” explains the timing rule behind this example.

Given: an event is still a draft. When: Soni, or any other visitor, looks for it. Then: it does not appear, and nobody can request a place for it.

Describe unsuccessful and forbidden actions

Given: all places are taken. When: Soni requests a place. Then: no new active registration is created, the active count stays unchanged, and she receives an explanation that no place was confirmed. The first release does not offer an unplanned waiting list.

Given: Raj has an active registration and cancellation is allowed. When: he cancels it. Then: Raj sees a cancelled status, the registration no longer consumes capacity, and Sam’s active list excludes it. Raj’s history can still show the cancelled registration. Removing a place from the active count need not erase its history.

An abuse case describes an attempt to use the product in a harmful or unauthorized way. Suppose Sai tries to cancel Raj’s registration by changing a reference in a request. The expected result is rejection: his registration and the count remain unchanged, and she receives no private registration details. Hiding a button does not define this boundary; every attempt must respect ownership.

Given: Sam is assigned to one event but not another. When: he attempts to open the other event’s registration list or change its details. Then: access is denied, and nothing is changed. A role name alone does not explain which records a person may manage.

Keep criteria separate from implementation

These criteria say what must be true. They do not select database tables, page layouts, or Python functions. Later we will implement checks and write executable tests. For now, we can review examples on paper and find contradictions before they spread into code.

Que. 8 Is “show a green success message” enough to accept registration?

Flip to check your answerFold answer back

Answer. No. The message must agree with the saved registration and the organizer’s list. A colour or message alone cannot establish that a place exists.

Que. 9 Why include a request that should be rejected?

Flip to check your answerFold answer back

Answer. A useful requirement defines its boundaries. Full events, duplicate requests, invalid publication, and attempts to alter another person’s registration reveal whether the product protects capacity, accuracy, and ownership.

In practice: making a review reproducible

Situation. A developer and reviewer disagree about what should happen when an already-registered member submits again.

Application. Use a concrete starting state, action, and expected result to make both people check the same behaviour. Include what must stay unchanged.

Consideration. A visible confirmation message is only part of the evidence. The saved registration and available capacity must also agree with the expected result.

Try it yourself

Write a Given/When/Then example for a visitor who tries to register without signing in. State what must not happen as well as what the visitor should see.

Que. 10 What is one suitable answer?

Flip to check your answerFold answer back

Answer. Given a visitor who is not signed in, when the visitor requests a place, then the product asks the visitor to create an account or sign in and does not create a registration yet. Returning from sign-in must still allow the person to continue with the intended event.

Step 3: Define product rules and edge cases

Sam’s workshop has twenty places. Nineteen are already taken. Two members each see one place remaining and request it. Both requests look reasonable on their own. The product must still avoid confirming twenty-one people.

A product rule states a condition the product must enforce consistently. An edge case is a situation near a boundary or outside the most straightforward path: the last place, the exact closing instant, or a repeated cancellation. These cases belong in requirements because they affect what a correct result means.

Separate fixed boundaries from proposed policies

The project already requires one active registration per member and event, capacity protection, personal ownership, and access limited to assigned organizers. The following timing and re-registration policies are a proposed working specification for review. They make our examples precise without claiming that real stakeholders have approved them. We have not assigned actual event deadlines.

An active registration means a currently confirmed place that consumes capacity. A cancelled registration does not consume capacity. Neither status proves physical attendance, and neither says that a person received a meal, a certificate, or any other item. Those are different facts for later workflows.

Opening and closing boundaries

Proposed policy: each event has three times: when registration opens, when it closes, and a cancellation deadline. The opening time may be left blank, which means registration opens as soon as the event is published; when it is given, it must be earlier than closing. Closing and the cancellation deadline must be no later than the event’s start. The organizer must supply valid closing and deadline values before publication. The exact choices depend on the event.

Registration is allowed at or after opening and strictly before closing. At the closing instant, it is closed. Cancelling strictly before the deadline is on time. After the deadline, a member may still cancel until the event starts, but the cancellation is recorded as late, so the organizer knows the place was released at short notice. Our events are free, so refusing a late cancellation would only leave a place held by someone who will not come. These decisions use Otahque’s own clock, not the clock on a member’s phone or laptop, so changing the time on a device must not extend a deadline.

For an illustrative event whose registration closes at 18:00 in its stated timezone, a request processed at 17:59:59 is before closing; one processed at 18:00 is not. This is an example of the boundary, not a deadline selected for Otahque’s events. A page opened earlier is not a promise that registration remains open when the request is processed.

A timeline from left to right: registration opens; registration is open until 18:00, when it closes; a request at 17:59:59 is accepted and one at 18:00 is refused. Cancelling before the deadline is on time; from the deadline until the event starts, cancelling is still allowed but counts as late.
Figure 2.6 — Registration is open from the opening instant up to, but not including, the closing instant. Cancelling stays possible until the event starts; after the deadline it counts as late.

Cancellation may remain open after registration closes if the configured times allow it. Raj can then release a place, but that release does not reopen registration. A place being free and a place being available to book are different conditions.

Under the Hood: why the closing instant is excluded

The registration window is a half-open interval: it includes the opening instant and excludes the closing one. Written as [open, close), every instant belongs to exactly one side of the boundary, so a request at 17:59:59 is inside and one at 18:00 is outside, and two windows placed end to end never overlap. Code later compares times with “at or after the opening” and “before the closing”, which is exactly this rule.

Count places, not clicks

Capacity is a positive whole number of places. Available capacity is the configured capacity minus the number of active registrations. For twenty places and nineteen active registrations, one place remains. A request that is refused must not change that count.

An invariant is a condition that must always remain true. Our capacity invariant is that the active registration count never exceeds capacity. Another invariant is that a member has at most one active registration for the same event. Repeated clicks, retried requests, and simultaneous requests must preserve both.

When two people compete for the last place, at most one can receive a new confirmed registration. If both requests are otherwise eligible and processing succeeds, one succeeds and the other receives a full-event result. We do not promise that the person who clicked first on their own device wins the place. An unexpected failure must not result in two confirmations.

Two eligible members send requests at the same time to an event with 19 of 20 places taken. Exactly one request is confirmed, making 20 of 20. The other receives a full-event result. The active count never exceeds 20.
Figure 2.7 — Two requests can compete for one remaining place. Only one may be confirmed; the active count must never exceed twenty.

Cancellation and registering again

A successful cancellation changes an active registration to cancelled and releases exactly one place. Repeating the cancellation leaves it cancelled and releases no additional place. A cancellation after the deadline releases the place in the same way; it is only marked late. If Raj retries and his earlier cancellation already succeeded, show him the current cancelled result; do not pretend a second cancellation occurred.

Proposed re-registration policy: a member may request a place again after cancellation only when the ordinary registration conditions still hold, including an open window and spare capacity. A previous place is not reserved. The product retains enough history to explain the cancellation and the return, while allowing at most one active registration. Whether one record changes status or several records represent that history is a later design question.

If a cancellation and a new registration happen close together, the product must use a consistent count. Soni may obtain the released place only after Raj’s cancellation has taken effect. These are concurrent actions: actions whose processing overlaps in time. We have described the required outcome without choosing the database technique; Chapter 33 returns to it.

Event changes and authority

Only an assigned organizer may perform the ordinary event-management actions. Reducing capacity below the current active count must be rejected; silently removing members is not an acceptable way to make the count fit. A draft event must not accept registrations. Revoking organizer access must stop future attempts to manage that event.

Some decisions need more than a convenient default. We must agree how event cancellation works, which published details may change after people register, and how affected members are informed. We must also define organizer appointment, exceptional administrator actions, and any permitted corrections. These are explicit release blockers for the affected workflows, not permission to improvise in code. Until they are resolved, a draft test for changing an event must not claim that these policies are complete.

Que. 11 Raj cancels when registration is already closed. Can Soni automatically take his place?

Flip to check your answerFold answer back

Answer. No. Cancellation releases capacity, but a new registration still needs an open registration window. Free capacity does not override the closing rule.

Que. 12 The same cancellation arrives twice. How many places are released?

Flip to check your answerFold answer back

Answer. One. The first successful change releases the place. The repeated request reports the cancelled state without changing capacity again.

In practice: checking the edge of a deadline

Situation. A registration feature appears correct during ordinary testing, but nobody has checked a request at the closing boundary.

Application. Write scenarios just before, exactly at, and just after the agreed closing time. Compare each expected result with the rule before implementation.

Consideration. Keep an unresolved boundary labelled as unresolved. These paper scenarios identify a decision and future checks; they do not prove timing code works.

Try it yourself

A fictional event has capacity twenty and nineteen active registrations. Raj, who holds one of those nineteen places, cancels successfully. Two other eligible members then register successfully while registration remains open. Calculate the active count and available capacity after each step.

Que. 13 What counts should we expect?

Flip to check your answerFold answer back

Answer. Initially: nineteen active and one free. After Raj cancels: eighteen active and two free. After one new registration: nineteen active and one free. After the second: twenty active and none free. A further request must not increase the count.

Step 4: Set quality expectations and assemble the PRD

Sai can register, but the result is unreadable on her phone. Raj can cancel with a mouse, but he cannot reach the control using a keyboard. Sam sees an event time without a timezone. A feature may exist and still fail the person trying to use it.

A functional requirement describes what the product does, such as cancelling a registration. A quality requirement describes how well or under what conditions it must do it, such as making cancellation usable without a mouse. Both need observable checks. “Fast”, “secure”, and “easy” are starting concerns, not finished specifications.

Make quality observable

For usability, propose this review task: give a new reader the event page and ask the reader to find the date, time, location, and registration result without coaching. Record where the reader hesitates. A sensible target is completion without assistance; whether our design achieves it must be observed, not assumed.

For accessibility, require the main journeys to work using a keyboard, with visible focus and understandable control names. Labels must explain form fields. Errors must identify what needs correction, and status must be conveyed in words rather than colour alone. Check the page with enlarged text and on a narrow screen; content and controls must remain reachable. These are initial product checks, not a claim of accessibility certification or exhaustive coverage.

For time clarity, show the date and timezone wherever a person acts on an event time or deadline. The event details, registration status, and organizer view must refer to the same intended instant. Test with a reader whose device uses a different timezone. A bare “6 pm” leaves too much for the reader to infer. Event pages show the time where the event takes place and, when it differs, the visitor’s own time; a member may choose a time zone in their profile, and otherwise the browser’s zone is used, with UTC as the last resort.

For privacy, visitors see published event information, members see their own registration details, and assigned organizers see only the information necessary to manage their events. Test attempts to read another member’s record and an unassigned event’s list, not just whether links are hidden. Required identity and contact fields and retention periods still need explicit decisions before we collect real people’s data.

Reliability includes uncertain outcomes

Imagine that Raj requests cancellation and the connection fails before the result appears. The product may have completed the action even though he did not receive the response. A useful message must not claim success or failure without knowing. Let Raj check his current registration status and retry safely if needed. Repeating the request must not release a second place.

The signed-in registration history is a way to recover the current result without relying on a separate message. Email reminders are outside this release. If the service itself is unavailable, an error page must not promise a confirmed place or manufacture an offline registration. A manual fallback, if adopted later, needs an owner and a reconciliation procedure before it can become an alternative booking route.

After Raj’s cancellation response is lost, the flow says check current status first. If the status is cancelled, show that result and release no further place. If it is still active, retry only if cancellation is still allowed.
Figure 2.8 — After a lost response, check the current registration status before deciding what to do. An uncertain screen does not establish whether the action succeeded.

Set performance targets with a measurement plan

Responsiveness matters, but “instant” cannot be tested consistently. Before choosing a numerical target, define which action is timed, when timing starts and stops, what device and connection are used, and how many people are active. Record both ordinary and busy-event conditions. The twenty-place teaching example is a capacity example, not proof of a supported traffic level.

The first draft therefore records a requirement to measure event viewing, registration, and cancellation under an agreed workload. Response-time and availability targets remain open until that workload and the operating environment are chosen. Do not replace missing evidence with invented measurements. Regardless of speed, the capacity and ownership rules must hold.

Also define limits for user-supplied content before implementation: which fields are required, how long text may be, and how invalid input is reported without losing valid work. Exact limits need review with realistic event descriptions. A limit is useful only when its purpose, enforcement, and error behaviour are clear.

Assemble a product requirements document

A product requirements document, or PRD, gathers what the product must do, the rules it must follow, its quality expectations, and the questions still awaiting decisions. The business requirements document explains the problem and desired outcomes. The PRD connects those outcomes to behaviour that we can design and check. Neither document becomes approved because it has a formal name.

Table 2.2 summarizes our working PRD. It is a review draft for the first learning release, not a completed implementation or a launch authorization.

Table 2.2 — Our working PRD (review draft)
Part Contents
Purpose and people Reliable event information and participation records for visitors, members, assigned organizers, and the administrator. The workshop is a fictional example; audience demand and time savings remain hypotheses.
Scope and journeys One community; free, individual, account-based registration; event drafting, preview, publication, and editing; current registration lists; personal history; cancellation. Journeys and the deferred list come from Step 1.
Behaviour and criteria The successful, unsuccessful, and forbidden-action examples for registration, cancellation, publication, and access. A published event is visible to visitors; a draft is not.
Rules The capacity and ownership invariants. Timing and re-registration policies are marked proposed.
Quality Usability, accessibility, time clarity, privacy, recovery, and measurement checks from this section.
Decision register Before the affected work: event-change and cancellation policy, organizer appointment, administrator exceptions, actual deadlines, identity and contact fields, text limits, retention, and correction history. Before release assessment: performance and availability targets and a recovery procedure.

Account access, event publication, and registration form one connected release; none may silently bypass the others’ boundaries. When the project assigns responsibility for a decision, record that person beside it. We have not invented named approvers.

Que. 14 Is “the page is secure” a useful acceptance criterion?

Flip to check your answerFold answer back

Answer. It is too broad. Replace it with concrete conditions, such as refusing an attempt to read another member’s registration without disclosing its private details. That check covers one boundary; it does not prove the whole product is secure.

Que. 15 Does a missing response prove that Raj’s cancellation failed?

Flip to check your answerFold answer back

Answer. No. The action may have completed before the connection failed. The product needs a way to show the current status and handle a repeated request safely.

In practice: writing a useful quality report

Situation. During a review, an attendee says that an event time is confusing.

Application. Record the displayed time, the timezone information, and what the attendee expected to understand. Connect the observation to a precise quality requirement.

Consideration. One successful example does not establish clarity for every timezone or device. Record the conditions checked and the cases still needing review.

Try it yourself

Rewrite “event times should be clear” as a requirement with a check. State what evidence you would record.

Que. 16 What would a useful answer include?

Flip to check your answerFold answer back

Answer. Show the event date and timezone beside the time and relevant deadlines. Inspect the event and registration views with a device set to another timezone, confirming that they describe the same instant. Record the displayed values and any mismatch; do not merely mark the task “looks fine”.

Step 5: Trace requirements and review them

We now have a problem statement, scope, journeys, stories, criteria, and product rules. Keeping them in one chapter is helpful, but we also need to find their connections. If cancellation changes, which needs and checks should we revisit?

Traceability means being able to follow a requirement back to its reason and forward to the work and evidence that address it. It prevents a check from becoming an isolated task whose purpose nobody remembers. It also reveals a requirement for which no meaningful check has been planned.

Give requirements short names

Clear sentences come first. Once we need to refer to them repeatedly, short identifiers help. In this chapter, BR means business requirement and PR means product requirement. The number identifies an entry; it does not indicate priority. These labels belong to this working set, not to an external standard.

BR-1: attendees can establish and manage their current participation. BR-2: organizers can prepare from current registrations. BR-3: people’s information and responsibilities stay within defined access boundaries. These are concise references to the needs already explained, not additional product scope.

PR-1: eligible registration produces one current confirmed place, visible to the member and the assigned organizer. It supports BR-1 and BR-2. Check a successful registration and a repeated request; inspect the member’s status, the organizer’s list, and the active count.

PR-2: an allowed cancellation releases one place and leaves a clear cancelled status, even when the request repeats. It supports BR-1 and BR-2. Check the first cancellation, its repetition, and recovery after a lost response.

PR-3: competing requests cannot push active registrations beyond capacity. It supports BR-1 and BR-2 because confirmation must be dependable. Check two otherwise eligible members seeking the last place; inspect both outcomes and the final active count.

PR-4: members access their own registration information, and organizers manage only assigned events. It supports BR-3. Check forbidden reading and writing attempts as well as allowed actions. Refused attempts must not change records or reveal private details.

Two more labels cover the rest of the release. PR-5: only a complete, valid draft can be published by its assigned organizer, and visitors see only published events. PR-6: organizer access is granted or removed only through the administrator’s workflow. PR-5 supports BR-1 and BR-2; PR-6 supports BR-3.

A chain of four boxes from left to right: need (Raj can establish his current result), requirement (PR-2, release one place), control (only an active registration releases a place), check (cancel twice and inspect the count). A fifth, dashed box, evidence, is recorded only after the check runs. Badges number the five boxes 1 to 5 in that order.
Figure 2.9 — Follow the cancellation need through a product requirement, a planned control, and a check. Evidence is recorded only after the check actually runs.

Connect controls to evidence

A control is a measure that helps enforce a rule. For PR-4, checking access whenever protected information is read or changed is a planned control. For PR-2, allowing only an active registration to release a place is a planned control. We will choose their implementation later, then test both permitted and refused actions.

A scenario is a concrete situation we use to examine behaviour, such as Raj submitting the same cancellation twice. A test executes a check against an implementation. Evidence records what actually happened: the version examined, the starting data, the action, the observed result, and whether it matched the expectation. A written scenario is not an executed test, and a requirement is not evidence of its own satisfaction.

For the cancellation scenario, a future evidence note might record the event’s capacity, the initial active count, Raj’s initial status, both of his requests, and the final status and count. Until that experiment runs, its status is “planned”. We have written no Django application in this chapter, so we have no application-test results to report.

The working register

Table 2.3 brings these links together. Every row is planned; none has been executed. Extend the register as requirements become precise, and mark an open decision as open rather than attaching a passing result to an undefined policy.

Table 2.3 — Working traceability register (planned checks only)
Requirement Supports Planned control Scenario or check Status
PR-1 One confirmed registration BR-1, BR-2 Eligibility and uniqueness checks Successful, repeated, full, closed, and signed-out requests Planned
PR-2 Cancellation releases one place BR-1, BR-2 Only an active registration releases a place Cancel twice; lost response; after deadline; register again if eligible Planned; timing policy proposed
PR-3 Never exceed capacity BR-1, BR-2 Count enforced under overlapping requests Two members seek the last place; cancellation overlaps a request; capacity reduction refused Planned; database design later
PR-4 Own records, assigned events BR-3 Access checked on every protected read and change Wrong member or event; allowed action; access revoked Planned; appointment policy open
PR-5 Publication boundary BR-1, BR-2 Valid details required before publishing Draft hidden; published readable; invalid publication refused Planned; event-change policy open
PR-6 Access management BR-3 Restricted administrator workflow Ordinary member cannot grant organizer access Planned; exceptions policy open
Quality: time, access, recovery BR-1, BR-2 Date and timezone shown; keyboard use; status lookup Another device timezone; keyboard-only journey; lost response Planned; not certification
Quality: responsiveness BR-1, BR-2 Agreed workload and measurement Time viewing, registering, and cancelling under ordinary and busy load Targets pending

Review consistency before advancing

Read the attendee and organizer journeys together. Confirmation must agree with the active list. Cancellation must release one place without erasing the ability to explain its result. A full event must refuse a new place. Closing registration must remain effective even if a cancellation later creates spare capacity. Registration history must not be mistaken for attendance evidence.

Then inspect the scope boundary. A scenario that automatically sends reminders, promotes a waiting-list member, or issues a certificate has introduced a deferred capability. Either remove that behaviour from the first-release scenario or explicitly reopen the scope decision. Do not smuggle it in through an expected result.

Finally, review the decision register. The first release cannot be declared ready while its affected event-change policies, required data, or operational targets are undefined. We can still learn how the web works and prepare to implement incrementally. An open product decision is a visible dependency, not a reason to pretend the whole learning path has stopped.

In practice: reviewing the effect of a rule change

Situation. The team proposes changing when cancellation closes after related requirements have already been written.

Application. Follow the links from that rule to its user journey, acceptance criteria, and review scenarios. Update the affected expectations together once the change is agreed.

Consideration. Traceability helps locate affected work; it does not automatically identify every dependency or approve the proposed change.

A closing workshop exercise

Sam’s published workshop has twenty places and nineteen active registrations, including Raj’s. Registration and cancellation are both open. Sai already has a confirmed place and submits again. Raj then cancels twice. Soni and another eligible member then request the two remaining places, and both requests complete successfully.

Before reading the answers, write the final active count, what each person should see, two requirements involved, and one forbidden-action check. Then list one decision from this chapter that still needs review before the affected feature is implemented.

Que. 17 What should the final active count be?

Flip to check your answerFold answer back

Answer. Twenty. Sai’s repeated request leaves nineteen active. Raj’s first cancellation reduces that to eighteen; his repeated cancellation leaves eighteen. The two new successful registrations bring the count to twenty. No place is released or consumed twice.

Que. 18 What results should people see?

Flip to check your answerFold answer back

Answer. Sai sees her existing confirmed registration. Raj sees a cancelled status. Soni and the other successful member each see confirmation. Sam’s active list contains twenty registrations, includes the two new members, and excludes Raj’s cancelled registration.

Que. 19 Which requirements and forbidden-action check apply?

Flip to check your answerFold answer back

Answer. PR-1 covers Sai’s single active registration; PR-2 covers Raj’s cancellation releasing one place. PR-3 protects the capacity boundary. For PR-4, attempt to cancel Raj’s registration while signed in as another member: the request must be refused without changing the record or disclosing private details.

Que. 20 Does completing this exercise establish that Otahque works?

Flip to check your answerFold answer back

Answer. No. It checks our reasoning about the proposed behaviour. We must later implement it, execute meaningful tests, and record evidence. Event-change and cancellation policy, for example, still needs review before that affected workflow is complete.

When something goes wrong

Review the documents without discarding the original. Table 2.4 helps you make one correction at a time and preserve the reason for it.

Table 2.4 — Document-review problems and recovery
Problem Check Recovery
Vague acceptance criterion Can another reader observe a pass or refusal? Write a starting situation, action, and visible result; keep the original for comparison.
Unsupported target Is there a source and a starting measurement? Mark the target Proposed and record how to measure it; do not invent evidence.
Broken traceability Does the linked requirement still describe this check? Update the affected link and planned check together; retain the change reason.
Conflicting policies Do two documents require different results for the same case? Record the conflict as open and seek a decision before treating either as agreed.
PAGE 003

Verify Your Work

There is no code in this chapter. Check your documents against Table 2.5 instead. Each should be specific enough that someone who was not in the room could review it.

Table 2.5 — Verification checklist for Chapter 2
Check What to look at Expected result
Stakeholders and outcomes Your BRD (Table 2.1) Each person’s need, the agreed outcomes, constraints, and open questions
Scope Your included and deferred lists A small, complete first release; deferred work written down with reasons
Journeys Your attendee and organizer flows Each journey reaches an outcome, including a refusal
Stories and criteria Your Given/When/Then examples Successful, unsuccessful, and forbidden actions, each observable
Rules and edges Your rule list The opening and closing instants, capacity, cancellation, and authority
Quality and PRD Your PRD (Table 2.2) Quality expectations with a way to check each one; open decisions named
Traceability Your register (Table 2.3) Each requirement linked to its need, a control, and a planned check

If any document uses words such as “easy”, “fast”, or “works” without a check, rewrite it as an observable condition.

PAGE 004

Checkpoint: Quiz and Challenge

Quiz

Que. 21 What is the difference between a need and a proposed solution?

Flip to check your answerFold answer back

Answer. A need is what a person is trying to achieve, such as planning from current registrations. A proposed solution is one way to meet it, such as a nightly spreadsheet; there may be better ones.

Que. 22 Write the three parts of a Given/When/Then example and what each one holds.

Flip to check your answerFold answer back

Answer. Given: the starting situation. When: the action. Then: the result anyone can observe.

Que. 23 Is a request at exactly 18:00 accepted when registration closes at 18:00?

Flip to check your answerFold answer back

Answer. No. The window includes the opening instant and excludes the closing one, so 17:59:59 is accepted and 18:00 is refused.

Que. 24 What is an invariant, and which one protects capacity?

Flip to check your answerFold answer back

Answer. A condition that must always remain true. Active registrations never exceed capacity, whatever the timing of the requests.

Que. 25 In the traceability register, when may evidence be recorded?

Flip to check your answerFold answer back

Answer. Only after a check has actually run against an implementation, with its date and source. A planned check is not evidence.

Mini-Challenge

On paper, write the acceptance criterion for Raj cancelling after the cancellation deadline has passed, in Given/When/Then form. Then add a row for it to your traceability register: the need, the requirement, a control, and the planned check.

Que. 26 What would a good criterion and register row say?

Flip to check your answerFold answer back

Answer. Given Raj has an active registration, the cancellation deadline has passed, and the event has not started, When he cancels, Then his registration is cancelled, one place is released, the cancellation is marked late, and both Raj and Sam can see that it was late. Register row: need, Sam can plan from current places and knows about short-notice changes; requirement, cancellation is allowed until the start and marked late after the deadline; control, the server compares the cancellation time with the deadline using its own clock; planned check, a cancellation after the deadline releases one place and is shown as late. The evidence column stays empty until that check runs.

What We Learned

  • Stakeholders, needs, outcomes, constraints, and open questions go into a BRD that others can review.
  • A first release is small but complete: it reaches real outcomes, and its deferred work is written down with reasons.
  • Stories say who needs what and why; acceptance criteria say what anyone can observe when the behaviour is right, including refusals.
  • Product rules need their edges: the closing instant, the last place, repeated actions, and who may change what.
  • Quality expectations need a measure, and the PRD gathers behaviour, rules, quality, and open decisions in one place.
  • Traceability links each requirement back to its need and forward to controls, checks, and evidence that exists only after a check runs.

Key terms

Use Table 2.6 to check your vocabulary before Chapter 3. Each term was explained where it first appeared.

Table 2.6 — Key terms from Chapter 2
Term Meaning in this book
Stakeholder Someone affected by the product or responsible for it.
Member A person with an Otahque account. An attendee is a member registered for a particular event.
Evidence Information actually gathered, recorded with its source and context.
Hypothesis An idea we intend to investigate; not yet evidence.
Baseline A starting measurement used for a later comparison.
Constraint A boundary the solution must respect.
Scope The work a release includes, and what it deliberately leaves out.
MVP Minimum viable product: a small usable product to learn whether an approach meets a real need.
Deferred Deliberately left for later consideration or a later release.
User journey The sequence of steps a person takes to reach an outcome.
User story A short statement of who needs a capability, what it is, and why it matters.
Acceptance criteria Observable conditions a behaviour must satisfy before we accept it.
Given/When/Then A way to write an example as a starting situation, an action, and an expected result.
Abuse case An attempt to use the product in a harmful or unauthorized way.
Product rule A condition the product must enforce consistently.
Edge case A situation near a boundary, such as the last place or the closing instant.
Active registration A confirmed place that currently consumes capacity.
Invariant A condition that must always remain true, such as never exceeding capacity.
Concurrent actions Actions whose processing overlaps in time.
Functional requirement What the product does.
Quality requirement How well, or under what conditions, the product must do it.
BRD Business requirements document: problem, people, outcomes, and boundaries.
PRD Product requirements document: behaviour, rules, quality, and open decisions.
Traceability Following a requirement back to its reason and forward to its checks and evidence.
Control A measure that helps enforce a rule.
Scenario, test, evidence A situation to examine; a check executed against an implementation; a record of what actually happened.

Readiness checkpoint: without looking back, explain the difference between a BRD and a PRD, write one Given/When/Then example for cancellation, state the capacity invariant, and name one decision that must be made before implementation.

Git Commit

There is nothing to commit yet. The project and its repository begin in Chapters 6 and 8; until then, keep your BRD, PRD, and register together as one set of working documents.

PAGE 005

Test Your Knowledge: Interview Questions

These five questions rehearse the chapter at interview level, one at each of five levels from junior to lead. L1 and L2 check what you have just learned. L3 asks how it works underneath. L4 and L5 ask about the design and leadership decisions that later chapters build on: attempt them now, and return to them when you reach those chapters. Use the readiness checkpoint to decide whether to continue. If an answer is difficult, revisit its worked example and explain the result in your own words. L4 and L5 are extension questions, not a gate to the next chapter.

L1 (Junior): What makes a good user story, and how is it different from acceptance criteria?

What the interviewer is testing: Do you know what a story is for, and what makes a behaviour checkable?

Flip to check your answerFold answer back

Perfect answer: A story states who needs a capability, what it is, and why it matters: “As a member, I want to cancel my own registration, so that my decision is reflected in the event record.” It starts a conversation; it is not a specification. Acceptance criteria are observable conditions the behaviour must satisfy before we accept it, often written as Given/When/Then: given Raj has an active registration and the cancellation deadline has not passed, when he cancels, then his registration is cancelled, the active count falls by one, and he sees the result. The story says why; the criteria say when the work is done.

Table 2.7 — A user story compared with acceptance criteria
Question User story Acceptance criteria
Answers Who, what, and why When the work is done
Written as As a ..., I want ..., so that ... Given ..., When ..., Then ...
Can it pass or fail? No Yes
Covers refusals? Rarely It should
Becomes A conversation and a plan Checks, then automated tests

Behind the scenes:

Story:  As a member, I want to cancel my own registration,
        so that my decision is reflected in the event record.
AC-1:   before the deadline, cancelling releases one place
AC-2:   after the deadline, cancelling works; marked late
AC-3:   cancelling someone else's registration is refused

Evidence: the registration and cancellation criteria in Step 2.

Common mistakes:

  • Leaving out the reason (“so that ...”).
  • Writing criteria nobody can observe (“cancelling is easy”).
  • Describing only the path where everything goes well.

Follow-up the interviewer might ask:

  • “Write the criterion for cancelling after the deadline.”
  • “Who should write acceptance criteria, and who should agree them?”

L2 (Mid-Level): What is an edge case, and how would you find them for event registration?

What the interviewer is testing: Can you search a rule’s boundaries systematically instead of waiting for bugs?

Flip to check your answerFold answer back
Five numbered steps from top to bottom: take one rule; walk it to its time limits; walk it to its capacity limits; try repeated and reversed actions; write each case as Given, When, Then.
Figure 2.10 — Finding the edges of one rule.

Perfect answer: An edge case is a situation near a boundary, where behaviour is easy to get wrong. Walk each rule to its limits. Capacity: the last place, and two requests for it. Time: the closing instant itself; in Figure 2.6 a request at 17:59:59 is accepted and one at 18:00 is refused. State: cancelling twice, or registering while already registered. Failure: a response lost on the way back (Figure 2.8). Write each one as a Given/When/Then example, so the expected result is decided before anyone writes code.

Behind the scenes:

time:      opening instant, 17:59:59, 18:00
capacity:  19 of 20, 20 of 20, two requests for one place
state:     already registered, cancelled, cancel twice
failure:   request lost, reply lost

Evidence: Figures 2.6 to 2.8 and the rules in Step 3.

Common mistakes:

  • Checking only typical values.
  • Leaving the closing instant ambiguous (“until 18:00”).
  • Assuming one person acts at a time.

Follow-up the interviewer might ask:

  • “Is 18:00 itself included, and where is that written down?”
  • “Which edge case worries you most, and why?”

L3 (Senior): Explain what an invariant is, and why concurrent requests threaten it.

What the interviewer is testing: Do you understand that a rule checked at one moment can be broken by overlapping actions?

Flip to check your answerFold answer back
Five numbered steps from top to bottom: two members request the last place; each reads 19 of 20 taken; each decides there is room; the rule is enforced where the result is recorded; exactly one succeeds and the other is told the event is full.
Figure 2.11 — How overlapping requests threaten an invariant, and where to stop them.

Perfect answer: An invariant is a condition that must always remain true. For Otahque, active registrations never exceed capacity. Suppose two members request the last place at the same moment (Figure 2.7). Each request reads “19 of 20 places taken”, each decides there is room, and each records a registration: 21 of 20. Checking before saving is not enough when the processing overlaps. The rule must be enforced where the result is recorded, so that exactly one request succeeds and the other is told the event is full. Later chapters do this in the database; the requirement’s job is to state the invariant and the expected result for both people.

Behind the scenes:

A reads count = 19      B reads count = 19
A: 19 < 20, so register  B: 19 < 20, so register
A writes registration    B writes registration
count = 21               # the invariant is broken

Evidence: Figure 2.7 and the capacity invariant in Step 3.

Common mistakes:

  • “We check capacity before saving, so it is fine.”
  • Trusting the count the browser displayed.
  • Specifying only what the successful member sees.

Follow-up the interviewer might ask:

  • “How would you test two requests that overlap?”
  • “What exactly should the second member see?”

L4 (Staff): How do functional and quality requirements differ, and how would you write a quality requirement someone can check?

What the interviewer is testing: Can you turn words such as “fast” and “accessible” into something that can pass or fail?

Flip to check your answerFold answer back
Five numbered steps from top to bottom: name the situation; choose a measure; set a threshold; decide how it will be measured; record it in the PRD.
Figure 2.12 — Turning a quality word into a checkable requirement.

Perfect answer: A functional requirement says what the product does: an attendee can cancel. A quality requirement says how well, or under what conditions: the journey works with a keyboard alone, on a narrow screen, or within a stated time. A checkable quality requirement names the situation, the measure, and the threshold. For example: “Every step of registering for an event can be reached and completed using only a keyboard.” Without a measure, nobody can accept or reject the work. Quality requirements often shape the design more than features do, so they belong in the requirements document from the start.

Behind the scenes:

word:        "accessible"
situation:   registering for an event
measure:     can each step be reached with the keyboard alone
threshold:   every step, with focus visible
check:       a person completes it without a mouse

Evidence: the quality expectations in Step 4 and the PRD in Table 2.2.

Common mistakes:

  • Adjectives without measures.
  • Treating quality as polish to add at the end.
  • Setting a threshold with no way to measure it.

Follow-up the interviewer might ask:

  • “Which quality requirement would change Otahque’s design the most?”
  • “How would you measure it before the first release?”

L5 (Lead): How do you keep requirements, checks, and evidence traceable as a product grows, without burying the team in documents?

What the interviewer is testing: Can you make traceability useful and proportionate, and keep evidence honest?

Flip to check your answerFold answer back
Five numbered steps from top to bottom: give each requirement an identifier; link it back to its need; link it forward to controls and checks; record evidence only after a check runs; review the links at each milestone.
Figure 2.13 — Keeping traceability useful as the product grows.

Perfect answer: Give each requirement a stable identifier, such as BR-1 or PR-2, and link it both ways: back to the need it serves, and forward to the controls, checks, and evidence (Figure 2.9). Keep the links where people already work: identifiers in story titles, test names, and change descriptions, with one requirements document as the source. Record evidence only after a check has actually run, with its date and source; a planned test is not evidence. Review the links at each milestone: a requirement with no check is unverified, and a check with no requirement may be unnecessary. Trace product rules and risks closely, not every wording change.

Behind the scenes:

PR-2  need: Raj can tell his result   control: server rule
      check: cancel twice, inspect the count
      evidence: (empty until the check runs)
      -> later: "passed, test run on <date>, <where>"

Evidence: the working register in Table 2.3.

Common mistakes:

  • Copying requirements into several documents that drift apart.
  • Marking a requirement done because code exists.
  • Keeping a large matrix that nobody updates.

Follow-up the interviewer might ask:

  • “A test passes, but the requirement it traces to has changed. What do you do?”
  • “What is the least traceability you would keep on a small team?”

Next: Chapter 3 explains how the web works. We will use these same journeys to understand what happens when a person opens an event page or submits a registration request.

PAGE 006