PE·CS
Case Studies: Product Engineering End to End
The whole volume applied to one feature from first signal to post-launch review: TiffinBox's flexible-skipping feature taken through problem framing, discovery evidence, a metrics plan with SQL, UX flow and accessibility decisions, requirements and acceptance tests, trade-off decisions recorded as ADRs, an experiment and rollout plan, launch and the review that decided what happened next; then two practice cases (B2B team lunches and an AI menu assistant) with prompts and model answers, and a product-engineering review rubric you can use on your own work.
Start here: how to use the case studies
Each earlier chapter taught one discipline in isolation. Real features need all of them at once, in order, with each step's output feeding the next: a signal becomes a problem statement, the statement points discovery at the riskiest assumptions, the evidence shapes the metrics plan and the design, the design becomes requirements and tests, and the build forces trade-offs. Case 1 walks the whole chain for one TiffinBox feature with every artefact shown; cases 2 and 3 give you the signal and the constraints and ask you to produce the artefacts yourself, with a model answer folded away.
How to work through them. Read case 1 once straight through, noting for each step which chapter it uses. Then do cases 2 and 3 on paper (or in a doc) before opening the model answers, and score your work with the review rubric at the end. Experienced readers can start with the rubric, score a recent project of their own, and read only the parts of case 1 that cover their weakest dimensions.
How deep to go in end-to-end product engineering
Volume 17 defines six mastery levels; for running a feature end to end they look like this:
| Level | You can… |
|---|---|
| L1 | follow case 1 and name the chapter behind each step |
| L2 | produce each artefact for a small feature with guidance |
| L3 | do cases 2 and 3 independently and score well on the rubric |
| L4 | spot the weakest step in a real project and fix it |
| L5 | lead a feature end to end with a team, from signal to post-launch review |
| L6 | make this the normal way of working across teams |
Case 1: flexible skipping, end to end
1. Signal
Weekly metrics review (chapter 183): week-4 retention has fallen for three consecutive monthly cohorts, from 44% to 38%; cancellations spike in week 3. Founders' framing: "Customers love the food but cancel after a month."
2. Framing the problem (chapter 181)
- Segment the metric before theorising: retention by schedule shows hybrid subscribers at 63% → 26% from week 4 to week 12 versus 77% → 47% for full-time (chapter 183's mature-cohort table). The decline is concentrated in hybrid users, whose share has grown.
- Mine evidence: cancellation survey reasons (41% "paying for meals I don't need"), ~600 skip requests per week to support, support handle time, NPS comments.
- Problem statement: hybrid-schedule subscribers need to avoid paying for lunches on WFH days, because skipping requires messaging support before 21:00 the previous day; this drives cancellations and support cost.
- Outcome and guardrails: week-4 retention for hybrid cohorts 38% → 50%; gross margin per delivered meal ≥ ₹38; on-time delivery ≥ 95%; kitchen waste ≤ 4%.
3. Discovery (chapter 182)
| Assumption | Test | Result |
|---|---|---|
| Hybrid users churn mainly from paying for unused meals | 10 interviews (6 churned) | 8/10 described WFH-day waste unprompted; 4 also mentioned menu fatigue (a second opportunity) |
| Credits feel fair (vs refunds) | Clickable prototype, 6 users; fake-door "Credits" link on renewal page | 5/6 preferred credits if they never expire within the plan; 9% click-through on the fake door |
| A 07:00 cut-off is operationally viable | Two-week concierge pilot with 3 kitchens (support handled skips manually until 07:00) | Waste rose from 2.9% to 3.6%: within the 4% guardrail |
| Users can find and use skip | Usability test, 5 users, prototype | 4/5 succeeded; one looked under Account → moved Skip into Plan and added a card on Home (tree test confirmed 9/10) |
| Gateway supports credit-adjusted mandates | 2-day spike in the sandbox | Yes, but pre-debit notifications must show the adjusted amount ≥ 24 h before charging |
Decision: proceed, with credits that don't expire within an active plan, a 07:00 cut-off, Skip under Plan plus a Home card.
4. Metrics plan (chapter 183)
- Primary: week-4 retention of hybrid subscribers (definition versioned in the semantic layer).
- Leading indicator: share of hybrid subscribers who skip at least once in week 1 (validated: users who skipped in week 1 during the concierge pilot retained better; causality to be tested).
- Guardrails: margin per delivered meal, on-time rate, kitchen waste, support contacts per 100 subscribers, crash-free sessions.
- Instrumentation: server-side
delivery_skipped,credit_issued,credit_redeemedevents from the scheduling service; client-sideskip_viewed,skip_tapped,skip_undofor UX analysis; experiment exposure events.
-- Guardrail: kitchen waste rate per day (meals prepared but not delivered or gifted), from operations data
SELECT kitchen_id, delivery_date,
SUM(prepared) AS prepared,
SUM(prepared - delivered - gifted) * 1.0 / NULLIF(SUM(prepared), 0) AS waste_rate
FROM kitchen_daily_ops
WHERE delivery_date >= DATE '2026-11-01'
GROUP BY kitchen_id, delivery_date
HAVING SUM(prepared - delivered - gifted) * 1.0 / NULLIF(SUM(prepared), 0) > 0.04 -- alert threshold
ORDER BY waste_rate DESC;
-- Leading indicator: % of new hybrid subscribers who skip in their first week, by variant
SELECT x.variant,
AVG(CASE WHEN EXISTS (SELECT 1 FROM skips s WHERE s.user_id = u.user_id
AND s.created_at < u.first_delivery + INTERVAL '7 days') THEN 1 ELSE 0 END) AS week1_skip_rate
FROM users u JOIN experiment_assignments x USING (user_id)
WHERE u.schedule = 'hybrid' AND x.experiment = 'flexible-skip'
GROUP BY x.variant;
5. UX (chapter 184)
- IA: Skip and the week planner under Plan; a Home card "Tomorrow: Paneer tikka bowl · Skip" from 18:00 the previous evening.
- Feedback: optimistic update with a toast "Wednesday skipped · 1 credit added · Undo" (undo until the cut-off); the credit balance visible on Home.
- Constraints: after 07:00 the button is disabled with an explanation and an alternative ("Gift this meal to a colleague").
- Accessibility: native buttons with clear labels;
role="status"announcements; 48 dp targets; contrast checked; TalkBack and VoiceOver walkthroughs in the test plan. - Content: plain language ("credit" defined once: "Each skipped meal becomes a credit for a future lunch"); Hindi and Telugu strings reviewed by native speakers.
- Refused: a design proposal to hide "Cancel subscription" deeper while launching skip (a dark pattern; also against chapter 184's guidance and consumer-protection rules).
6. Requirements (chapter 185)
- Functional (EARS): "When a subscriber skips a scheduled delivery before 07:00 IST on the delivery day, the scheduler shall cancel the delivery and add one meal credit." "If a skip request arrives at or after 07:00 IST, then the scheduler shall reject it and offer gifting." "The scheduler shall treat repeated skip requests for the same delivery as one."
- NFRs: skip confirmation p95 ≤ 2 s during 06:45–07:00 with 5,000 concurrent subscribers; kitchens see skips within 15 minutes; no lost or duplicated credits (daily reconciliation job: credits issued = deliveries skipped); WCAG 2.2 AA; audit log of all schedule changes.
- Dependencies: payments team (credit-adjusted mandate amounts and pre-debit notices); kitchen-app team (skip counts in prep lists); legal (credit terms).
- Acceptance tests: the Gherkin feature and Hypothesis properties from chapter 185 in CI; a load test for the cut-off rush; an accessibility test checklist.
7. Trade-offs (chapter 186)
| Decision | Chosen | Alternatives | Why | Reversibility |
|---|---|---|---|---|
| Where credits live | Append-only table in subscription Postgres (ADR 0012) | Ledger microservice; payment provider balances | Atomic with skip; fastest; team expertise | Medium: extraction path planned |
| Kitchen notification | Async events via outbox → kitchen sync consumer | Synchronous call to kitchen service | User needn't wait; absorbs the 06:45–07:00 burst | High |
| Cut-off rules | Configuration per city (cut-off time, holiday calendar) | Hard-coded constant | Second city planned next year (rule of three not yet met, but a known dimension) | High |
| Consistency near cut-off | Strong: conditional update WHERE state = 'scheduled' AND now() < cutoff in one transaction with the credit insert |
Last-writer-wins | Avoids skips the kitchen never sees and double credits | — |
| Reminder channel | Push notification first; WhatsApp in release 2 | WhatsApp first | Push is free and already integrated; WhatsApp template approval takes time | High |
8. Experiment and rollout (chapter 182)
- Design: new hybrid subscribers randomised 50/50 by user id; primary metric week-4 retention; MDE 5 points from 38% → needs ~1,500 per group (chapter 182's power calculation) → about 3 months of sign-ups. Leading indicator and guardrails monitored weekly; existing subscribers get the feature in a staged rollout (not part of the test) after the first month if guardrails hold.
- Flags:
flexible-skip(experiment),skip-home-card(UI), kill switch for the cut-off (revert to 21:00 previous day). - Rollout: internal staff → 5% → 50/50 experiment for new users; monitoring dashboards and alerts (waste, reconciliation mismatches, error rates during the cut-off window).
9. Launch and review
Results after 14 weeks (illustrative):
| Metric | Control | Treatment | Notes |
|---|---|---|---|
| Week-4 retention (hybrid) | 38.6% | 46.1% | +7.5 pts, 95% CI [+4.0, +11.0] |
| Week-1 skip rate | 4% (via support) | 61% | Leading indicator moved as expected |
| Margin per delivered meal | ₹41.8 | ₹40.9 | Above ₹38 guardrail |
| Kitchen waste | 2.9% | 3.5% | Below 4% guardrail |
| Support contacts / 100 subs / week | 6.1 | 2.3 | Big cost-to-serve win |
| Crash-free sessions | 99.6% | 99.6% | Unchanged |
Decision: ship to all; the target of 50% wasn't reached, so the next bet addresses the second opportunity from discovery: menu fatigue (4/10 interviewees). Post-launch actions: the credit-expiry policy for cancelled plans (an open question from example mapping that support escalations surfaced); a dashboard of credits outstanding for finance; a review of ADR 0012's trigger when the B2B team-orders feature arrives.
Practice case 2: team lunches for offices (B2B)
Prompt: Office admins (persona "Arjun", chapter 181) want to order lunch for team events and recurring team days. Leadership wants B2B revenue to reach 25% of total within a year. Work through:
- A problem statement and the key assumptions.
- Three discovery activities with what you'd learn from each.
- Primary metric, leading indicator and guardrails.
- Five edge cases and two NFRs.
- Two trade-off decisions with options and reasoning.
Practice case 3: an AI menu assistant
Prompt: Product proposes "Ask TiffinBox": a chat assistant answering questions like "Is today's biryani spicy?", "Which meals are Jain?", "Can I swap Wednesday's meal?". Work through the value risk, the requirements for an AI feature (Volume 14), the build-vs-API decision and the metrics.
Product-engineering review rubric
Use it on design reviews, project retrospectives or your own work.
| Dimension | 1: weak | 3: adequate | 5: strong |
|---|---|---|---|
| Problem framing | Solution-first; no evidence | Problem stated with some data | Segment, job, obstacle, evidence and business impact; solution-free |
| Discovery | None | Some interviews or a prototype | Riskiest assumptions identified and tested cheaply; results changed the plan |
| Metrics | Outputs or vanity metrics | Outcome metric defined | Precise primary metric, leading indicator, guardrails, instrumentation plan |
| UX | Happy path only | Main states handled | Feedback, errors, recovery, accessibility (WCAG 2.2 AA), localisation, performance on target devices |
| Requirements | Vague stories | Acceptance criteria | Rules, examples, edge cases, measurable NFRs, executable acceptance and property tests |
| Trade-offs | Implicit | Options discussed | Options compared with criteria, reversibility considered, ADRs with review triggers |
| Delivery | Big-bang release | Flagged release | Thin slices, experiment or staged rollout with guardrails and kill switch |
| Learning | No follow-up | Metrics checked once | Review with decision, documented learnings, next opportunity identified |
Lab: checking case 1's numbers
Setup. PostgreSQL 16 with the synthetic TiffinBox dataset from chapter 183's lab, and SciPy. The case's figures were taken from that dataset; the lab recomputes them and asks a question the case glosses over: could the launch experiment have detected the effect it reported?
Experiment 1: the segmented retention claim
Activated subscribers observed for at least 12 weeks:
| Schedule | Subscribers | Week-4 retention | Week-12 retention |
|---|---|---|---|
| hybrid | 1,179 | 0.635 | 0.258 |
| full-time | 835 | 0.770 | 0.474 |
The case's "63% → 26% for hybrid versus 77% → 47% for full-time" reproduces from the raw data with one SQL query; that's the standard every number in a decision document should meet.
Experiment 2: was the experiment big enough?
Users per arm needed to detect a rise in week-4 retention from a 38% baseline (two-sided α = 0.05, 80% power):
| Target | Users per arm |
|---|---|
| 38% → 50% (the goal) | 259 |
| 38% → 45.5% (what the case observed, +7.5 points) | 663 |
| 38% → 42% | 2,323 |
At roughly 300 activated hybrid subscribers a month, a 50/50 experiment needs about 4–5 months of cohorts to detect +7.5 points reliably, and week-4 retention can only be read four weeks after each cohort starts. A test sized for the 12-point goal (259 per arm) would have a good chance of missing the smaller real effect and declaring failure. Size experiments for the smallest effect worth acting on, not for the effect you hope for; and when traffic is low, consider a faster leading indicator (skips used, support tickets about skipping) alongside the slow outcome.
Revision sheet: product engineering end to end
Key ideas
- The chain: signal → framing → discovery → metrics plan → UX → requirements and tests → trade-offs and build → staged release → review; each step's artefact feeds the next.
- Segment before theorising; frame the problem without a solution; test the riskiest assumptions cheaply.
- Metrics plans name the primary outcome, leading indicators, guardrails and instrumentation, and are sized to detect the smallest worthwhile effect.
- Release in thin slices behind flags, with guardrails and a kill switch; review outcomes and decide what's next.
- Use the rubric to score framing, discovery, metrics, UX, requirements, trade-offs, delivery and learning.
Numbers to remember
- Lab: hybrid week-4 → week-12 retention 0.635 → 0.258; full-time 0.770 → 0.474.
- Lab: detecting +7.5 points from 38% needs ~663 users per arm; +12 points needs ~259.
Pitfalls
- Jumping from signal to solution.
- Guardrail-free success metrics.
- Experiments sized for the hoped-for effect.
- Declaring failure when a real but smaller effect was missed by an underpowered test.
- No post-launch review, so learning is lost.