Platform Engineering · Lesson 62

Agile in Practice: Scrum, Kanban, Flow Metrics, and Forecasting

Lesson F06 introduced sprints, boards, and stand-ups. This lesson is what makes them work for an engineering team. Scrum gives a fixed rhythm: planning, a sprint, a review, and a retrospective. Kanban gives flow: limit the work in progress, and let items pull through the board. Underneath both is the same arithmetic, Little's law: the more you start at once, the longer everything takes. This lesson follows one user story through a sprint three ways, healthy, swamped by too much work in progress, and squeezed by a sprint planned as a promise, and shows how to measure cycle time and throughput and forecast with them instead of guessing.

Difficulty: Intermediate · Know this first: Lesson F06, Lesson 61, Lesson 07

Run it as:

When it breaks, I check

One thing to remember

Where the time goes

This bar splits one story's journey, in working days, from refinement to the retrospective after it shipped. It is a worked example, not a measurement. The hands-on work is about the same in every scenario; waiting, before starting, for review, and for the next sprint, is what grows.

Try it: Little's law on your board

Set how many items the team has in progress and how many it finishes per week. Cycle time follows from Little's law, and a simple forecast follows from throughput.

cycle time = WIP ÷ throughput (5 working days a week) · weeks to finish ≈ items left ÷ throughput, a rough average; forecast ranges with a Monte Carlo of real weekly throughput

3days per item
6weeks to finish
1.0items in progress per person (6 people)

Healthy: about one item per person in progress

Check yourself

Three questions. No score is saved anywhere — this is just you against the material.

Basic to master

Agile practice grows in four levels: first the Scrum and Kanban basics beyond F06, then running a team's flow, then measuring and forecasting, and finally scaling to many teams without losing the point.

Basic — Scrum's rhythm and Kanban's flow

At the basic level you know the parts, building on Lesson F06.

  • Scrum roles: product owner (what and why), developers (how), Scrum master (helps the team and the process).
  • Scrum events: sprint planning, daily scrum, sprint review, retrospective, inside a fixed sprint of one to four weeks.
  • Scrum artifacts: product backlog, sprint backlog, and the increment, with a definition of done.
  • Kanban: visualize the work on a board, limit work in progress per column, manage flow, and make policies explicit.

Where it breaks: running the meetings without the purpose: stand-ups as status reports, reviews with no feedback, retros that change nothing.

Try it: Basic

Which Scrum event exists to improve how the team works?

Now do it: Write your team's current WIP per column on a sticky note. Tomorrow, set a limit one lower than today.

Intermediate — Run the team's flow

At the intermediate level you run the flow day to day.

  • WIP limits per column, starting near one item per person.
  • Walk the board right to left at stand-up: what is closest to done, and what is blocking it.
  • Review and test before starting something new.
  • Story splitting by thin user-visible slices; spikes (time-boxed research) for unknowns.
  • A definition of done that includes tests, security checks, monitoring, and deployment.

Troubleshooting: items piling up in one column is the bottleneck; help there, do not start more.

Try it: Intermediate

The "in review" column has eight items and its limit is three. What should the next free developer do?

Now do it: Run flow_metrics.py in Go deeper with your own board export and compare the Little's law check with your real cycle time.

Advanced — Measure and forecast

At the advanced level you measure flow and forecast from it.

  • Flow metrics: cycle time (start to done), throughput (items finished per week), WIP, and work item age.
  • Charts: a cumulative flow diagram shows WIP growing as widening bands; a cycle-time scatter shows the 85th percentile to quote as a service level ("85 percent of stories finish within 7 days").
  • Forecasting: Monte Carlo simulation over real throughput answers "when" with probabilities; it needs no estimates at all.
  • Delivery metrics: the four DORA metrics show whether finished work reaches users fast and safely.
  • Story points: useful for a team's own conversations about size; harmful as a productivity measure or a comparison between teams.

Try it: Advanced

Leadership wants to compare teams by velocity in story points. What do you advise?

Now do it: Plot your team's cycle times for the last month and find the 85th percentile. That is your honest service level.

Master — Many teams, one product

At the master level you scale Agile without drowning it in process.

  • Frameworks: SAFe (programme increments, release trains, many roles), LeSS (one product backlog for many teams, few extra roles), Scrum@Scale, and Spotify-style squads; each is a set of trade-offs, not a recipe.
  • Architecture first: teams that can deliver independently need loosely coupled services and clear ownership; Conway's law means the org chart and the architecture shape each other.
  • Team topologies: stream-aligned teams supported by platform, enabling, and complicated-subsystem teams, with explicit interaction modes.
  • Portfolio flow: limit WIP at the portfolio too; twenty initiatives in parallel make every one of them late.

Trade-off: more coordination structure makes large programmes predictable and slows each team; less structure keeps teams fast and needs architecture and platforms that let them work independently.

Try it: Master

Eight teams share one monolith and every release needs all of them to coordinate. A heavy scaling framework is proposed. What should you look at first?

Now do it: Count how many teams must act together for one typical feature. Each one is a dependency to design away.

Go deeper

Flow metrics and forecasts come from the board itself. This script computes cycle time, throughput, and average WIP from four weeks of a team's history, checks Little's law against them, and forecasts 30 more items with a Monte Carlo over the real daily throughput (seeded, so the output is repeatable). Standard library only; python3 flow_metrics.py.

Cycle time, throughput, WIP, and a forecast

# flow_metrics.py - cycle time, throughput, WIP, and a forecast from a team's own board history
import random
from statistics import mean, quantiles

# (story, day work started, day it was done) over four weeks of a team's board
items = [("A", 1, 4), ("B", 1, 6), ("C", 2, 5), ("D", 3, 10), ("E", 5, 8), ("F", 6, 9),
         ("G", 8, 12), ("H", 9, 11), ("I", 10, 17), ("J", 12, 15), ("K", 13, 16), ("L", 15, 19),
         ("M", 16, 18), ("N", 17, 22), ("O", 19, 23), ("P", 20, 24)]
days = 24

cycle = [done - start + 1 for _, start, done in items]
p85 = quantiles(cycle, n=100)[84]
throughput = len(items) / days
wip = mean(sum(1 for _, s, d in items if s <= day <= d) for day in range(1, days + 1))
print(f"cycle time: average {mean(cycle):.1f} days, 85th percentile {p85:.1f} days")
print(f"throughput: {len(items)} items in {days} days = {throughput:.2f} a day")
print(f"average work in progress: {wip:.1f} items")
print(f"Little's law check: WIP / throughput = {wip / throughput:.1f} days (average cycle time {mean(cycle):.1f})")

# Forecast "when will 30 more items be done?" by resampling the real daily throughput.
done_per_day = [sum(1 for _, _, d in items if d == day) for day in range(1, days + 1)]
random.seed(42)
runs = []
for _ in range(10000):
    left, day = 30, 0
    while left > 0:
        left -= random.choice(done_per_day)
        day += 1
    runs.append(day)
runs.sort()
print(f"30 more items: 50% likely within {runs[5000]} days, 85% within {runs[8500]} days, 95% within {runs[9500]} days")
$ python3 flow_metrics.py
cycle time: average 4.9 days, 85th percentile 6.9 days
throughput: 16 items in 24 days = 0.67 a day
average work in progress: 3.2 items
Little's law check: WIP / throughput = 4.9 days (average cycle time 4.9)
30 more items: 50% likely within 45 days, 85% within 50 days, 95% within 53 days

Read it like this: average WIP divided by throughput equals the average cycle time, as Little's law says it must for a stable board; the 85th percentile cycle time is the number to quote as a service level; and the forecast gives a range, not a date: half the simulated futures finish within 45 days, and 95 percent within 53. Re-run it with each week's data and the range narrows.

Working agreements, written down

{
  "wip_limits": {"in_progress": 7, "in_review": 3, "in_test": 3},
  "pull_policy": "finish or review before starting new work",
  "definition_of_done": ["merged to main", "tests pass in CI", "security scans clean", "dashboard and alert exist", "deployed behind a flag"],
  "service_level": "85% of stories done within 7 days of starting",
  "planning": "plan to the median throughput of the last 5 sprints; forecast dates with Monte Carlo"
}

This is an example of a team agreement, written as JSON so it can live next to the code and be checked by board automation; most teams keep it on the board itself. It parses as JSON; change the numbers to your own measured ones.

One time it broke

This is a composite of a failure pattern that keeps repeating; the numbers are illustrative. A platform team of seven adopted Scrum and was asked to "increase velocity" every quarter.

Timeline

  • Quarter 1Velocity rises from 40 to 55 points a sprint. Stories are estimated larger; nothing else changes.
  • Quarter 2To show progress, the team starts more stories in parallel: 22 in progress for 7 people. Cycle time doubles to 15 days; carry-over is 40 percent a sprint.
  • Quarter 2A customer migration misses its date by five weeks; the plan had been built from points, not from what the team had actually finished.

What changed after

Velocity stopped being reported upward. The team set a WIP limit of 8, reviewed before starting new work, and planned from its median throughput. Cycle time fell to 6 days within a month, and dates were given as Monte Carlo ranges. Nobody worked more hours; the work just stopped waiting.

If you remember nothing else

Design exercise

A product group of four teams misses most of its quarterly commitments. Each team runs two-week sprints, carries over about a third of its work, and depends on the others for most features. Redesign how they plan and run work.

Clarifying questions to ask

How much does each team finish per sprint, measured? How much is in progress per person? Where do items wait longest? How many features need more than one team? How are dates promised to customers today?

Rough sizing

Say 6 people per team, 9 stories finished per sprint on average, 18 in progress per team, cycle time 14 days, and 70 percent of features crossing two or more teams.

Shape of the answer

Per team: WIP limits near one per person, review before starting, smaller stories, a definition of done that includes deployment, and plans to median throughput. Across teams: a shared product backlog ordered by value, a portfolio WIP limit on initiatives, Monte Carlo forecasts with ranges for customer dates, and an architecture plan to cut cross-team dependencies, starting with the one shared component most features touch.

Trade-offs to name

WIP limits feel like slowing down and cut cycle time within weeks. Forecast ranges are less satisfying than a single date and are right far more often. Reducing dependencies takes architectural work now and removes the coordination that no framework can.

Saved on this device, in this browser.
Next in this series · Lesson 63
From Commit to Running Code

I push a commit. Then I wait. Build, tests, artifact, staging, canary, rollout. That wait is the pipeline, and the pipeline is the product. A slow pipeline does not just annoy engineers.

Go to Lesson 63 →

Or browse the full course from the Lessons index.