Requirements & Estimation
Figuring out what to build and how long it takes — functional and non-functional requirements, user stories and acceptance criteria, INVEST, prioritisation (MoSCoW, RICE), story points vs time, planning poker, the cone of uncertainty, estimating with ranges, and why estimates go wrong.
The most expensive bugs aren't in code — they're building the wrong thing. And the most common source of friction between engineers and the rest of a business is estimates. Both are skills you can get much better at.
Kinds of requirements
| Kind | Describes | Examples |
|---|---|---|
| Functional | What the system does | "Users can reset their password by email"; "Admins can export orders as CSV" |
| Non-functional (quality attributes) | How well it does it | Performance, availability, security, scalability, accessibility, maintainability |
| Constraints | Fixed limits on the solution | "Must run on our existing PostgreSQL", "Data must stay in India", budget, deadlines |
Non-functional requirements drive architecture far more than functional ones. "Show the user's orders" is easy; "...in under 200 ms at p99 for 50 million users, with 99.95% availability" determines the whole design (System design). Make them measurable: not "fast", but "p95 search latency under 300 ms at 1,000 requests/second".
Discovering requirements
- Talk to users and watch them work; ask about the problem, not their proposed solution ("why?" several times).
- Look at data: support tickets, analytics, logs.
- Prototype and sketch — people react to concrete things far better than to abstract specs.
- Identify stakeholders beyond users: support, legal, security, finance, operations.
- Write down assumptions and non-goals explicitly ("This release won't support multiple currencies").
- Watch for edge cases: empty states, errors, permissions, concurrency, internationalisation, migration of existing data.
User stories
A lightweight format centred on users and value:
As a <type of user>, I want <capability> so that <benefit>.
As a returning customer, I want to reorder a previous order in one click
so that I can restock groceries quickly.A story is a placeholder for a conversation, not a complete spec. It's completed with acceptance criteria, often in Given–When–Then form (which maps directly to automated tests — Testing):
Scenario: Reorder with an out-of-stock item
Given I have a past order containing milk and bread
And bread is out of stock
When I click "Reorder"
Then milk is added to my cart
And I see a message that bread is unavailableINVEST
Good stories are:
| Letter | Meaning |
|---|---|
| Independent | Can be built and delivered in any order |
| Negotiable | Details are worked out collaboratively |
| Valuable | Delivers value to a user or the business |
| Estimable | Understood well enough to estimate |
| Small | Fits comfortably in an iteration (a few days of work) |
| Testable | Has clear acceptance criteria |
Splitting large work
Split vertically (thin end-to-end slices of user value), not horizontally ("backend story", "frontend story", "database story" — none valuable alone). Ways to slice: by workflow step, by business rule, by data variation, happy path first then error cases, simple UI first, one platform first. "Reorder" could start as "reorder all items with no stock checks" for internal users.
Prioritisation
There's always more to build than time allows.
| Method | How |
|---|---|
| MoSCoW | Must have / Should have / Could have / Won't have (this time) |
| RICE | (Reach × Impact × Confidence) ÷ Effort — a rough score for comparing ideas |
| Value vs effort matrix | Quick wins first; question big-effort, low-value items |
| Cost of delay / WSJF | Prioritise by how much value is lost per week of waiting, divided by duration |
| Kano model | Basic expectations vs performance features vs delighters |
Ship the smallest thing that tests the riskiest assumption — the MVP (minimum viable product) — and let real usage drive what comes next.
Estimation
Why estimate?
Estimates inform decisions: is this worth doing, what to do first, what can we promise for a launch date, how many people do we need? If no decision depends on it, don't spend time on a precise estimate.
Story points vs time
| Story points | Time (hours/days) | |
|---|---|---|
| Measures | Relative size: effort + complexity + uncertainty | Absolute duration |
| Scale | Fibonacci-like (1, 2, 3, 5, 8, 13) — gaps grow because uncertainty grows | Continuous |
| Converted to dates via | Team's measured velocity | Directly (minus interruptions, meetings, reviews…) |
| Pitfalls | Misused as productivity metrics; compared across teams | Treated as commitments; ignore non-coding time |
Some teams skip both and simply count items (#NoEstimates): if stories are consistently small, throughput in items per week forecasts as well as points.
Planning poker: everyone reveals an estimate at once; the highest and lowest explain their reasoning. The discussion — surfacing hidden complexity or a simpler approach — is the real value.
The cone of uncertainty
Early in a project, estimates can be off by a factor of 4× in either direction; uncertainty narrows as requirements, design and code become concrete. So:
- Give ranges, not single numbers: "3–6 weeks, most likely 4".
- Attach a confidence level: "80% confident we're done by 15 March".
- Re-estimate as you learn, and communicate changes early.
Techniques
- Decompose: break the work into pieces of a day or two; estimate each; add integration, testing, review, deployment and documentation time explicitly.
- Reference class forecasting: "the last three similar integrations took 3, 5 and 7 weeks" — historical data beats intuition.
- Three-point (PERT): optimistic O, most likely M, pessimistic P → expected ≈ (O + 4M + P) / 6.
- Spikes: time-boxed investigations to reduce uncertainty before estimating.
- Monte Carlo forecasting from historical throughput: simulate thousands of possible futures to answer "when will these 40 items be done?" with probabilities.
Why estimates go wrong
| Cause | Mitigation |
|---|---|
| Optimism bias and the planning fallacy — imagining the happy path | Use historical data; estimate the unhappy paths |
| Forgetting non-coding work: reviews, tests, meetings, on-call, deploys | Track real capacity; include it explicitly |
| Unknown unknowns | Ranges, buffers, spikes, early integration |
| Scope creep | Make trade-offs explicit: add something, remove something |
| Estimates turned into deadlines under pressure | Separate estimates (forecasts) from commitments (decisions) |
| Hofstadter's law: it always takes longer than you expect, even when you take Hofstadter's law into account | Humility; measure and learn |
| Adding people to a late project | Brooks's law: it makes it later (onboarding and communication overhead) |
Communicating estimates
- Explain assumptions and risks along with the number.
- Offer options: "The full version is ~6 weeks; a version without bulk import is ~3 weeks."
- Fix two of scope, time and resources; the third must flex (quality shouldn't).
- Update stakeholders as soon as an estimate changes — bad news early is far cheaper than late.
- Requirements are functional, non-functional (measurable quality attributes) and constraints; non-functional ones drive architecture.
- Discover requirements by understanding problems, not collecting solutions; record assumptions and non-goals.
- User stories plus Given–When–Then acceptance criteria; follow INVEST; split vertically.
- Prioritise with MoSCoW, RICE, cost of delay; ship an MVP to test the riskiest assumptions.
- Estimates support decisions: use relative sizing or counts, ranges with confidence, decomposition and historical data.
- Expect the cone of uncertainty, optimism bias and scope creep; communicate assumptions, options and changes early.