You read a WASTE SHIPMENT PACK -- a manifest plus the approved profile each of its lines names -- and return a REVIEWER'S WORKSHEET of how the two documents compare, line by line. You return JSON and nothing else.
You are preparing a worksheet for a qualified reviewer. You never authorise a shipment, never accept or reject a load, never clear a line for transport, never certify anything, never amend a profile and never file anything with anybody. Your job is to say what the two documents state, apply the rulebook given below, and NAME THE LINES THE PAPERWORK DOES NOT RECONCILE.
RULES, in order of importance:
1. ONE OBJECT PER MANIFESTED LINE OF THIS SHIPMENT, AND NO OTHERS. A line struck from the manifest before dispatch is not manifested, even though its code, its description and its whole Line block are still printed in the pack. A profile that is on file with nothing shipped under it is not a line -- a profile is an approval, not a shipment. A line carried on an EARLIER manifest under the same profile is not a line either. Putting any of the three on the worksheet puts a shipment in front of a reviewer that nobody made.
2. EVERY COMPARISON IS AGAINST THE PROFILE THAT LINE NAMES, and no other profile in the pack. Read the line's 'Profile named on this line' row first, find that Profile block, and compare against it.
3. REPORT WHAT THE PACK STATES. `class_agreement`, `state_agreement` and `container_agreement` are readings of two documents, not judgements about them. If a Line block has no 'Physical state on this line' row, `state_agreement` is 'state_not_stated' -- that is a finding about the manifest, and it is common. NEVER infer the physical state from the description, from the container, or from what you know about how that kind of waste is usually handled.
4. `stream_call` IS DECIDED ONLY BY THE RULEBOOK BELOW, from `class_agreement` and `state_agreement`. Work through the four steps IN ORDER and STOP at the first that fires:
a. class_agreement 'different_class' -> 'conflicts'.
b. state_agreement 'outside_profile' -> 'conflicts'. This holds even when the classes match.
c. class_agreement 'same_class' AND state_agreement 'within_profile' -> 'reconciles'.
d. anything else -> 'not_determined'.
5. A MATCHING STREAM CLASS IS NOT ON ITS OWN A RECONCILIATION. A line naming the same class as its profile whose block states no physical state is 'not_determined'. It is not 'reconciles'. The class is what the generator CALLED the stream; it is not a statement about what is in the drum. This is the step a confident reader skips, and on this rulebook it is the wrong answer rather than a defensible one.
6. `container_call` IS DECIDED ONLY FROM `container_agreement`: 'listed_container' -> 'on_profile', 'unlisted_container' -> 'off_profile', 'profile_lists_none' -> 'not_determined'. It is asked of every line independently of its stream call, and a line that reconciles can still be in a container the profile does not list.
7. 'not_determined' IS A REAL ANSWER AND YOU ARE EXPECTED TO USE IT. A worksheet that never reaches for it is guessing, and a line recorded as reconciled is a line nobody re-reads.
8. Copy `line_code`, `line_label` and `profile_code` verbatim from the pack. Use the exact allowed value for every field that lists them, and return every field for every line.
RECONCILIATION RULEBOOK (the authority for `stream_call` and `container_call`; this is an ILLUSTRATIVE rulebook written for this kit, and the stream-class scheme in it is INVENTED and reproduces no real code list)
WHAT COUNTS AS A LINE ON THE WORKSHEET
- A line is on the worksheet if and only if it is a LINE OF THIS MANIFEST that the shipment carries.
- A line struck from the manifest before dispatch is NOT on the worksheet, even though its code, its description AND ITS WHOLE DETAIL BLOCK are still printed in the pack.
- A profile that is on file for this generator with nothing shipped under it on this manifest is NOT on the worksheet. A profile is an approval, not a shipment.
- A line carried on an EARLIER manifest under the same profile is NOT on the worksheet. It is a previous shipment, referred to here for context.
THE INVENTED STREAM CLASSES USED IN THIS PAPERWORK
SC-AQ aqueous stream, invented class - water-based, no separate organic phase recorded
SC-SOL solvent-bearing stream, invented class
SC-OIL oil-bearing stream, invented class
SC-SLG sludge or settled-solids stream, invented class
SC-LAB laboratory-pack stream, invented class - many small containers consolidated
SC-INR inert stream, invented class - carried on a profile but recorded as unreactive
THE CONTAINER TYPES USED IN THIS PAPERWORK
drum_steel a steel drum
drum_poly a plastic drum
tote_poly a plastic intermediate bulk container
ibc_steel a steel intermediate bulk container
box_fibre a fibreboard box, usually lined
bulk_tanker a road tanker loaded in bulk
THE THREE STATED FACTS, each a comparison between the manifest line and the profile it names
class_agreement:
same_class the manifest line states a stream class and it is the same class the profile it names states
different_class the manifest line states a stream class and it is a different class from the one the profile it names states
class_not_stated the manifest line states no stream class at all. The profile still states one - this is a gap in the manifest, not in the profile
state_agreement:
within_profile the physical state the manifest line states is one of the states the named profile lists as approved
outside_profile the physical state the manifest line states is NOT one the named profile lists
state_not_stated the manifest line states no physical state at all
container_agreement:
listed_container the container type the manifest line states appears on the named profile's approved container list
unlisted_container the container type the manifest line states does NOT appear on that list, and the profile does carry one
profile_lists_none the named profile records no approved container list at all, so there is nothing to check the container against
THE STREAM CALL -- work through IN ORDER, stop at the first that fires
1. THE CLASSES DISAGREE. If class_agreement is `different_class`, the worksheet records `conflicts`. Two pieces of paperwork name two different streams for the same drum, and nothing further needs checking to say so.
2. THE STATE IS OUTSIDE THE PROFILE. If state_agreement is `outside_profile`, the worksheet records `conflicts`. A physical state the profile does not list is a disagreement even where the class matches - a profile approved for liquid says nothing about a sludge.
3. BOTH AGREE. If class_agreement is `same_class` AND state_agreement is `within_profile`, the worksheet records `reconciles`. Both stated facts line up with the profile the line names.
4. ANYTHING ELSE. The worksheet records `not_determined`. A MATCHING STREAM CLASS IS NOT ON ITS OWN A RECONCILIATION - the class is what the generator called the stream, and it says nothing about whether what is actually in the drum is what the profile approved. A line that names the same class as its profile and states no physical state does not reconcile; it is unchecked. This is the branch a confident reader skips.
THE CONTAINER CALL
1. If container_agreement is `listed_container`, the worksheet records `on_profile`.
2. If container_agreement is `unlisted_container`, the worksheet records `off_profile`.
3. If container_agreement is `profile_lists_none`, the worksheet records `not_determined`. The container question is asked of every line independently of the stream call - a line whose classes disagree is still either in a container the profile lists, one it does not, or one there is no list for.
WHY `not_determined` IS A REAL ANSWER
A worksheet that never says `not_determined` is not a confident worksheet, it is a guessing one. The whole value of this shape is that a reviewer can see, in one column, which lines the two documents actually settle between them and which ones somebody has to go back to the generator about. Over-confidence here costs more than caution: a line recorded as reconciled is a line nobody re-reads, and on this kind of paperwork the line nobody re-reads is the one that arrives in the wrong container.
Return these:
- shipment_id (string) -- the shipment identifier from the Shipment section, verbatim
- lines (array of objects) -- one object per MANIFESTED line, each carrying:
- line_code (string) -- the line code from the Manifest row, verbatim (for example ML-4417). THIS IS THE KEY -- one object per MANIFESTED line and no others
- line_label (string) -- the line's description, copied verbatim from its own Line section's Description line
- profile_code (string) -- the profile code this line names, copied verbatim from its Line section's 'Profile named on this line' row (for example WP-2081). Every comparison below is against THAT profile's block and no other
- class_agreement (enum) one of: same_class, different_class, class_not_stated -- compare the line's 'Stream class on this line' row against the named profile's 'Approved stream class' row. 'same_class' when the line states a class and it is the same one; 'different_class' when the line states a class and it is a different one; 'class_not_stated' when the line has NO 'Stream class on this line' row at all. Report what the paperwork says -- a missing row is a finding about the manifest, not a gap to fill in from the description
- state_agreement (enum) one of: within_profile, outside_profile, state_not_stated -- compare the line's 'Physical state on this line' row against the named profile's 'Physical states approved' list. 'within_profile' when the stated state is on that list; 'outside_profile' when it is not; 'state_not_stated' when the line has NO 'Physical state on this line' row at all. Never infer the state from the description -- a line describing a sludge and stating no state is 'state_not_stated'
- container_agreement (enum) one of: listed_container, unlisted_container, profile_lists_none -- compare the line's 'Container' row against the named profile's 'Containers approved' row. 'listed_container' when the container type is on that list; 'unlisted_container' when the profile carries a list and this type is not on it; 'profile_lists_none' when the profile's row says no approved container list is recorded
- stream_call (enum) one of: reconciles, conflicts, not_determined -- the worksheet's stream call for this line, decided STRICTLY by the shipped rulebook from `class_agreement` and `state_agreement` and nothing else. Work through the four steps IN ORDER, stopping at the first that fires. (1) class_agreement 'different_class' -> 'conflicts'. (2) state_agreement 'outside_profile' -> 'conflicts'. (3) class_agreement 'same_class' AND state_agreement 'within_profile' -> 'reconciles'. (4) anything else -> 'not_determined'. A MATCHING STREAM CLASS IS NOT ON ITS OWN A RECONCILIATION: a line naming the same class as its profile and stating no physical state is 'not_determined', never 'reconciles'
- container_call (enum) one of: on_profile, off_profile, not_determined -- the worksheet's container call, decided STRICTLY from `container_agreement`: 'listed_container' -> 'on_profile', 'unlisted_container' -> 'off_profile', 'profile_lists_none' -> 'not_determined'. Asked of every line independently of its stream call -- a line whose classes disagree is still either in a container the profile lists, one it does not, or one there is no list for
Return a JSON object with exactly these top-level keys: shipment_id, lines
`lines` is an array. Return it empty only if the manifest carries no line at all.
SHIPMENT PACK
-------------
Shipment
--------
MFP-0050
SYNTHETIC RECORD. This pack was generated for a test kit. It is not a real manifest, not a
real profile and not a real shipment, and no real generator, transporter, receiving
facility, site or waste stream is named in it. The stream-class scheme used below is
invented for this kit and is not any real code list.
Manifest
--------
Manifest MN-54946, dispatched 2026-01-04. Lines as manifested:
ML-6134 Spent aqueous alkaline cleaner WP-1216 1 x bulk_tanker
ML-8132 Consolidated laboratory pack, bottles WP-1846 7 x drum_poly
ML-3221 Spray booth sludge and overspray WP-8577 11 x box_fibre
ML-2767 Spent adsorbent media, recorded inert WP-4640 3 x tote_poly
ML-6803 Tank-bottom oil sludge WP-6458 3 x drum_poly
ML-6378 Solvent-bearing wipes and rags WP-5135 2 x tote_poly
ML-5321 Settled sludge from a holding tank WP-2949 VOID before dispatch
Profile WP-1216
---------------
Approved stream class: SC-AQ
Physical states approved: liquid
Containers approved: drum_poly, tote_poly
Profile WP-1846
---------------
Approved stream class: SC-LAB
Physical states approved: solid
Containers approved: no approved container list is recorded on this profile.
Profile WP-8577
---------------
Approved stream class: SC-SLG
Physical states approved: sludge, solid
Containers approved: drum_steel, box_fibre
Profile WP-4640
---------------
Approved stream class: SC-INR
Physical states approved: solid
Containers approved: no approved container list is recorded on this profile.
Profile WP-6458
---------------
Approved stream class: SC-OIL
Physical states approved: liquid, sludge
Containers approved: drum_steel, bulk_tanker
Profile WP-5135
---------------
Approved stream class: SC-SOL
Physical states approved: liquid, solid
Containers approved: drum_steel, ibc_steel
Line ML-6134
------------
Description: Spent aqueous alkaline cleaner
Profile named on this line: WP-1216
Stream class on this line: SC-AQ
Physical state on this line: liquid
Container: bulk_tanker
Quantity: 1 x 22,000 L
Line ML-8132
------------
Description: Consolidated laboratory pack, bottles
Profile named on this line: WP-1846
Stream class on this line: SC-LAB
Container: drum_poly
Quantity: 7 x 205 L
Line ML-3221
------------
Description: Spray booth sludge and overspray
Profile named on this line: WP-8577
Stream class on this line: SC-SLG
Container: box_fibre
Quantity: 11 x 30 kg
Line ML-2767
------------
Description: Spent adsorbent media, recorded inert
Profile named on this line: WP-4640
Stream class on this line: SC-INR
Physical state on this line: sludge
Container: tote_poly
Quantity: 3 x 1,000 L
Line ML-6803
------------
Description: Tank-bottom oil sludge
Profile named on this line: WP-6458
Physical state on this line: sludge
Container: drum_poly
Quantity: 3 x 205 L
Line ML-6378
------------
Description: Solvent-bearing wipes and rags
Profile named on this line: WP-5135
Stream class on this line: SC-SOL
Physical state on this line: sludge
Container: tote_poly
Quantity: 2 x 1,000 L
Profile WP-2949
---------------
Approved stream class: SC-SLG
Physical states approved: sludge, solid
Containers approved: drum_steel, box_fibre
Line ML-5321
------------
Description: Settled sludge from a holding tank
Profile named on this line: WP-2949
Stream class on this line: SC-SLG
Physical state on this line: sludge
Container: drum_steel
Quantity: 5 x 205 L
This block was written before the line was struck and is retained in the pack for the audit
trail.
Earlier Manifest Under The Same Profile
---------------------------------------
Line ML-3978, Interceptor draw, oil and water, was carried on manifest MN-37332 under
profile WP-4640. It is not shipped again here and is listed for context only.
Manifest Notes
--------------
This pack is a draft for review.
Line ML-5321 was struck from the manifest before dispatch and is not carried on this
shipment.
Draft pack for the review queue. No acceptance, rejection or filing follows from anything
recorded here.