Safety and compliance reporting · working file

Extraction walkthrough: one record, from a transcript line to a blueprint cell

The research tool behind the safety case takes an interview transcript in one end and puts a typed, placed, reviewed record out the other. This page walks one record through the five steps, then sets out the rubric a record is checked against.

Employment workKFC South PacificResearch toolingSynthetic data
Synthetic data. Every name, transcript line, identifier and record on this page was written for this walkthrough so the mechanism can be shown without any research material. The real transcripts, the 232 records and the evaluation fixture stay inside the employer's project.

The tool in brief

The problem. The safety synthesis outgrew a document, then outgrew a Miro board. Every new batch of interviews reclassified records, moved them between substages and split them, and every move had to be made twice: once in the record and once on the board. The findings report was then retyped from the board a third time.

Why I built it. To make the records the source and everything else an output: the blueprint, the board and the report render from the same rows, so none of them can disagree with the others.

How it works. Capture, extract, place, use. A Claude Code command reads a transcript and emits candidate records as JSON. A schema-validating importer refuses a batch unless every type, stakeholder, stage, substage and theme resolves, and tags git before the import so a bad batch is one command to undo. A person reads each record against its transcript line before it counts. The record is then tied to one of five stages, eleven substages and a role, and the blueprint, evidence trails and report are generated from it.

The backend. Python and Flask over SQLite with a vanilla JavaScript front end: 50 HTTP routes, 37 scripts, 318 commits between 27 October 2025 and 22 January 2026. An Anthropic SDK endpoint drafts recommendations from five templates and stores each prompt beside its output.

From insights to prototypes. Filtering the 184 blueprint items by substage, role and type narrows the map to the handful of records behind one recommendation, and those records are the evidence list on each proposal. The form prototype and the three proposals in the case were built from those lists.

Which AI tools. Speech-to-text transcription, the Claude Code extraction command, and the Anthropic SDK drafting endpoint. Each has a human step after it. What the tool saved against the manual board is an estimate with its assumptions shown, in section 4 of the case.

One record, five steps

Source input

A transcript, speaker-separated, with line numbers

Interview 07 in this walkthrough is a restaurant manager, recorded in the office between lunch and the afternoon shift change. The extraction reads the whole transcript; these are the lines the record comes from.

211Researcher: When something happens, who puts it in the system? 212Manager: Me, nearly always. The crew tell me, I have a look, and I put it in at close. 213Manager: The hard bit is the category. Half the time I ring the ASL about which box to tick, because if I pick wrong it comes back from head office and then I am doing it twice. 214Researcher: Every time? 215Manager: Anything that is not obviously a slip or a burn. Near misses especially.

Candidate insight

What the extraction command emitted for those lines

The command returns JSON only, against a schema the importer enforces. This candidate passed validation: every field resolves to a value the tool knows. It is still wrong, in a way the schema cannot see.

{
  "id": "insight-0642",
  "type": "Behaviour",
  "stakeholder": "Manager",
  "stage": "Reporting",
  "substage": "Completing the form",
  "theme": "Process and procedure",
  "title": "Manager phones a colleague to choose the incident category",
  "body": "The manager often calls a colleague to decide which category to select, because a wrong choice is returned by head office and has to be re-entered.",
  "source": { "interview": "int-07", "lines": [213, 213] },
  "confidence": 0.86
}

Source reference

The record keeps a link back to the line it came from

Every record carries its interview id and line range, so the review step is a click, not a search. The importer writes a git tag before anything is inserted, and the batch is refused whole if one record fails the schema.

# importer log, batch b07 (synthetic)
tag      pre-import-b07 written at 3e91c
schema   14 of 14 candidates valid
source   int-07 lines 213 to 213  →  transcript/int-07.txt#L213
status   staged for review, 0 of 14 reviewed

Human correction

Read against the transcript, and corrected where the extraction flattened what was said

The passage says ASL, the business's shorthand for the area safety lead. The extraction read it as an ordinary word and produced "a colleague", which loses the point: the manager is escalating a routine classification to the role above them, and the form is the reason. That is the failure class that accounted for nearly all of the corrections in the real study.

FieldCandidateCorrectedWhy
titleManager phones a colleague to choose the incident categoryManager phones the area safety lead to choose the incident categoryASL is the area safety lead, not any colleague
typeBehaviourPain pointA routine escalation to avoid rework is a workaround, and workarounds are evidence of a form problem
bodyThe manager often calls a colleague to decide which category to select, because a wrong choice is returned by head office and has to be re-entered.For anything that is not obviously a slip or a burn, the manager phones the area safety lead to choose the category, because a wrong choice is sent back and entered twice.The condition on line 215 belongs in the record; the passage names the trigger
source lines213 to 213213 to 215The qualifier is two lines later

corrected before import The change is logged against the record with the reviewer and the reason, so a later reader can see what the machine said and what the person changed.

Downstream view

Where the record lands, and what is generated from it

Once imported, the record sits in one cell of the blueprint and is counted wherever that cell is counted. It appears in the evidence list of any proposal that cites it, and the findings report paragraph for that substage is generated from the records in the cell rather than retyped from a board.

Reporting › Completing the formManager lane · one more pain point in the cell
Proposal 1 evidenceAsk what happened first; classify at the manager's review · cites insight-0642
Report, section 3Generated paragraph: managers escalate routine classification to the area safety lead to avoid rework
Miro boardOne sticky, pain-point colour, in the Reporting frame · placed by the migrator

How a record is checked

A schema-valid record is not necessarily a true one, and reading every record by hand does not by itself say how often the extraction was right. So a record is scored against its transcript with four verdicts.

VerdictMeaningSynthetic example
faithfulStates what the passage says, at the passage's level of specificity"Crew tell the manager first; the manager enters the report at close" from lines 212 to 213
flattenedSupported, but a qualifier, condition, cause or nuance is lost"Manager phones a colleague about categories": the role and the trigger are gone
overstatedClaims more than the passage supports: a cause, outcome or attribution the speaker did not give"Phoning the area safety lead has reduced misclassified reports": the passage says nothing about the effect
unsupportedNo supporting passage in the cited transcript after searching for the record's key terms and their synonyms"Managers are trained on categories at induction": nothing in interview 07 says so

Each scored record also carries a note on whether its assigned type and substage fit the passage, because a true statement filed in the wrong cell still misleads the blueprint.

The fixture

One JSON row per scored record, with the passage quoted verbatim and its character offsets into the transcript file, so any verdict can be re-read by someone else in seconds.

{
  "id": "insight-0642",
  "interview": "int-07",
  "verdict": "flattened",
  "type_fits": "no: escalation to avoid rework is a pain point, not a behaviour",
  "passage": "Half the time I ring the ASL about which box to tick, because if I pick wrong it comes back from head office and then I am doing it twice.",
  "offsets": [18412, 18551],
  "note": "ASL read as an ordinary word; condition on line 215 dropped"
}

Sample design

Every record from the interviews with five or fewer records, plus the first records by id from the pooled larger interviews, until the sample reaches forty. Small interviews are covered whole so that no source is judged on one record; the pooled remainder is taken by id rather than chosen, so the sample cannot be steered towards records that look right.

What was observed, and what is designed

Observed in the studyDesigned, and measured by the rubric
All 232 records were read against their source and placed by hand before they counted. About ten needed correcting, and nearly all of those had failed the same way: a business acronym read as an ordinary word, which flattened what the person meant. Fidelity per record (the four verdicts), type and substage fit, the correction rate, and where the misses cluster by interview. A 40-record sample was scored against this rubric in September 2026 with every passage quoted in the fixture; the per-record judgements are read by hand before the figures are published.

What a schema and a review step give you is provenance: every record can be walked back to the moment in the room. What the rubric adds is a number for how often the first draft was right, which is the number that decides whether the review step is a safety net or the actual work.

Working file from employment at KFC South Pacific. The mechanism is the tool's; the data on this page is synthetic. Back to the case.