daily-production-report
Daily Production Report
Every plant runs a morning production meeting, and somebody spends 60 to 90
minutes before it assembling the same report by hand out of the same four or
five exports. This is that report.
Chain 3 runs this overnight, so the page exists before anyone asks for it.
The run is built to be safe unattended — it asks nothing, it is idempotent, and
it reports its own gaps. The trigger is the host's, not the plugin's: see
../../shared/scheduling.md. Never tell a user the report has been scheduled.
That is the clearest demonstration of the plugin's concept, and it
is why the run must be idempotent — a re-run rewrites the same report for that
production day rather than producing a second one.
Quick start
→ Confirm freshness; if last night's export didn't land, lead with that
→ Output against plan by line, cell, product, with variances
→ OEE per asset or line, three components always shown separately
→ Downtime ranked by minutes and by frequency, both
→ Price scrap and downtime in dollars, with the rate assumption stated
→ Week-over-week movers from history: the pulse's day records, or the exports
→ Fold in any breakdown diagnoses
→ Exceptions, each with its impact on a commitment
→ One traced reschedule move per significant exception, drafted not applied
→ Floor view: each machine's figures drawn where it sits; set up once from a
floor plan, confirmed by a person, saved on the plant setup page
→ Page saved to report-output/; the reply is a ~150-word summary naming it
→ Run alone: never publishes. End with the placement line, "save it over yesterday's"Inputs
First, find the plant setup: from the task's own folder (never cd into the plugin), run
python3 -I <this skill's folder>/../../shared/scripts/plant_setup.py find, do its setup_page_first step, then read the profile at
profile_path and any rate at rates_path, per ../../shared/replies.md.
| Input | Source | Form |
|---|---|---|
| Consolidated dataset | data-consolidate | Primary input. ../../shared/contracts/consolidated-dataset.md |
| New breakdown diagnoses | breakdown-diagnosis | ../../shared/contracts/downtime-record.md |
| Production plan / schedule | Planning export to the M365 folder | CSV / XLSX |
| Actual output, good and scrap | MES export to the M365 folder | CSV / XLSX |
| Downtime events with reason codes | MES or historian export | CSV |
| Standard cost per part | The ERP. Infor M3 gives none (../../shared/erp-connectors.md): the profile's cost read order applies | Connector |
| Open work orders and due dates | The ERP | Connector |
| Maintenance work orders in progress | CMMS | CMMS connector, else the maintenance export |
| Stored day history, inside Chain 3 only | morning-plant-pulse | ../../shared/contracts/pulse-day-record.md |
| Floor layout (optional) | The ### Floor layout - <site> section of the plant profile at profile_path (the plant setup page) | ../../shared/contracts/floor-layout.md |
| Floor plan (optional, setup only) | A PDF or image the user attaches | Read once, in the setup turn of step 9a; never stored |
| OEE thresholds (optional) | The plant profile's OEE thresholds line | Defaults apply, labelled not confirmed, when absent |
Workflow
Step 1 — Confirm freshness
Confirm freshness via data-consolidate — the data quality report and each
row's as_of. **If last night's export did not land, say so at the top of the
report**, directly under any safety block. Nothing about data age goes above a
safety-flagged record, not even a one-line note.
A source whose timestamps run later than now is flagged future_timestamp:
say its dates can't be trusted and give it no age. A production report built on
stale data is worse than no production report,
because it gets believed and acted on. Never silently reuse yesterday's data.
The rule is ../../shared/absent-is-not-zero.md.
On reading both the dataset and the raw exports. The dataset is the primary
input — it carries the freshness picture and the classified key mismatches. The
plan, output and downtime exports give rows at their native grain. Where the two
disagree on a count, report both and name which is which; a discrepancy is a
finding about the export, not a number to choose between. See *What this dataset
is authoritative for* in ../../shared/contracts/consolidated-dataset.md.
Step 2 — Output against plan
By line, cell and product, with variances. Use the plant's own word for the
organizational unit, from the ## Plant context block.
**Where plan and output spell a part differently, do not match them silently,
and do not refuse to match them.** Run on raw exports, the plan says
PN-4471-B and the M
