Product EngineeringVol. 15 · Part XV
0 / 0

Shelves / Product Engineering

PE·185

Requirements Engineering

Getting requirements right enough to build and verify: elicitation techniques and stakeholders, functional requirements as user stories, use cases and EARS-style statements, non-functional requirements (quality attributes from ISO/IEC 25010) made measurable with quality-attribute scenarios, assumptions, constraints and dependencies tracked in a RAID log, systematic edge-case discovery (equivalence partitions, boundaries, state machines, time and time zones, concurrency, failures, abuse), acceptance tests written in Gherkin and executed with behave, pytest, Cucumber and godog, property-based tests with Hypothesis that find the cases you forgot, requirements smells and how to fix them, traceability, change management, and how requirements work differs across agile teams, regulated domains and AI features, applied to TiffinBox's skip-and-credit feature end to end.

28 topics · ~23 min read · 28-question quiz
Updated Suggest a correction

Start here: saying exactly what "done" means

A requirement is a statement of what a system must do (functional) or how well it must do it (non-functional: speed, security, accessibility, cost). Most expensive bugs aren't coding mistakes; they're requirements that people understood differently.

One sentence, four programs

"A subscriber can skip a delivery up to the day before." Four reasonable engineers implement it:

Reading Rule
A any time on an earlier calendar day
B by 20:00 the evening before (when the kitchen orders ingredients)
C at least 24 hours before the 12:30 delivery
D by the end of the previous working day

The lab ran 20,000 realistic skip requests through all four: they all agreed on only 73%. A request at 21:00 on Monday for Tuesday's lunch is accepted by A and D and refused by B and C. Every one of those disagreements is a support ticket, a wasted meal or a refund.

The fix: examples, not adjectives

Turn requirements into concrete examples that people can agree on and machines can check:

Gherkin
Scenario: Skipping the evening before, after the kitchen cut-off
  Given a Tuesday lunch delivery at 12:30
  When the subscriber skips it on Monday at 21:00
  Then the skip is refused
  And they see "It's too late to skip Tuesday. You can skip Wednesday or later."

Writing that example forces the question "what's the cut-off?", and the answer comes from the business (the kitchen's ordering time), not from whichever engineer gets the ticket.

And for the cases nobody thought of

Property-based tests check a rule against thousands of generated cases. The lab's property "a bill is never negative" found, in 8 seconds, a month where a subscriber was owed ₹120 (a skipped day that was also paused and a holiday was credited twice); "the bill equals the meals actually delivered" found that February has only 20 working days, but the plan charged for 22. The second is a requirements gap, not a coding bug: "22 lunches a month" never said what happens in short months.

How deep to go in requirements engineering

Volume 17 defines six mastery levels; for requirements they look like this:

Level You can…
L1 tell functional from non-functional requirements and spot vague ones
L2 write clear requirements with acceptance criteria and examples
L3 elicit from stakeholders, specify quality attributes measurably and analyse edge cases
L4 find gaps and conflicts with examples, models and property-based tests
L5 run requirements for a product area with traceability and change control
L6 set requirements practice for regulated or safety-critical domains

What requirements engineering is

Requirements engineering is the work of discovering, documenting, validating and managing what a system must do and how well. Its job is to reduce the risk of building the wrong thing (chapter 182) and the cost of finding out late: a misunderstood requirement found in production costs far more than one found in a conversation.

Activities:

  1. Elicitation: discover needs from stakeholders, users, data and documents.
  2. Analysis: resolve conflicts, find gaps, prioritise, check feasibility.
  3. Specification: write requirements clearly enough to build and test.
  4. Validation: confirm with stakeholders that they're the right requirements (reviews, prototypes, examples).
  5. Management: track changes, dependencies and traceability over time.

In agile teams this happens continuously and collaboratively ("three amigos": product, development, testing discussing each story with examples), not in a big upfront document; but the activities are the same.

Stakeholders and elicitation

Stakeholders for TiffinBox's skip feature: subscribers (hybrid and full-time), kitchen partners, riders and dispatch, customer support, finance (credits are a liability on the balance sheet), legal/compliance (payments rules), marketing, the engineering teams owning payments and scheduling.

Technique Good for
Interviews and observation (chapter 182) Needs, workflows, pain points
Workshops and example mapping Shared understanding of rules and edge cases
Document and data analysis Existing rules (kitchen cut-offs, payment regulations), real usage patterns
Support-ticket mining Real problems and edge cases
Prototypes Validating understanding quickly
Shadowing operations Back-stage constraints (how kitchens plan quantities)

Example mapping (Matt Wynne): for one story, write the rules (blue cards), concrete examples of each rule (green), and open questions (red). Many red cards mean the story isn't ready.

story: skip a delivery cut-off 07:00on delivery day skip = 1 credit(once per day) only scheduleddelivery days undo beforecut-off 06:59 → skipped 07:00 → too late skip twice → 1 credit Saturday → rejected Diwali → rejected undo → credit −1 questions (must be answered first) · do credits expire? · refunds of credits on cancellation? · subscriber travelling outside IST? · kitchen closes after the cut-off?
Example mapping for the skip story. The story sits at the top; beneath it are the business rules, each with concrete examples that will become acceptance tests; open questions are collected separately and must be answered before the story is ready to build.

Functional requirements

Functional requirements describe behaviour: inputs, outputs, rules, states.

Formats

  • User stories (chapter 181) for conversation and planning, each with acceptance criteria.
  • Use cases for richer interactions: actor, preconditions, main success scenario, extensions (alternatives and errors), postconditions. Good for complex flows such as payment recovery.
  • Shall statements with controlled syntax for precision. The EARS patterns (Easy Approach to Requirements Syntax, from Rolls-Royce) reduce ambiguity:
EARS pattern Template Example
Ubiquitous The <system> shall <response> The scheduler shall record every skip with the actor and timestamp.
Event-driven When <trigger>, the <system> shall <response> When a subscriber skips a scheduled delivery before the cut-off, the scheduler shall cancel the delivery and add one meal credit.
State-driven While <state>, the <system> shall <response> While a subscription is paused, the scheduler shall not create deliveries.
Unwanted behaviour If <condition>, then the <system> shall <response> If a skip request arrives after the cut-off, then the scheduler shall reject it and offer to gift the meal.
Optional feature Where <feature>, the <system> shall <response> Where team accounts are enabled, the scheduler shall let admins skip on behalf of members.

Business rules and domain language

Capture rules separately from screens: "A skip is allowed iff the delivery is scheduled, the subscription is active, and the current time (IST) is before 07:00 on the delivery date." Name concepts consistently (delivery, skip, credit, cut-off) and keep a glossary: the ubiquitous language of domain-driven design (Volume 13) starts in requirements.

Non-functional requirements

Non-functional requirements (NFRs, quality attributes) describe how well the system must behave. They drive architecture far more than features do (Volumes 12–13).

Quality attributes

ISO/IEC 25010 lists product quality characteristics including functional suitability, performance efficiency, compatibility, interaction capability (usability), reliability, security, maintainability, flexibility (portability) and safety. In practice the common NFR categories are:

Category TiffinBox examples
Performance Skip confirmation p95 ≤ 2 s on 4G; menu loads ≤ 2.5 s LCP on mid-range Android
Availability / reliability Skip and delivery APIs 99.9% monthly, measured 06:00–14:00 IST; no lost skips
Scalability 50k subscribers, 10× peak at 06:30–07:00 (cut-off rush)
Security Only the subscriber (or team admin) can skip their deliveries; audit log of all changes
Privacy Office addresses visible to assigned rider only; DPDP-compliant consent and retention
Accessibility WCAG 2.2 AA for web; TalkBack/VoiceOver support for all scheduling flows
Localisation English, Hindi and Telugu; IST; Indian number formats
Maintainability Business rules (cut-offs, holidays) configurable without deploys
Compliance RBI e-mandate rules: pre-debit notification ≥ 24 h before recurring charges
Operability Skips visible to kitchens within 15 minutes; alerts if sync lags

Make NFRs measurable

"The app should be fast" can't be built or tested. A quality-attribute scenario (from the Software Engineering Institute's architecture methods) makes it concrete:

Part Example
Source 5,000 subscribers
Stimulus Submit skip requests between 06:45 and 07:00 IST
Artefact Scheduling service and database
Environment Normal operation, one availability zone degraded
Response Each request is confirmed or rejected with a clear reason; no duplicate credits
Response measure p95 latency ≤ 2 s; error rate ≤ 0.1%; zero lost or duplicated skips (verified by reconciliation)

Each NFR should have a metric, a target, a measurement method (load test, SLO dashboard, audit, accessibility test) and an owner. Many become SLOs (chapter 183) and automated tests.

Assumptions, constraints and dependencies

Track them explicitly; many project failures are an assumption nobody wrote down.

Type Definition TiffinBox examples
Assumption Believed true, not verified; must be validated Credits are acceptable to users; kitchens can handle a 07:00 cut-off with ≤ 4% waste
Constraint Fixed limitation Kitchen tablets sync every 15 minutes; RBI pre-debit notification rules
Dependency Something we need from others Payments team adds credit-adjusted mandate amounts; kitchen-app team shows skips in prep lists; legal review of credit terms

A RAID log (Risks, Assumptions, Issues, Dependencies) with owners and dates keeps them visible. Each assumption gets a validation plan (chapter 182); each dependency an owner, a date and a fallback (if the kitchen app can't update in time, export skip lists by email at 07:05).

Edge cases

Edge cases are where requirements and reality diverge. Find them systematically:

Equivalence partitions and boundaries

Partition inputs into classes treated the same way, then test boundaries where behaviour changes:

Input Partitions Boundary values
Time of skip (IST, delivery day D) Days before D; D before 07:00; D at/after 07:00; after D D−1 23:59, D 06:59:59, D 07:00:00, D 07:00:01
Delivery day Scheduled weekday; weekend; holiday; outside plan dates Plan start date, plan end date, holiday eve
Meals remaining > 1; exactly 1; 0 0 and 1
Skip count for a day First; repeated Second identical request

State machines

Model entities as states and transitions; every (state, event) pair is a potential edge case:

scheduled skipped locked out for delivery delivered failed skip < 07:00 undo 07:00 dispatch skip while locked/out → rejectfailed → credit + apology
State machine for a delivery. A scheduled delivery can be skipped before the cut-off, which can be undone back to scheduled before the cut-off; at the cut-off it becomes locked for preparation, then out for delivery, then delivered or failed. Each arrow is a rule; each missing arrow, such as skipping while out for delivery, must be an explicit rejection with a clear message.

Checklists of classic edge cases

  • Time: time zones (IST has no daylight saving, but travellers' phones may be in other zones; always evaluate cut-offs in IST server-side), clock skew between devices and servers, midnight and month boundaries, leap years, holiday calendars changing after scheduling.
  • Concurrency: double taps, two devices, the subscriber skipping while support edits the same delivery, requests racing the 07:00 lock job (who wins? decide and enforce with a transaction or conditional update).
  • Idempotency and retries: the client retries after a timeout; the skip must not credit twice (idempotency keys, chapter 168).
  • Partial failure: delivery cancelled but credit write failed; kitchen sync delayed. Define the consistency guarantee and the reconciliation.
  • Empty, null and huge: no deliveries scheduled; very long notes; 200 skips in a bulk action.
  • Permissions: team admins skipping for members; suspended accounts; deleted accounts.
  • Money: rounding, refunds of credits on cancellation, credits expiring, taxes (GST on meals), negative balances.
  • Abuse: scripted skip/unskip loops to game something; very late skips that waste food.
  • Accessibility and devices: screen reader announcements, offline mode, low storage.
  • Operations: kitchen closures after cut-off, rider no-shows, app versions too old to know about credits.

Acceptance tests

Acceptance tests turn requirements into executable checks that both business and engineering can read. Behaviour-driven development (BDD) writes them in Gherkin; tools bind each step to code.

Gherkin

Gherkin
Feature: Skip a delivery for a meal credit
  Rules: skips are allowed until 07:00 IST on the delivery day; each skipped delivery earns one credit.

  Background:
    Given a subscriber "harsha" with an active plan
    And a delivery scheduled for "2026-10-22"

  Scenario: Skip just before the cut-off
    Given the time is "2026-10-22 06:59" IST
    When "harsha" skips the delivery for "2026-10-22"
    Then the delivery for "2026-10-22" is "skipped"
    And "harsha" has 1 credit

  Scenario: Skip at the cut-off is rejected
    Given the time is "2026-10-22 07:00" IST
    When "harsha" skips the delivery for "2026-10-22"
    Then the skip is rejected with "already being prepared"
    And "harsha" has 0 credits

  Scenario: Repeating a skip does not add a second credit
    Given the time is "2026-10-21 20:00" IST
    When "harsha" skips the delivery for "2026-10-22"
    And "harsha" skips the delivery for "2026-10-22"
    Then "harsha" has 1 credit

  Scenario Outline: Skips are evaluated in IST whatever the phone's time zone
    Given the time is "<utc>" UTC
    When "harsha" skips the delivery for "2026-10-22"
    Then the result is "<result>"
    Examples:
      | utc              | result   |
      | 2026-10-22 01:29 | skipped  |
      | 2026-10-22 01:30 | rejected |

The domain code under test

Python
# scheduling.py — the domain logic the acceptance tests exercise
from dataclasses import dataclass, field
from datetime import datetime, date, time, timedelta, timezone

IST = timezone(timedelta(hours=5, minutes=30))
CUTOFF = time(7, 0)

class SkipRejected(Exception): pass

@dataclass
class Subscriber:
    name: str
    credits: int = 0
    deliveries: dict = field(default_factory=dict)      # date -> "scheduled" | "skipped" | "locked"

def skip(sub: Subscriber, day: date, now: datetime) -> str:
    """Skip a scheduled delivery. `now` must be timezone-aware; rules are evaluated in IST."""
    if now.tzinfo is None:
        raise ValueError("now must be timezone-aware")
    state = sub.deliveries.get(day)
    if state is None:
        raise SkipRejected("no delivery scheduled that day")
    if state == "skipped":
        return "skipped"                                 # idempotent: no second credit
    cutoff = datetime.combine(day, CUTOFF, tzinfo=IST)
    if now.astimezone(IST) >= cutoff or state != "scheduled":
        raise SkipRejected("today's meal is already being prepared")
    sub.deliveries[day] = "skipped"
    sub.credits += 1
    return "skipped"

Step definitions

# features/steps/skip_steps.py — behave step definitions binding Gherkin to the domain
from datetime import datetime, date, timezone
from behave import given, when, then
from scheduling import Subscriber, skip, SkipRejected, IST

def parse_day(s): return date.fromisoformat(s)

@given('a subscriber "{name}" with an active plan')
def step_subscriber(ctx, name): ctx.subs = {name: Subscriber(name)}

@given('a delivery scheduled for "{day}"')
def step_delivery(ctx, day):
    for s in ctx.subs.values(): s.deliveries[parse_day(day)] = "scheduled"

@given('the time is "{ts}" IST')
def step_time_ist(ctx, ts): ctx.now = datetime.fromisoformat(ts).replace(tzinfo=IST)

@given('the time is "{ts}" UTC')
def step_time_utc(ctx, ts): ctx.now = datetime.fromisoformat(ts).replace(tzinfo=timezone.utc)

@when('"{name}" skips the delivery for "{day}"')
def step_skip(ctx, name, day):
    try:
        ctx.result, ctx.error = skip(ctx.subs[name], parse_day(day), ctx.now), None
    except SkipRejected as e:
        ctx.result, ctx.error = "rejected", str(e)

@then('the delivery for "{day}" is "{state}"')
def step_state(ctx, day, state):
    assert next(iter(ctx.subs.values())).deliveries[parse_day(day)] == state

@then('the skip is rejected with "{text}"')
def step_rejected(ctx, text): assert ctx.result == "rejected" and text in ctx.error, ctx.error

@then('"{name}" has {n:d} credit')
@then('"{name}" has {n:d} credits')
def step_credits(ctx, name, n): assert ctx.subs[name].credits == n, ctx.subs[name].credits

@then('the result is "{result}"')
def step_result(ctx, result): assert ctx.result == result, (ctx.result, ctx.error)

With scheduling.py and the step file in place, behave runs the feature: 5 scenarios and 28 steps pass, including both time-zone examples. The Java, Go and Kotlin tabs show the same bindings in other stacks.

Guidance:

  • Write scenarios in business language at the level of rules and outcomes ("skips the delivery"), not UI mechanics ("clicks the button with id skip-btn"); UI journeys belong in a smaller set of end-to-end tests (Volume 11's test pyramid).
  • One rule per scenario; concrete examples; avoid long chains of steps.
  • Keep acceptance tests fast by running most of them against the domain or API layer.
  • Acceptance tests are the living documentation of business rules; review them with stakeholders.

Property-based tests: finding the cases you forgot

Examples test what you thought of. Property-based testing states rules that must hold for all inputs and lets a library search for counterexamples (Hypothesis in Python, jqwik in Java, fast-check in TypeScript, proptest in Rust, rapid/gopter in Go):

Python
from datetime import datetime, date, timedelta, timezone
from hypothesis import given, strategies as st, settings
from scheduling import Subscriber, skip, SkipRejected, IST

days = st.dates(min_value=date(2026, 1, 1), max_value=date(2027, 12, 31))
offsets = st.integers(min_value=-48 * 60, max_value=48 * 60)          # minutes around the cut-off
zones = st.sampled_from([timezone.utc, IST, timezone(timedelta(hours=-5)), timezone(timedelta(hours=9))])

@settings(max_examples=500)
@given(day=days, minutes=offsets, tz=zones)
def test_skip_allowed_iff_before_cutoff_in_ist(day, minutes, tz):
    cutoff = datetime.combine(day, datetime.min.time(), tzinfo=IST) + timedelta(hours=7)
    now = (cutoff + timedelta(minutes=minutes)).astimezone(tz)        # same instant, any phone time zone
    sub = Subscriber("p", deliveries={day: "scheduled"})
    try:
        skip(sub, day, now); allowed = True
    except SkipRejected:
        allowed = False
    assert allowed == (minutes < 0)                                   # property: only before the cut-off
    assert sub.credits == (1 if allowed else 0)

@given(day=days, repeats=st.integers(min_value=1, max_value=5))
def test_skip_is_idempotent(day, repeats):
    sub = Subscriber("p", deliveries={day: "scheduled"})
    now = datetime.combine(day, datetime.min.time(), tzinfo=IST)     # midnight IST, before the cut-off
    for _ in range(repeats): skip(sub, day, now)
    assert sub.credits == 1

Run with pytest: both properties pass across hundreds of generated days, offsets and time zones. Break the code on purpose (compare now without converting to IST, or use > instead of >= at the cut-off) and Hypothesis reports a minimal failing case such as an offset of exactly 0 minutes.

Properties worth stating for most features: idempotency (repeating an operation changes nothing more), round-trips (serialise then parse = identity), invariants (credits never negative; total credits = number of skipped deliveries), commutativity where expected, and equivalence with a simpler model (a slow but obviously correct implementation).

Requirements smells

Smell Example Fix
Ambiguity "Skips should be processed quickly" Quantify: p95 ≤ 2 s; kitchens see it within 15 min
Vague quantifiers "Most users", "rarely", "user-friendly" Numbers and defined segments
Solution as requirement "Use Redis to store skips" State the need (latency, durability); leave design to design
Compound requirements "Skip and refund and notify" One requirement per statement
Unverifiable "The system shall be secure" Specific controls and tests
Missing negatives Only the happy path Unwanted-behaviour (If…then) requirements; edge-case checklist
Implicit assumptions "Credits are fine" RAID log, validation plan
Inconsistent terms "Skip", "pause", "cancel day" used interchangeably Glossary; ubiquitous language

LLMs are useful requirement reviewers: ask one to list ambiguities, missing edge cases and conflicts in a spec, then judge its suggestions; they surface plausible gaps quickly but can't know your domain constraints.

Traceability and change

  • Traceability: link business goals → requirements → design decisions (ADRs, chapter 186) → code → tests → releases. Lightweight versions: story ids in branch names and commit messages, test names referencing rules, feature flags named after stories. Regulated domains (medical, automotive, finance) require formal traceability matrices.
  • Change management: requirements change as you learn; that's healthy. Make changes visible (versioned specs, changelogs on tickets), assess impact (tests, dependencies, NFRs), and re-validate with stakeholders. Distinguish clarifications from new scope.
  • Definition of Ready / Done: a story is ready when rules, examples and open questions are resolved enough to start; done when acceptance tests pass, NFRs are met, docs and monitoring are updated, and it's deployed (or releasable) behind its flag.

Requirements for AI features

AI features (Volume 14) need requirements that accept non-determinism:

  • Quality targets as rates on evaluation sets, not absolutes ("menu-question answers grounded in the menu ≥ 98% on the golden set").
  • Refusal and escalation behaviour ("questions about allergies are answered only from labelled ingredient data, else escalate to support").
  • Safety and privacy requirements (no personal data in prompts sent to providers without a data-processing agreement).
  • Latency and cost budgets per request.
  • Acceptance tests become eval suites with thresholds (chapter 175).

Lab: measuring ambiguity and finding gaps

Setup. Python 3.13 and Hypothesis with pytest on the lab machine. The requirements come from the TiffinBox case; the code is written for the lab, including two deliberate defects in the billing function, so that the tests have something real to find.

Experiment 1: one sentence, four implementations

Requirement: "A subscriber can skip a delivery up to the day before." Four implementations, each a reasonable reading:

Python
def a(req, deliv): return req.date() < deliv.date()                         # any earlier calendar day
def b(req, deliv): return req <= datetime.combine(deliv.date() - timedelta(days=1), time(20, 0))  # 20:00 cut-off
def c(req, deliv): return deliv - req >= timedelta(hours=24)                # 24 h before 12:30
def d(req, deliv):                                                          # previous working day
    prev = deliv.date() - timedelta(days=1)
    while prev.weekday() >= 5: prev -= timedelta(days=1)
    return req.date() <= prev

20,000 skip requests for weekday deliveries in November 2026, each made at a random time in the four days before delivery:

Pair Disagree
A vs B 4.4%
A vs C 12.3%
A vs D 19.4%
B vs C 7.9%
B vs D 20.3%
C vs D 21.9%
all four agree 73.2%

Concrete cases:

Request Delivery A B C D
Mon 21:00 Tue 12:30 yes no no yes
Mon 13:00 Tue 12:30 yes yes no yes
Sun 10:00 Mon 12:30 yes yes yes no
Tue 09:00 Tue 12:30 no no no no

The disagreement rate depends on when people actually skip (a real distribution would come from data), but no plausible distribution makes it zero. The table of concrete cases is the useful artefact: put it in front of the product owner and operations, and the ambiguity is resolved in minutes. Each row becomes an acceptance test.

Experiment 2: property-based tests on the billing rule

Requirement: "The plan is 22 lunches a month at ₹120. Skipped and paused working days aren't charged; a pause is at most 7 days; days the kitchen is closed for a holiday aren't charged." The implementation charges 22 × ₹120 and subtracts credits. Three properties, 2,000 generated scenarios each (any month in 2026–27, any set of skips, an optional pause of 0–10 days, up to 3 holidays):

Property Result Minimal failing case found
a bill is never negative fails January 2026, almost every day skipped, a 7-day pause starting 1 January, 1 January also a holiday: bill −₹120
the bill equals ₹120 × days actually delivered (max 22) fails February 2026, no skips or pauses: charged ₹2,640 for 20 working days
skipping one more day never costs more passes —

Hypothesis found and shrank both failures in about 8 seconds. They are different kinds of problem:

  • The negative bill is a coding defect: a day that was skipped, paused and a holiday was credited up to three times. The fix is to credit the set of undelivered days once.
  • The February charge is a requirements gap: "22 lunches a month" contradicts "skipped days aren't charged" in a month with 20 working days. Engineering can't fix it alone: does the plan mean "every working day, up to 22" or "22 meals, carried over"? Someone has to decide, and the decision changes revenue.

Try it yourself

  1. Write the four concrete cases from Experiment 1 as Gherkin scenarios and run them with pytest-bdd against implementation B.
  2. Fix the double-credit defect and rerun; then add a property that credits never exceed the month's charge.
  3. Write a measurable version of "skipping should be fast" and a load test that checks it.
  4. Take a vague requirement from your backlog and produce its table of concrete cases.

Revision sheet: requirements engineering

Key ideas

  • Requirements state what and how well, not how; they come from stakeholders (users, business, operations, legal, support) through interviews, observation, workshops and documents.
  • Functional requirements: behaviours, rules, data; non-functional: performance, reliability, security, privacy, accessibility, usability, maintainability, cost, each with a measurable target.
  • Record assumptions, constraints and dependencies explicitly.
  • Edge cases: boundaries, empty/maximal values, time (cut-offs, time zones, month lengths, holidays), concurrency, failure and retries, permissions.
  • Acceptance tests from examples (Given/When/Then); property-based tests for rules over many inputs.
  • Smells: vague adjectives, "etc.", passive voice hiding the actor, untestable statements, solutions in disguise, conflicting rules.
  • Traceability and change: link requirements to tests and code; review changes for impact.
  • AI features: specify behaviour with eval sets, acceptable error rates, refusal behaviour, latency and cost budgets.

Numbers to remember

  • Lab: four readings of one sentence agreed on 73.2% of requests.
  • Lab: Hypothesis found a −₹120 bill and a 20-day February in ~8 s.

Pitfalls

  • Accepting adjectives ("fast", "user-friendly", "up to the day before") without numbers or examples.
  • Leaving business rules for engineers to guess.
  • Testing only the examples you thought of.
  • Treating requirements gaps as bugs to fix silently in code.
  • No owner for non-functional requirements.

Glossary

  • Functional / non-functional requirement: behaviour / quality attribute.
  • Specification by example: requirements expressed as concrete examples.
  • Gherkin: the Given/When/Then format.
  • Property-based testing: checking invariants on generated inputs.
  • Traceability matrix: links between requirements, design, code and tests.