Manufacturing — OEE and defect tracking for a small factory

25 minutes. Two CSVs. You play the plant manager at a 3-machine job shop and find the machine whose defects just spiked.

Updated 2026-04-17

Industry: Manufacturing Difficulty: Intermediate Time: 25 min Plan: Free works

The scenario

You’re the plant manager at Riverstone Machining, a 12-person job shop with three machines — an injection press, a CNC mill, and a laser cutter. You run one 8-hour shift per weekday. Customers pay for parts that meet spec; you eat the cost of every scrap.

This week’s data looks off. You want to answer:

  1. What’s OEE? — the canonical manufacturing metric (Availability × Performance × Quality).
  2. Which machine is underperforming? — ranked by contribution to lost output.
  3. What’s the dominant defect mode? — and is it new or chronic?
  4. Can we alert on early warning signals — before we scrap a batch?

Download the sample data

~38,500 rows · 30 weekdays
cycles.csv
Every cycle with start time, actual cycle time, target cycle time, product, and defect flag.
478 rows
defects.csv
Each defect joined to a cycle. Type (dimensional, surface-finish, material-flaw, …), severity (minor/major/scrap).
01

What's OEE?

Availability × Performance × Quality, per machine, last week vs prior.
Prompt
Compute OEE per machine for the last 7 weekdays and the prior 7. OEE = Availability (actual runtime / 8 hours) × Performance (target cycle / actual cycle average) × Quality (1 - defect rate). Show the breakdown per machine.
riverstone · oee
step 1 · expected answer
Tablize
python.analyze · OEE decomposition per machine 1.1 s
M2 (CNC Mill Beta) is your problem. Its OEE dropped from 68% to 38% week-over-week — every component is worse (Availability down, Performance down, Quality way down). M1 and M3 are stable around 75-82%.
MachineAPQOEEWoW
M1 · Injection Press0.870.890.9976%+1pp
M2 · CNC Mill0.610.820.7638%-30pp
M3 · Laser Cutter0.890.920.9982%+0pp
· Step 1 — OEE crash on M2, every component down

Keep it: + Save as daily Report. Runs every morning at 07:00. Your 7:15 huddle has the day’s OEE board pre-built.

02

Which defect type is dominant on M2?

Break down the defect drop by type and severity.
Prompt
For M2 specifically, break down defects from the last 7 days by type and severity. Compare to the prior 14-day average for that machine. What's changed?

The Agent surfaces: dimensional defects on M2 are up 5x vs baseline. Other defect types unchanged. Severity is skewed toward “major” and “scrap” (not cosmetic). This points at a tool wear or calibration issue, not a material problem.

Keep it: + Save as Script — reusable for any machine when OEE trips.

03

Cycle-time creep detection

Watch for early signals — is M2's cycle time drifting up before defects hit?
Prompt
For each machine, compute the daily average cycle time over the last 30 days. Is there a trend of cycle-time creep — getting slower over time? For M2 specifically, does cycle-time start drifting up BEFORE the defect spike?

The Agent plots cycle time per machine. On M2, cycle time was drifting up for 3 days before defects spiked — a classic early-warning pattern. If you’d caught that earlier, you could have intervened before scrap rate jumped.

Keep it: + Watch cycle-time creep — daily, alerts when any machine’s 3-day avg cycle time exceeds baseline by 8%.

04

Shop-floor Dashboard

One screen, TV-mounted in the plant office.
Prompt
Build a Dashboard called "Shop floor" with: (1) today's OEE per machine (live), (2) defect count per machine today, (3) cycle-time trend last 14 days, (4) today's production by product. Use the "terminal" theme. Public link so I can put it on the shop TV.

Dashboard renders in the right panel. Copy the public link, open it in a browser on the shop-floor TV, full-screen. Your team sees live OEE for the whole shift. If M2 starts slipping again, everyone knows.

What you built in 25 minutes

  • 1 Report — daily OEE, pre-huddle ready.
  • 1 Script — defect deep-dive, rerunnable per machine.
  • 1 Watch — cycle-time creep alarm.
  • 1 Dashboard — shop-floor TV view.

You found the M2 dimensional-defect problem before a customer returned parts. Next step is the physical root-cause — but now you know where to point the maintenance tech.

Next steps in this industry

  • Connect real data — MQTT is the standard for modern machines. See IoT, MQTT & cameras. Your PLC / MES can publish cycle events directly.
  • Add maintenance records — join failures against scheduled maintenance intervals. Predictive maintenance.
  • Read the Manufacturing industry page — deeper scenarios: SPC control charts, changeover time analysis, energy per unit.

Nearby tutorials

  • IoT — if your sensors are already streaming and you want the “live” version of this analysis.
  • Logistics — if you ship what you make and want to follow the whole chain.