Sub topic 14
Measuring and improving the workflow
This chapter assumes you have read the earlier chapters on states, approval gates, the audit trail, risk tiers, and review failure modes. It also assumes you can read simple Python. The workflow you built already records every transition. This chapter turns that record into a few numbers and uses them to decide what to change.
Why measure
A draft-and-approve pipeline can fail without any visible error. Drafts can wait for days. Reviewers can approve everything in a few minutes. Authors can send the same draft back four times. Each of these still looks like "the workflow is running". Metrics show where time and quality are lost, so you change the process on evidence instead of opinion.
You do not need a data platform. The log list on each Item holds timestamps, actors, and state changes, and that is enough.
The metrics worth tracking
Start with a small set. Each metric answers one question.
| Metric | Question it answers | How to compute it |
|---|---|---|
| Turnaround time | How long from submission to publication? | `published` timestamp minus first `in_review` timestamp |
| Review wait | How long does a draft sit before a decision? | Time between entering `in_review` and the next transition |
| Revision rate | How often does a draft come back for changes? | Count of `changes_requested` transitions per item |
| First-pass approval rate | What share of items are approved with no changes requested? | Items with zero revision rounds divided by all items |
| Pre-check hit rate | Do automated checks catch real problems? | Items with at least one pre-check problem divided by all items |
| Reviewer decision time and approval rate | Is any reviewer approving fast and always? | Per reviewer, from decision pairs in the log |
| Post-publish corrections | Did bad content get through? | Count of corrections or takedowns after `published` |
The last metric is the guardrail. Every other metric rewards speed or smoothness, and you can improve them by weakening review. Post-publish corrections tell you whether review is still catching problems. Track it from the start, even if you record it by hand.
Computing metrics from the log
The following code reads logs in the format the Item class writes: at, actor, from, to, and note. Edit entries, which have an edit key instead of to, are skipped. The sample data is fixed so that the output is reproducible.
from datetime import datetime
from statistics import median
def minutes_between(start, end):
delta = datetime.fromisoformat(end) - datetime.fromisoformat(start)
return delta.total_seconds() / 60
def entry(at, actor, old, new, note=""):
return {"at": at, "actor": actor, "from": old, "to": new, "note": note}
def item_metrics(log):
moves = [e for e in log if "to" in e]
submitted = next(e for e in moves if e["to"] == "in_review")
published = next((e for e in moves if e["to"] == "published"), None)
rounds = sum(1 for e in moves if e["to"] == "changes_requested")
decisions = []
for current, following in zip(moves, moves[1:]):
if current["to"] == "in_review":
decisions.append((
following["actor"],
following["to"],
minutes_between(current["at"], following["at"]),
))
turnaround = None
if published:
turnaround = minutes_between(submitted["at"], published["at"])
return {"turnaround": turnaround, "rounds": rounds, "decisions": decisions}
def summarize(logs):
per_item = [item_metrics(log) for log in logs]
done = [m["turnaround"] for m in per_item if m["turnaround"] is not None]
first_pass = sum(1 for m in per_item if m["rounds"] == 0) / len(per_item)
print("median turnaround (min):", median(done))
print("first-pass rate:", round(first_pass, 2))
reviewers = {}
for m in per_item:
for reviewer, outcome, minutes in m["decisions"]:
stats = reviewers.setdefault(reviewer, {"n": 0, "approved": 0, "minutes": []})
stats["n"] += 1
stats["approved"] += outcome == "approved"
stats["minutes"].append(minutes)
for name in sorted(reviewers):
s = reviewers[name]
print(f"{name}: decisions={s['n']} approval_rate={s['approved'] / s['n']} "
f"median_min={median(s['minutes'])}")
item_1 = [
entry("2026-11-02T09:00:00+00:00", "ben", "draft", "in_review"),
entry("2026-11-02T09:06:00+00:00", "carla", "in_review", "approved"),
entry("2026-11-02T09:10:00+00:00", "ben", "approved", "published"),
]
item_2 = [
entry("2026-11-02T09:00:00+00:00", "ben", "draft", "in_review"),
entry("2026-11-02T13:00:00+00:00", "ana", "in_review", "changes_requested", "tone"),
{"at": "2026-11-02T14:30:00+00:00", "actor": "ben", "edit": "abc123"},
entry("2026-11-02T15:00:00+00:00", "ben", "changes_requested", "in_review"),
entry("2026-11-02T16:00:00+00:00", "ana", "in_review", "approved"),
entry("2026-11-02T16:15:00+00:00", "ben", "approved", "published"),
]
item_3 = [
entry("2026-11-03T10:00:00+00:00", "ben", "draft", "in_review"),
entry("2026-11-03T10:05:00+00:00", "carla", "in_review", "approved"),
entry("2026-11-03T10:10:00+00:00", "ben", "approved", "published"),
]
summarize([item_1, item_2, item_3])The output is:
median turnaround (min): 10.0
first-pass rate: 0.67
ana: decisions=2 approval_rate=0.5 median_min=150.0
carla: decisions=2 approval_rate=1.0 median_min=5.5Two things stand out. Carla approves everything within about five minutes. That is a pattern worth checking, though it is not proof of rubber-stamping. The median turnaround of 10 minutes hides item 2, which took 435 minutes. Look at the spread as well as the middle.
Reading the numbers together
One metric on its own misleads. Read them in pairs.
| Pattern | Likely cause | First thing to try |
|---|---|---|
| Long review wait, low revision rate | Reviewers are busy or unaware of the queue | Add a queue age alert; check reviewer load |
| High revision rate, short review wait | Drafts are weak or briefs are vague | Read the change-request notes and fix the brief |
| Revision rate near zero, fast decisions, some post-publish corrections | Rubber-stamping or automation bias | Audit a sample of approved items against the rubric |
| High pre-check hit rate | The model keeps making the same mechanical error | Put the rule into the brief, not only the check |
| Many rounds on one item | Feedback is unclear or reviewers disagree | Rewrite the rubric item; assign one lead reviewer |
| High-tier items as fast as low-tier ones | The second approval is being treated as a formality | Review the high-tier process; see the failure-modes chapter |
Always read a few raw items next to the numbers. A revision rate of 0.4 does not tell you whether the changes were typos or factual fixes.
Turning change-request notes into improvements
The note field on changes_requested is the most useful source of improvement ideas. Tag each note with a short category, such as tone, factual, missing_source, or format. Then count the categories.
- Frequent
formatormissing_sourcenotes are mechanical. Move them into the brief or an automated pre-check, so people stop spending review time on them. - Frequent
factualnotes point to weak source material in the brief. Add or replace the sources. - Frequent
tonenotes suggest the brief lacks a style example. Add one approved piece as a reference. - Notes that vary widely between reviewers suggest the rubric is ambiguous. Rewrite the vague criterion with a pass and a fail example.
The aim is to push recurring problems earlier in the pipeline. Human review time should go to the judgments that machines and briefs cannot handle.
Making changes safely
Change one thing at a time. If you edit the brief template, add two pre-checks, and change the rubric in the same week, you will not know which change moved the numbers.
Wait for enough items before judging. Three items, as in the sample above, show how the code works. They are too few to support a decision. As a rough guide, wait for a few dozen items per content type before reading a rate, and wait longer for rare outcomes such as corrections.
Compare like with like. Split metrics by risk tier and content type, because a high-risk legal page and a low-risk social post should not share one average. Use medians and look at the slowest 10 percent of items, since averages are pulled around by a few outliers.
What to automate and what to review by hand
Metric computation is cheap, so run it on a schedule, such as weekly. Keep a human step in the loop for interpretation. A short monthly review works well:
- Look at the table of metrics, split by tier.
- Read five items at random, including at least one fast approval.
- Read all post-publish corrections and trace each one back to the approval that let it through.
- Choose one change, record why, and note the date so you can compare before and after.
Common errors
- Measuring only speed. Turnaround falls when review weakens, so always include a quality guardrail.
- Counting items that have not finished. Items still in review have no
publishedentry, so exclude them from turnaround, and track their queue age separately. - Mixing resubmissions into review wait. Measure each pass through
in_reviewon its own, as the code above does, and report revision rounds separately. - Treating a log gap as a delay. If edits are made outside the system, the log shows idle time that was really work. Keep editing inside the workflow.
- Ignoring items that never publish. Abandoned drafts say a lot about brief quality, so count them too.
Exercise
In the sample data, carla's approval rate is 1.0 and her median decision time is 5.5 minutes, while ana's are 0.5 and 150 minutes. A manager proposes cutting ana's review time to match carla's. What would you do first, and why?
Show answer
Do not change ana's pace yet. Carla's numbers are the ones to investigate. Pull a sample of the items carla approved, check them against the rubric, and look for post-publish corrections on them. If those items are clean, carla may simply be reviewing easy content. If problems were missed, the process has a rubber-stamping or automation-bias problem. Ana's slower, more selective review may be the correct behavior. Cutting it to match would likely lower quality without being checked against a guardrail metric.
Exercise
Over a month, "missing_source" appears in 60 percent of change-request notes. Name two changes you could make in the pipeline, and say which chapter concept each belongs to.
Show answer
First, add a rule to the brief that every factual claim must cite one of the supplied sources (briefs and context). Second, add an automated pre-check that flags drafts with no source references, so the draft is blocked before a human reads it (automated checks). Make one change first and measure again, so you can tell which one reduced the revision rate.