GuideOpen

Contract: the consolidated dataset

Emitted by data-consolidate Consumed by every data-dependent skill — as the default source, not the only one; see What this dataset is authoritative for below — and it is the mapping target for custom-connector Chain 1, RFQ to quote (step 2) and 3, Morning plant pulse (step 1) Contract version 6

Contract: the consolidated dataset

Emitted by data-consolidate Consumed by every data-dependent skill — as the default source, not the only one; see What this dataset is authoritative for below — and it is the mapping target for custom-connector Chain 1, RFQ to quote (step 2) and 3, Morning plant pulse (step 1) Contract version 6

Rules that govern every contract are in [README.md](README.md).

This file names the tabs and columns so a consumer and a producer cannot invent two different shapes.


Form

One queryable working file. Excel workbook, one tab per entity, is the v1 format. The writer is swappable. The shape below is the contract.

If data-consolidate pulled a record type, that type has a tab. A pulled input with no tab is how inventory went missing the first time this file was written.


Entity tabs

The join hangs off five anchors: part, production work order, sales order, lot, asset. Every other input is an entity too. It gets its own tab. It is not folded onto an anchor.

The five anchors

TabGrainKeyFields
partsOne row per partPart numberDescription, standard cost, UOM
production_work_ordersOne row per production work orderProduction work order numberPart, qty ordered, due date, status, and from version 5 the sales order it is built for (sales_order / sales_order_verbatim, null where the source holds no link). From version 6, closed-job cost where the ERP holds it: actual_material_cost, actual_labor_cost, actual_burden_cost, actual_subcontract_cost (each with currency), qty_completed, closed_date, revision, all nullable
sales_ordersOne row per sales order lineSales order numberCustomer, part, qty, promised date, price
lotsOne row per lot or batchLot numberThe identity stamped on a quantity of material
assetsOne row per machineAsset IDLocation

The other inputs

TabGrainJoins onFields
inventoryOne row per part per locationPartOn-hand qty, location
purchase_ordersOne row per PO linePart, supplier IDSupplier, part, qty, cost, delivery date
production_outputOne row per work order per shift per production dayProduction work order, partQty good, qty scrap, shift, production day. Two rows at the same grain are a duplicate key (class 8); the same work order on another shift is not
downtime_eventsOne row per stoppageAssetStart, end, reason code
inspection_resultsOne row per measurementLot or production work orderMeasurement vs spec
maintenance_work_ordersOne row per maintenance ticketAssetMaintenance work order, dates, close-out notes
planOne row per part per datePartPlanned qty, date
ncrsOne row per NCRProduction work order, part, lotNCR ID, found at, description verbatim, status, customer.

inventory is on-hand by part and location. A single on-hand total on parts is not this tab. Containment needs the location.

Supplier is a join key, not an anchor. It lives on purchase_orders.

ncrs is where an NCR export lands, and the NCR-to-work-order check runs on it: the NCR's part against the part the ERP holds for the work order it cites, and its date against that work order's first recorded output. ncr-writeup and root-cause-capa still read the NCR export raw for the record as written; they read this tab for whether its part label can be trusted.

Routings and operation actuals

Two more inputs, for quoting. They are what quote-build derives machine hours from before it ever opens a model, and the order matters: a current-revision routing or a trustworthy set of actuals makes the design step a cross-check rather than the basis.

TabGrainJoins onFields
routingsOne row per part, revision and operationPartpart_revision, op_seq, work_center / work_center_verbatim, cell, setup_hours, run_time_per_unit, run_time_unit, time_unit_flag, routing_mismatch
operation_actualsOne row per production work order and operationProduction work order, partop_seq, work_center / work_center_verbatim, cell, actual_setup_hours, actual_run_hours, qty_completed, uom, closed_date, time_unit_flag, actuals_confidence, confidence_reason

Column behavior on both tabs:

ColumnTypeBehaviorNotes
part_revisionstring or nullDegrades on routingsThe revision the routing was written for. Null is not "current": a routing with no revision is reported as revision-unknown, never assumed to match the drawing
op_seqintegerRequiredAs the source numbers it
work_center / work_center_verbatimstringRequiredA pair, like a join key, though it is not one of the six
cellstring or nullDegradesFrom the machine class to work center map in the Plant context. Null when there is no map, and the report says so
setup_hours, run_time_per_unitnumberRequiredAs the source states them. Never converted
run_time_unitenumRequiredmin, h, or undeclared. Read from the header or a unit column, never inferred from the size of the number
time_unit_flagstring or nullDegradesSet when a unit is undeclared, or when this tab's unit differs from the other tab's for the same part and operation. Names both units. No conversion is computed
routing_mismatchenum or nullDegradesno_matching_part (the routing's part is not in the item master — mismatch class 1) or revision_mismatch (the routing is for a revision other than the one being quoted or held as current — class 4, with no automatic fix). Null when neither
actual_setup_hours, actual_run_hoursnumber or nullDegradesNull where the source lumps setup and run into one figure; then confidence_reason says the split is unknown
qty_completednumberRequiredWith uom
closed_datedateRequiredThe work order's close. Rule 4 applies to as_of; a date-only close is fine here
actuals_confidenceenumRequiredrecorded or probable_standard. See below
confidence_reasonstring or nullRequired when probable_standardThe arithmetic that set it: which work orders, which figures, how far apart

probable_standard is the backflush check. Many ERPs close an operation by posting its standard rather than the time it took. Two tests, either sets the flag, both run in code:

  1. Actual run hours ÷ quantity matches the routing's run standard for that part

and operation within 1%, after both are in the same unit — a unit conversion done for this comparison only, shown, and never written back to either tab.

  1. Two or more work orders for the same part and operation agree on run hours

per unit within about 1%. Real shop time is not that tidy.

Actuals flagged probable_standard stay on the tab and are shown. They are never ranked above a geometry-derived estimate by quote-build, because they may be the routing wearing a work order number.

No routing data is a named gap. Where no routing source exists, the routings tab is absent and the report names it missing. An empty routings tab would read as "this part has no operations," which is false.


What this dataset is authoritative for

Every data-dependent skill reads this dataset rather than the raw sources, and three skills also read a raw export. Both halves are deliberate. Here is how they fit together.

This dataset is authoritative for the join. It is the only place the sources are matched on the six keys, normalized through the documented ladder, and their failures classified into the eight mismatch classes. Any question shaped which records go together — which parts came off which work order, where the suspect quantity physically sits, what a lot traces to — is answered here and nowhere else. Going back to a raw export for that reproduces the join by hand, which is precisely the manual work this skill exists to end.

It is not authoritative for two things:

WhatWhy notWho reads raw
A high-frequency sensor traceThere is no sensor tab, and there should not be. A spindle-load curve at sub-second resolution is not an entity keyed on an anchor; folding it in would produce a workbook nobody can openroot-cause-capa — historian export
A value as recorded, rather than as normalizedThe ladder rewrites keys, and a joined view may have moved a row into a mismatch class. A computed control chart needs the measurement the way the gage wrote itroot-cause-capa, ncr-writeup — quality export

daily-production-report is the third, and it is a different case: it reads the dataset as its primary input, and the plan, output and downtime exports alongside it. That is not a second opinion — the dataset gives it the freshness picture and the classified mismatches, and the exports give it rows at their native grain.

When a skill reads both, the dataset wins on identity

This is the rule that matters operationally, because reading two sources is how one report ends up carrying two different numbers for the same thing.

On identity — which part, which work order, which lot, which asset — the dataset wins. Its keys are normalized and its mismatches are classified. A raw export's key is unnormalized by definition, so preferring it silently reintroduces the drift data-consolidate just resolved.

On the measured value — the sensor reading, the inspection measurement — the raw export wins, because that is the value as recorded and it is why the skill went there.

Where the two disagree on a count, say so rather than choosing. A discrepancy between the joined view and the raw rows is a finding about the export, not a number to pick between. Report both, name which is which, and let the plant tell you which system is right. Per ../absent-is-not-zero.md, quietly resolving it is the failure mode — a supervisor reading one number never learns there were two.

Always name which source a number came from. Every tab already carries source_system and source_ref for exactly this. A figure read from a raw export carries the file and row the same way.


Columns every row carries

These appear on every entity tab.

ColumnTypeBehaviorNotes
sitestringRequiredRule 7
source_systemstringRequirednetsuite, infor_m3, cmms (any CMMS connector; limble accepted from earlier versions), mes_export, historian_export, qms_export, planning_export, manual
source_refstringRequiredFile and row, or connector record ID. Rule 6
as_oftimestamp with zoneRequiredWhen the source recorded it, not when we read it. Rule 4
join_statusenumRequiredmatched, unmatched, normalized, duplicate, proposed_normalization. The last is a row that matches only once a proposed fix (classes 2 to 5) is approved. It becomes normalized on a yes and is not joined until then
mismatch_classinteger or nullDegrades1–8 per ../../skills/data-consolidate/reference/mismatch-classes.md, null when matched
contradicted_bystring or nullDegradesOn a class 6 row only: the source and record that show the missing activity happened (quality_ncrs.csv NCR-2026-0141). Null otherwise.
integrity_flagslist or nullDegradesNamed failures of the integrity checks in ../../skills/data-consolidate/reference/join-keys.md: sign_convention, mixed_sign, end_before_start, duration_mismatch, ncr_part_differs, ncr_dated_before_wo, future_timestamp, units_conflict. Null when none.

Join-key columns

Every join key is a pair, per rule 3.

ColumnTypeBehavior
part_number / part_number_verbatimstringRequired on any tab keyed by part, including inventory
part_revisionstring or nullDegrades. Preserved when ladder rung 5 strips it
production_wo / production_wo_verbatimstringRequired on production tabs
sales_order / sales_order_verbatimstringRequired on sales tabs
lot_number / lot_number_verbatimstringRequired on lot and inspection tabs
asset_id / asset_id_verbatimstringRequired on asset, downtime and maintenance tabs
supplier_id / supplier_id_verbatimstringRequired on purchase_orders
maintenance_wostringRequired on maintenance_work_orders. Never named work_order

Quantity columns

Per rule 5: flag differing UOMs, do not silently sum.

ColumnTypeBehavior
qtynumberRequired where a quantity is reported. On sales_orders and fulfilment rows a positive quantity: a source that signs those lines negative is read as the absolute value, flagged sign_convention
qty_verbatimnumber or nullDegrades. The quantity as the source signed it, where sign_convention changed it
uomstringRequired alongside any qty. Never inferred
amountnumberDegrades. Standard cost, PO cost, sales price
currencyISO 4217 codeRequired alongside any amount

On production_output the quantities are qty_good and qty_scrap, each paired with uom. On inventory the quantity is on-hand at that location.


Worked example

An inventory row and three production_output rows. The inventory row is the one this version exists to make explicit.

# inventory
site,source_system,source_ref,as_of,join_status,mismatch_class,
part_number,part_number_verbatim,location,qty,uom

Fairview,netsuite,inventory/FG-A12,2026-09-08T06:10:00-04:00,matched,,
PN-4471-B,PN-4471-B,FG-A12,240,each

Fairview,netsuite,inventory/WIP-CELL-B,2026-09-08T06:10:00-04:00,matched,,
PN-4471-B,PN-4471-B,WIP-CELL-B,60,each

# production_output
site,source_system,source_ref,as_of,join_status,mismatch_class,
production_wo,production_wo_verbatim,part_number,part_number_verbatim,
part_revision,qty_good,qty_scrap,uom,shift

Fairview,mes_export,prod-output-20260907.csv:412,2026-09-07T14:22:00-04:00,
matched,,WO-88201,WO-88201,PN-4471-B,PN-4471-B,,486,14,each,2

Fairview,mes_export,prod-output-20260907.csv:413,2026-09-07T15:03:00-04:00,
normalized,2,WO-88202,wo 88202,PN-4471-B,4471B,,240,0,each,2

Fairview,mes_export,prod-output-20260901.csv:88,2026-09-01T09:10:00-04:00,
unmatched,7,WO-88231,WO-88231,PN-4402-A,PN-4402-A,,120,3,each,1

Reading those:

  • 240 of PN-4471-B sit in finished goods. 60 are still at cell B. Same part,

two locations, two rows. That is what containment reads.

  • Production row 1 matched cleanly.
  • Production row 2 matched after ladder rungs 1–3. The verbatim columns keep

what the MES wrote.

  • Production row 3 is class 7, a date-window mismatch. Not an orphan.

Version 4: a routing and two actuals

# routings
site,source_system,source_ref,as_of,join_status,mismatch_class,
part_number,part_number_verbatim,part_revision,op_seq,work_center,
work_center_verbatim,cell,setup_hours,run_time_per_unit,run_time_unit,
time_unit_flag,routing_mismatch

Fairview,manual,erp_routings.csv:3,2025-11-12T00:00:00-05:00,matched,4,
PN-4471-B,PN-4471-B,1,20,HAAS-VF4-02,HAAS-VF4-02,CELL-B,1.25,7.00,min,
"routing in min, actuals in h - not converted",revision_mismatch

# operation_actuals
site,source_system,source_ref,as_of,join_status,mismatch_class,
production_wo,production_wo_verbatim,part_number,part_number_verbatim,
op_seq,work_center,work_center_verbatim,cell,actual_setup_hours,
actual_run_hours,qty_completed,uom,closed_date,time_unit_flag,
actuals_confidence,confidence_reason

Fairview,manual,erp_operation_actuals.csv:2,2026-03-18T00:00:00-04:00,matched,,
WO-87412,WO-87412,PN-4471-B,PN-4471-B,20,HAAS-VF4-02,HAAS-VF4-02,CELL-B,
1.30,23.33,200,each,2026-03-18,"routing in min, actuals in h - not converted",
probable_standard,"0.1167 h/pc here vs 0.1173 h/pc on WO-87655 (0.6% apart); 7.00 min routing standard = 0.1167 h/pc (0.0% apart)"
  • The routing is for revision 1. Quoted against revision 2, it is

revision_mismatch: shown as superseded, never priced from.

  • The two units are named on both rows and neither is rewritten. The backflush

check converted them for its own comparison and printed that it did.

  • Both tests fired on WO-87412, so it is probable_standard. It is still on

the tab, and still shown.


Missing behavior for the consumer

SituationWhat the consumer does
A tab is absent entirelyDegrades. Report on what exists, name the missing entity, never treat it as empty
inventory is absentDegrades. ncr-writeup cannot place parts from the dataset. Ask location by location, or read the ERP (NetSuite or Infor M3) / an inventory export, and record each answer as unverified until confirmed. Never treat absence as zero on hand
A row's uom is absentDegrades. Report the quantity, refuse to aggregate it, say why
join_status is duplicateBlocks for any total including that key. Surface both rows
join_status is proposed_normalizationDegrades. Not joined. No total treats the row as matched; any figure that would use it is shown provisional, with both spellings and the fix awaiting a yes
contradicted_by is setDegrades. The record is an exception, one-sided, contradicted by the named record. Never "Checked, nothing wrong"
integrity_flags holds end_before_start or duration_mismatchDegrades. The row's minutes are held out of every minutes total and the minutes ranking; it still counts as an event. The exclusion is stated with the row
integrity_flags holds mixed_signBlocks any total of that record type's quantities
integrity_flags holds ncr_part_differs or ncr_dated_before_woDegrades. The NCR's part label or date is not used for same-part history or to date a defect. Show both values
integrity_flags holds future_timestampDegrades. The source's as_of is untrusted; no age or "data as of" is stated from it
A production_work_orders actual-cost column is nullDegrades. That cost is not on file for that work order. quote-build uses the next rung for that line and says so; a null is never read as zero cost
production_work_orders.sales_order is nullDegrades. Commitment impact for that work order is "not traceable: the source holds no work order to sales order link", never guessed from part and customer
join_status is unmatched and mismatch_class is 1Degrades, and the orphan is named in the consumer's output
as_of cannot be resolved to a zoneDegrades. The row is usable for counting and not for correlating
routings is absentDegrades. quote-build starts its hours ladder at closed-job actuals, or below. Name the tab missing, never treat it as no operations
operation_actuals is absentDegrades. The ladder has no rung 2. Name the tab missing
run_time_unit is undeclared, or time_unit_flag is setDegrades. The value is reported in its source unit and not used for any comparison or hours figure until the plant says what the unit is
routing_mismatch is revision_mismatchDegrades. The routing is not a basis for the revision being quoted. It may be shown as superseded, never priced from
actuals_confidence is probable_standardDegrades. Shown, never ranked above a geometry-derived estimate
actual_setup_hours is nullDegrades. The setup and run split is unknown for that work order; it is never re-amortized as if it were known

When a new system is mapped in

custom-connector maps onto this schema. Three requirements:

  1. Every mapped row carries the columns every row carries, including

source_system and source_ref.

  1. Keys map to the pair, not the single. The new system's own identifier

goes in the verbatim column; the normalized form comes from the ladder.

  1. A field with no home here does not go in. Either the schema gains the

field with a version bump, or the field stays out.

Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-for-manufacturing/shared/contracts/consolidated-dataset.md

Author: anthropics, Official Claude Code plugins. License: Apache-2.0.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.