SPEC-PWF-MILL Rev 0.21.0 · 2026-08-20

Cane Agency · Specification · Perspective documentสถาบันอ้อย · เอกสารข้อกำหนด · เอกสารรายมุมมอง

Workflows — Sugar Factory PerspectiveWorkflow — มุมมองโรงงานน้ำตาล

Documentเอกสาร
SPEC-PWF-MILL
Versionversion (เวอร์ชัน)
0.21.0 · Draftฉบับร่าง
Updatedปรับปรุงล่าสุด
2026-08-20
Parentเอกสารแม่
SPEC-PWF
Perspectiveมุมมอง
Sugar factory (โรงงานน้ำตาล)โรงงานน้ำตาล
Siblingsเอกสารพี่น้อง
SPEC-ERD-MILL · SPEC-DDD-MILL
Admission — invitation-onlyการรับเข้า — เข้าโดยการเชิญ The mill capacity is invitation-only: a factory is admitted only against an operator-issued Invitation with facility eKYC (industry license · สอน. mill registry · capacity), never by open self-sign-up (WF-28, FR-70; PROP-006). The mill onboarding therefore begins at the operator-issued Invitation, not a self sign-up — a mill self-request is rejected at WF-25. capacity โรงงานเป็นเข้าโดยการเชิญ: โรงงานจะได้รับเข้าก็ต่อเมื่อมี Invitation ที่ operator ออก พร้อม eKYC ของโรงงาน (ใบอนุญาตอุตสาหกรรม · ทะเบียนโรงงาน สอน. · กำลังการผลิต) ไม่ใช่การสมัครเองแบบเปิด (WF-28, FR-70; PROP-006) ดังนั้นการเริ่มใช้ของโรงงานเริ่มที่ Invitation ที่ operator ออก ไม่ใช่การสมัครเอง — คำขอเองของโรงงานถูกปฏิเสธที่ WF-25

1. Purpose1. วัตถุประสงค์

The crushing season as the mill runs it: scheduling crushing days, the gate-to-ticket core loop, government re-note CCS ingestion, and settlement. Step tables mirror SPEC-PWF and the graph; this document slices them by actor, never changes them.

ฤดูหีบตามที่โรงงานดำเนินงานจริง: การจัดตารางวันหีบ วงจรแกนกลางจากประตูถึงบัตรชั่ง การนำเข้า re-note CCS ของรัฐ และการปิดงวด ตารางขั้นตอนสะท้อน SPEC-PWF และ graph (กราฟ); เอกสารนี้ตัดมุมมองตามผู้ใช้ ไม่เปลี่ยนแปลงเนื้อหา

2. Workflows I drive2. Workflowที่ฉันขับเคลื่อน

Workflow · my stepsWorkflow · ขั้นของฉันWhat I doสิ่งที่ฉันทำWhat the system promisesสิ่งที่ระบบสัญญา
WF-10 · allSchedule and open crushing days (capacity, burnt cap); close at end of day.จัดและเปิดวันหีบ (กำลัง เพดานไฟไหม้); ปิดเมื่อสิ้นวันBookings draw down capacity; cap breaches emit BurntCapBreached; closing derives the nightly compliance record.การจองตัดยอดกำลัง; การละเมิดปล่อย BurntCapBreached; การปิดวันสร้างระเบียนกำกับรายคืน
WF-03 · 3–6, 8Check trucks in; weigh gross/tare; confirm cane type + harvest method; issue the ticket; accept into crushing.เช็กอินรถ; ชั่งเต็ม/เปล่า; ยืนยันประเภท + วิธีเก็บเกี่ยว; ออกบัตร; รับเข้าหีบnet_kg > 0; tickets immutable with QR; CrushingDay tallies update per weigh-in; quota drawdown on accept.net_kg > 0; บัตรแก้ไม่ได้พร้อม QR; ยอดวันหีบอัปเดตทุกการชั่ง; หักโควตาเมื่อรับ
WF-04 · Q1–Q2Ingest the government (สอน.) re-note; the system auto-matches each CCS line to its delivery on the %N-### tag — no on-site lab, no "same day".นำเข้ารีโน้ตของรัฐ (สอน.); ระบบจับคู่แต่ละค่า CCS กับการส่งมอบด้วยแท็ก %N-### — ไม่มีแล็บในโรงงาน ไม่มี "วันเดียว"One valid test per delivery, provisional then confirmed; unmatched rows queue for manual match; CCS publishes online.หนึ่งผลต่อการส่งมอบ provisional แล้ว confirmed; แถวที่จับคู่ไม่ได้เข้าคิวจับคู่ด้วยมือ; CCS ออนไลน์
WF-05 · S1–S3Open the batch, review, approve; post payments and statements.เปิดชุด ตรวจ อนุมัติ; จ่ายเงินและส่งใบแจ้งยอดApproved batches freeze; items = base × net + CCS premium ± type adjustment − deductions; offsets post to Financing automatically.ชุดที่อนุมัติถูกตรึง; รายการ = ฐาน × สุทธิ + พรีเมียม ± ส่วนต่าง − การหัก; หักกลบส่งเข้าสินเชื่ออัตโนมัติ
WF-06 · 3Extend factory credit — direct or pass-through via a quota farmer.ให้สินเชื่อโรงงาน — ตรงหรือส่งผ่านหัวหน้าโควต้าPass-through chains via upstream_credit_id; downstream ≤ upstream.ส่งผ่านต่อสายด้วย upstream_credit_id; ปลายทาง ≤ ต้นทาง
WF-31…33, 35 v8.0Run strategic cane payment (ค่าอ้อยกลยุทธ์): establish an agreement (checkpoint / เหมาจ่าย, upfront 25/50/75); stamp→accrue→release the upfront step at payment due; release the withheld balance on contract-volume fulfilment; renegotiate (new revision, next-day effective) or open a concurrent agreement.ดำเนินค่าอ้อยกลยุทธ์: ตั้งข้อตกลง (checkpoint / เหมาจ่าย ล่วงหน้า 25/50/75); ประทับตรา→สะสม→จ่ายงวดล่วงหน้าเมื่อถึงกำหนด; จ่ายส่วนที่กันไว้เมื่อครบปริมาณ; เจรจาใหม่ (มีผลวันถัดไป) หรือเปิดข้อตกลงพร้อมกันConfidential by default; accrual off the weigh-ticket net, append-only & non-retroactive; never a PaymentItem component, no edge to สอน. (NFR-21/22).ความลับโดยค่าเริ่มต้น; สะสมจากน้ำหนักสุทธิ append-only ไม่ย้อนหลัง; ไม่เป็นส่วนของ PaymentItem ไม่มีเส้นไป สอน. (NFR-21/22)
WF-36…41 v9.0Run my general ledger & financial system (PROP-010): seed the mill chart & open the first period (WF-36); auto-post every settlement / เงินเกี๊ยว / loan / strategic release (WF-37); run the AR/AP cycle (WF-38); reconcile bank lines (WF-39); close the period and generate statements (WF-40); share a frozen statement to a bank via ConsentGrant scope books (WF-41).ดำเนินบัญชีแยกประเภทและระบบการเงิน (PROP-010): seed ผังโรงงานและเปิดงวดแรก (WF-36); ลงอัตโนมัติทุกการปิดยอด / เงินเกี๊ยว / สินเชื่อ / การจ่ายกลยุทธ์ (WF-37); วงจร AR/AP (WF-38); กระทบยอดธนาคาร (WF-39); ปิดงวดและออกงบ (WF-40); แบ่งงบที่ตรึงให้ธนาคารผ่าน ConsentGrant scope books (WF-41)Every entry balances; auto-postings idempotent & source-attributed (NFR-24); statements frozen, period reopen gated (NFR-25); a government-shared statement excludes strategic postings (FR-94, NFR-26).ทุกรายการดุล; ลงอัตโนมัติ idempotent ระบุที่มา (NFR-24); งบตรึง เปิดงวดมีสิทธิ์ (NFR-25); งบที่แบ่งให้รัฐตัดกลยุทธ์ออก (FR-94, NFR-26)
WF-45…46 v0.10.0Run the fuel-credit service (PROP-027): redeem a delivery note ONCE for fuel at a participating station up to the live headroom; the value offsets the same delivery's payout.ให้บริการเครดิตน้ำมัน (PROP-027): ใช้สิทธิใบส่งอ้อยครั้งเดียวเติมน้ำมันที่ปั๊มร่วมบริการไม่เกินวงเงินสด; มูลค่าหักกลบกับเงินค่าอ้อยของการส่งมอบเดียวกัน
WF-64 v0.16.0Finish the fiscal-period walk (PROP-023): request & approve the two-act lock, arm the auto-lock timer, reopen a closed period for genuine correction (voiding its frozen statements) — locked is final.ปิดจบเส้นทางงวดบัญชี (PROP-023): ขอและอนุมัติ lock สอง act ตั้ง timer ล็อกอัตโนมัติ reopen งวดที่ปิดเพื่อแก้ไขตัวงวดจริง (งบแช่แข็งเป็นโมฆะ) — locked เป็นที่สุด
WF-66 v0.20.0Keep my truck register clean (PROP-025): a clerk composes a same-factory TruckMergeRequest from a duplicate hint (normalized-plate collision) or any pair — surviving row, duplicate row, delivery re-point preview, mandatory reason; a management-grade approver (A-17 policy role) reviews the full blast radius and approves or rejects.รักษาทะเบียนรถให้สะอาด (PROP-025): เสมียนเรียบเรียง TruckMergeRequest ภายในโรงงานเดียวกันจาก duplicate hint (ทะเบียน normalize ชนกัน) หรือคู่ใด ๆ — แถวที่คงอยู่ แถวซ้ำ preview การชี้ delivery ใหม่ เหตุผลบังคับ; ผู้อนุมัติระดับผู้บริหาร (บทบาทตาม policy A-17) ตรวจผลกระทบเต็มแล้วอนุมัติหรือปฏิเสธSame mill_id only — never cross-factory; no self-approval; approval executes ATOMICALLY (deliveries re-point, duplicate soft-deletes with merged_into_truck_id, master links transfer) — never a half-merge; the surviving row re-enters the PLT matching pipeline fire-and-forget. Full step contract in the graph (WF-66).เฉพาะ mill_id เดียวกัน — ข้ามโรงงานไม่ได้; ห้ามอนุมัติเอง; การอนุมัติดำเนินการ atomic (delivery ชี้ใหม่ แถวซ้ำ soft-delete ด้วย merged_into_truck_id โอน link ของ master) — ไม่มีครึ่งเดียว; แถวที่คงอยู่เข้า pipeline จับคู่ของ PLT ใหม่แบบ fire-and-forget สัญญาขั้นตอนเต็มอยู่ใน graph (WF-66)

3. Workflow contracts — numbered step tables3. สัญญา workflow — ตารางขั้นตอนมีหมายเลข

One contract per workflow the mill drives (PROP-019 Section 3 bar). Every step pins actor · surface · action · precondition · postcondition · guards · events · failure branch; SLA and state pinning close each contract. The graph (workflows.nodes[].spec) is canonical; this section renders it.

หนึ่งสัญญาต่อหนึ่ง workflow ที่โรงงานขับเคลื่อน (เกณฑ์ข้อ 3 ของ PROP-019) ทุกขั้นตอนตรึง ผู้กระทำ · ช่องทางใช้งาน · การกระทำ · เงื่อนไขก่อน · เงื่อนไขหลัง · guard · event · กิ่งความล้มเหลว; ปิดท้ายด้วย SLA และการตรึง state ของแต่ละสัญญา graph (workflows.nodes[].spec) เป็นแหล่งความจริง เอกสารนี้ render จากมัน

WF-03 · Delivery & weigh-in (core loop)การส่งมอบและการชั่ง (วงจรแกนกลาง)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1quota_farmer / cane_farmer · mobile
Book the delivery against an open CrushingDay (crop, tonnage estimate, truck)จองการส่งมอบกับวันหีบที่เปิด (อ้อย ประมาณการตัน รถบรรทุก)
Pre: Open CrushingDay with booked_t + load_t ≤ crush_capacity_t; quota belongs to the crop owner's chain; truck has no other open delivery
Post: Delivery created in state booked; booked_t incremented in the same transaction
Guards: capacity drawdown transactional · quota-chain match · one open delivery per truck
Events: DeliveryBooked
Cap exceeded → REJECT with the next 3 open days offered (no waitlist). Offline → queue locally, sync ≤60 s (NFR-01), server-timestamp conflict resolution with farmer notified.เกินเพดาน → ปฏิเสธ พร้อมเสนอวันเปิดถัดไป 3 วัน (ไม่มี waitlist); offline → เข้าคิวในเครื่อง sync ≤60 วินาที (NFR-01) ความขัดแย้งตัดสินด้วยเวลาฝั่ง server และแจ้งชาวไร่
2weighbridge_operator · portal
Admit the truck at the gate (arrival guard)รับรถเข้าที่ประตู (เงื่อนไขขาเข้า)
Pre: Delivery booked; day open with capacity remaining; burnt share within cap (burnt_intake_t/weighed_t ≤ burnt_cap_pct)
Post: Delivery → arrived
Guards: capacity remaining · burnt-cap predicate · plate = truck_reg_snap (correct with audited reason)
Events: TruckArrived
Cap reached / burnt over cap → truck holds at gate with displayed reason; mismatch → correct-with-reason or dispute.กำลังเต็ม / ไฟไหม้เกินเพดาน → รถพักที่ประตูพร้อมแสดงเหตุผล; ทะเบียนไม่ตรง → แก้พร้อมเหตุผล (มีบันทึกตรวจสอบ) หรือเปิดข้อพิพาท
3weighbridge_operator · portal
Record gross weight; capture the CCS match tag (crushing_line · tipper_slot · coin_no) and confirm cane_type + harvest_methodบันทึกน้ำหนักรวม เก็บแท็กจับคู่ CCS (สายหีบ · ช่องเท · เหรียญคิว) และยืนยันประเภทอ้อย + วิธีเก็บเกี่ยว
Pre: Delivery arrived; truck on bridge; scale reading stable ≥2 s
Post: gross_kg + %N-### tag + cane facts captured
Guards: stable reading ≥2 s · coin unique per mill per day (FR-100) · cane_type mandatory
Scale link down → weighing HALTS (A-10/NFR-33 — manual weight entry does not exist anywhere); per-bridge blocking/hold state wb.blocked.scale_link per PROP-031.แท่นชั่ง offline → กรอกมือโดยมีสองลายเซ็น (พนักงาน + ผู้จัดการ) ติดธง manual_weight; ห้าม fallback แบบเงียบ
4weighbridge_operator · portal
After tipping, collect the returned tokens and record tare; issue the immutable WeighTicket and print the statutory 4-ply delivery note (แบบ อ. 1 ใบรับอ้อย) on the impact printer; driver signs and takes the farmer ply (A-36, PROP-029)หลังเทอ้อย รับเหรียญคืนและบันทึกน้ำหนักรถเปล่า; ออกบัตรชั่งแก้ไขไม่ได้ พร้อมพิมพ์ใบรับอ้อย 4 สำเนาตามกฎหมาย (แบบ อ. 1) ด้วยเครื่องพิมพ์ impact; คนขับลงชื่อและรับสำเนาชาวไร่ (A-36, PROP-029)
Pre: gross recorded; net = gross − tare > 0
Post: WeighTicket issued (unique ticket_no); Delivery → weighed; net visible to farmer & quota farmer ≤60 s (FR-97)
Guards: net_kg > 0 · ticket immutable after issue (NFR-05)
Events: WeightRecorded
Printer jam/spoiled set → re-run the full 4-ply set before the truck leaves (record authoritative); a ply lost later re-issues only at the mill cane office, marked COPY (A-36). net ≤ 0 → blocked wb.err.net_zero.เครื่องพิมพ์ขัด/ชุดเสีย → พิมพ์ชุด 4 สำเนาใหม่ก่อนรถออก (ระเบียนเป็นหลัก); สำเนาหายภายหลังขอใบแทนที่สำนักงานอ้อย ประทับ COPY (A-36); net ≤ 0 → บล็อก wb.err.net_zero
5mill_manager / weighbridge_operator · portal
Accept the delivery (or reject / dispute)ตรวจรับการส่งมอบ (หรือไม่รับซื้อ / เปิดข้อพิพาท)
Pre: Delivery weighed; no open dispute; within quota tolerance
Post: Delivery → accepted; installment due dates computed & shown (FR-95)
Guards: no open dispute · quota tolerance
Events: DeliveryAccepted
Excess trash/contamination → Reject with mandatory reason (terminal). Weight contested → Dispute → re-weigh supersedes the ticket, then Resolve back to weighed with supervisor sign-off.ใบอ้อย/ปนเปื้อนเกิน → ไม่รับซื้อพร้อมเหตุผลบังคับ (สถานะสุดท้าย); โต้แย้งน้ำหนัก → ข้อพิพาท → ชั่งใหม่ออกบัตรแทน แล้วยุติกลับเป็น weighed พร้อมหัวหน้างานลงนาม

SLA: Weigh-in round-trip < 1 s P95 on LAN · Net visible to farmer ≤ 60 s after WeightRecorded · Booking completes < 90 s median (FR-06 metric family)ชั่งเข้าไป-กลับ < 1 วินาที P95 บน LAN · ชาวไร่เห็นน้ำหนักสุทธิ ≤ 60 วินาทีหลัง WeightRecorded · การจองเสร็จมัธยฐาน < 90 วินาที
State pinning:การตรึง state: Performs booked→arrived (TruckArrived), arrived→weighed (WeightRecorded), weighed→accepted|rejected|disputed, disputed→weighed (Resolve) of the delivery state machine.ทำ transition: booked→arrived (TruckArrived), arrived→weighed (WeightRecorded), weighed→accepted|rejected|disputed, disputed→weighed (Resolve) ของ state machine การส่งมอบ

WF-04 · Quality — CCS by re-noteคุณภาพ — CCS จาก re-note

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1weighbridge_operator · portal
Capture the match tag at weigh-in (see WF-03 step 3)เก็บแท็กจับคู่ตอนชั่งเข้า (ดู WF-03 ขั้น 3)
Pre: Weigh-in in progress
Post: %N-### tag on delivery & ticket
Guards: tag unique per mill/day
Missing tag → delivery flagged unmatched-risk.ไม่มีแท็ก → การส่งมอบติดธงเสี่ยงจับคู่ไม่ได้
2lab_analyst · portal
Upload the สอน. re-note (Excel/CSV or transcribed paper)อัปโหลด re-note ของ สอน. (Excel/CSV หรือคัดลอกจากกระดาษ)
Pre: Re-note document received from สอน.
Post: Rows parsed; ingestion report (matched / queued / errored)
Guards: idempotent by row hash
Events: CcsReNoteIngested
Malformed rows → row-level error report; valid rows proceed (partial ingest).แถวผิดรูปแบบ → รายงานข้อผิดพลาดรายแถว แถวที่ถูกต้องเดินต่อ (นำเข้าบางส่วนได้)
3system · —
Auto-match each row to its delivery on mill + date + %N-### tagจับคู่แต่ละแถวกับการส่งมอบอัตโนมัติด้วย โรงงาน + วันที่ + แท็ก %N-###
Pre: Ingested rows
Post: QualityTest.confirmed_ccs set, source = ocsb_re_note (NFR-28)
Guards: unique candidate only — ambiguity never auto-assigned
Events: CcsMatched
No/multiple candidates → manual-match queue.ไม่มี/มีหลายตัวเลือก → เข้าคิวจับคู่ด้วยมือ
4lab_analyst · portal
Work the manual-match queue (side-by-side candidates)ทำคิวจับคู่ด้วยมือ (เทียบตัวเลือกเคียงข้างกัน)
Pre: Queued rows
Post: Row matched with who/when audit, or marked unmatchable
Guards: audit trail mandatory
Events: CcsMatched
Unmatchable rows escalate to สอน. reconciliation (offline).จับคู่ไม่ได้ → ส่งกระทบยอดกับ สอน. (นอกระบบ)
5system · mobile / portal
Publish confirmed CCS to farmer & settlementเผยแพร่ CCS ยืนยันถึงชาวไร่และการปิดงวด
Pre: CcsMatched
Post: Farmer notified; settlement uses confirmed value; CCS delta after installment 1 reconciles in installment 2 (FR-06)
——

SLA: ≥95% of rows auto-matched (FR-98) · Confirmed CCS within 7 days of weigh-out (FR-06 metric)≥95% ของแถวจับคู่อัตโนมัติ (FR-98) · CCS ยืนยันภายใน 7 วันหลังชั่งออก (ตัวชี้วัด FR-06)
State pinning:การตรึง state: No delivery-state transitions — quality is asynchronous to acceptance; a correction re-note supersedes with audit trail.ไม่มี transition ของการส่งมอบ — คุณภาพเป็น asynchronous ต่อการตรวจรับ; re-note แก้ไขแทนที่ค่าเดิมพร้อมบันทึกตรวจสอบ

WF-05 · Settlement (two statutory installments)การจ่ายเงิน (สองงวดตามกฎหมาย)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1finance_officer · portal
Open the cycle's PaymentBatch (งวด) on a MillPaymentSchedule cycle dateเปิดชุดจ่ายเงินประจำรอบ (งวด) ตามวันในตารางรอบจ่าย
Pre: Active schedule (FR-96); Board-approved initial price announcement in force
Post: Batch open, scoped to deliveries accepted before the cycle cut-off
Guards: price announcement exists — else se.err.no_price
No announcement → batch cannot open.ไม่มีราคาประกาศ → เปิดชุดไม่ได้
2system · —
Compute per-delivery installment lines: 50% × initial price (CCS-adjusted) × net_t + cane-type adjustment − offsetsคำนวณรายการต่อการส่งมอบ: 50% × ราคาขั้นต้น (ปรับ CCS) × ตันสุทธิ + ส่วนต่างประเภทอ้อย − การหักกลบ
Pre: Batch open
Post: PaymentItem + PaymentInstallment rows itemized to the satang
Guards: offset floor ฿0 (remainder carries) · cane-type rates effective at weigh date (FR-18)
Missing confirmed CCS → announcement's provisional formula applies; delta lands in installment 2.ยังไม่มี CCS ยืนยัน → ใช้สูตรชั่วคราวของประกาศ ส่วนต่างเข้างวดที่ 2
3finance_officer · portal
Review the batch (variances, offsets, exceptions)ตรวจทานชุด (ผลต่าง การหักกลบ รายการผิดปกติ)
Pre: Computed batch
Post: Exceptions resolved or annotated
Chain-mismatch offsets excluded & flagged to credit desk (FR-17).การหักกลบสายไม่ตรง → ตัดออกและติดธงให้โต๊ะสินเชื่อ (FR-17)
4mill_manager · portal
Approve the batchอนุมัติชุด
Pre: Reviewed batch
Post: Batch approved (distinct audited act)
Guards: approval ≠ posting
Events: BatchApproved
Rejection returns to step 3 with comments.ไม่อนุมัติ → กลับขั้น 3 พร้อมความเห็น
5finance_officer · portal
Post the batchบันทึกชุด
Pre: Approved batch; posting on the statutory cycle date (never after — NFR-27)
Post: Installment 1: Delivery → part_settled per delivery; installment 2 (due ≥ +30 d): Delivery → settled; books auto-post (FR-88)
Guards: due-date engine dates are immutable (FR-95)
Events: PaymentPosted, FirstInstallmentPosted, FinalInstallmentPosted, RepaymentPosted, JournalPosted
Posting failure → batch atomic per delivery; failed items retry; nothing double-posts (idempotent keys).บันทึกล้มเหลว → แยกผลรายการส่งมอบ รายการที่พลาดลองใหม่ ไม่มีการลงซ้ำ (idempotent)

SLA: 100% installments posted on the statutory cycle date (NFR-27) · Two-installment clock: inst 1 next cycle after acceptance + note; inst 2 first cycle ≥ +30 d100% ของงวดบันทึกตรงวันรอบตามกฎหมาย (NFR-27) · นาฬิกาสองงวด: งวด 1 รอบถัดไปหลังตรวจรับ + ใบส่งมอบ; งวด 2 รอบแรก ≥ +30 วัน
State pinning:การตรึง state: Performs accepted→part_settled (FirstInstallmentPosted) and part_settled→settled (FinalInstallmentPosted).ทำ transition: accepted→part_settled (FirstInstallmentPosted) และ part_settled→settled (FinalInstallmentPosted)

WF-10 · Crushing-day scheduling & intake capsตารางวันหีบและเพดานรับเข้า

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1mill_manager · portal
Open the CrushingDay with crush_capacity_t and burnt_cap_pct (defaulted from CanePurchasePolicy)เปิดวันหีบพร้อมกำลังหีบและเพดานไฟไหม้ (ค่าเริ่มต้นจากนโยบายรับซื้อ)
Pre: Open season
Post: Day open; bookable
Guards: capacity set — else cd.err.capacity
Events: CrushingDayOpened
——
2system · mobile / portal
Accept bookings with transactional drawdownรับการจองพร้อมตัดยอดแบบ transaction
Pre: Day open
Post: booked_t maintained live
Guards: booked_t + load_t ≤ crush_capacity_t · no waitlist — reject with next 3 open days
Events: DeliveryBooked
Cap reached → bookings rejected.กำลังเต็ม → ปฏิเสธการจอง
3weighbridge_operator · portal
Enforce the arrival guard through the day (WF-03 step 2)บังคับเงื่อนไขขาเข้าตลอดวัน (WF-03 ขั้น 2)
Pre: Arrivals
Post: Admissions within capacity & burnt cap
Guards: burnt_intake_t/weighed_t ≤ burnt_cap_pct
Events: TruckArrived, BurntCapBreached
Mid-day capacity cut (breakdown): arrived trucks honored, new arrivals hold, day bookings freeze.กำลังลดกลางวัน (เครื่องเสีย): รถที่มาถึงแล้วได้ไปต่อ รถใหม่พัก การจองของวันหยุดนิ่ง
4mill_manager · portal
Close the dayปิดวัน
Pre: Intake complete
Post: Totals frozen; burnt-compliance report fed (FR-32); booked-vs-weighed variance reported
Guards: no open weigh-ins
Events: CrushingDayClosed
Open weigh-in at close → must resolve (complete or dispute) first.มีการชั่งค้างตอนปิด → ต้องจบก่อน (ชั่งเสร็จหรือเข้าข้อพิพาท)

SLA: 0 admissions beyond capacity — hard cap · Day close before next day opens0 การรับเข้าเกินกำลัง — เพดานแบบแข็ง · ปิดวันก่อนเปิดวันถัดไป
State pinning:การตรึง state: Gates booked→arrived; no other transitions.ควบคุมประตู booked→arrived; ไม่มี transition อื่น

WF-31 · Establish a strategic agreementตั้งข้อตกลงกลยุทธ์

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1mill_manager · portal
Author the StrategicAgreement (mode checkpoint | fixed_price เหมาจ่าย, variant, premium/tier, contract_volume_t, upfront 25/50/75)จัดทำข้อตกลงกลยุทธ์ (โหมด checkpoint | fixed_price เหมาจ่าย, ตัวแปร, premium/ช่วงอัตรา, ปริมาณสัญญา, ล่วงหน้า 25/50/75)
Pre: Counterparty holds grower/quota capacity
Post: Draft agreement, confidential by default
Guards: upfront ∈ {25,50,75} · scope-overlap check vs concurrent agreements (FR-80)
Overlapping scope with an active agreement → blocked at save.ขอบเขตทับซ้อนข้อตกลงที่ใช้อยู่ → บล็อกตอนบันทึก
2quota_farmer / cane_farmer · mobile / portal
Countersignคู่สัญญาลงนามรับ
Pre: Draft shared to counterparty only
Post: Agreement active
Guards: two-tenant visibility only (NFR-21/23)
Events: StrategicAgreementSigned
Declined → draft stays editable or is withdrawn.ปฏิเสธ → ร่างแก้ไขต่อได้หรือถอน

SLA: Effective from signature; rate changes only via renegotiation (WF-35)มีผลตั้งแต่ลงนาม; เปลี่ยนอัตราได้ทางการเจรจาใหม่เท่านั้น (WF-35)
State pinning:การตรึง state: Agreement lifecycle: draft → active (→ fulfilled | superseded).วงจรข้อตกลง: draft → active (→ fulfilled | superseded)

Amended — PROP-045 (spec v0.22.0)แก้ไข — PROP-045 (spec v0.22.0) Step 1's overlap guard now runs the shared resolver (FR-185): predicate = same counterparty + same season + intersecting delivery-matching sets over the explicit scope axes. Save rejects (str.err.overlap) while overlap is disabled (MillStrategicConfig, default) or on an exact-cost tie when enabled. guard การทับซ้อนของขั้นที่ 1 ใช้ resolver ร่วม (FR-185): predicate = คู่สัญญาเดียวกัน + ฤดูเดียวกัน + เซตการ match ตัดกันบนแกน scope ชัดเจน save ปฏิเสธ (str.err.overlap) เมื่อปิดการทับซ้อน (MillStrategicConfig ค่าเริ่มต้น) หรือต้นทุนเท่ากันพอดีเมื่อเปิด

WF-32 · Stamp → accrue → upfront releaseประทับตรา → สะสม → จ่ายล่วงหน้า

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1weighbridge_operator · portal / mobile
Capture the checkpoint stamp (register the long-haul truck into the factory system)บันทึกการประทับตราที่จุดตรวจ (ลงทะเบียนรถทางไกลเข้าระบบโรงงาน)
Pre: Checkpoint registered (FR-78)
Post: StampEvent recorded
Guards: idempotent per checkpoint+plate+window
Events: CheckpointStamped
Unmatched stamp → exception queue, expires at day close.ตราไม่จับคู่ → คิวข้อยกเว้น หมดอายุเมื่อปิดวัน
2system · —
Match stamp → delivery on plate + time windowจับคู่ตรา → การส่งมอบ ด้วยทะเบียนรถ + ช่วงเวลา
Pre: Delivery arriving/weighed same day
Post: Stamp linked
Guards: nearest-window; manual confirm on ambiguity (FR-79)
Two candidates → manual confirm.สองตัวเลือก → ยืนยันด้วยมือ
3system · —
Accrue the premium off the weighed net at acceptance: net_t × resolved tier rateสะสม premium จากน้ำหนักสุทธิเมื่อตรวจรับ: ตันสุทธิ × อัตราช่วงที่ resolve ได้
Pre: Delivery accepted; active matching agreement
Post: PremiumAccrual posted OFF PaymentItem (NFR-21)
Guards: idempotent per delivery (NFR-22) · tier resolved from season-to-date volume
Events: PremiumAccrued
Re-weigh supersedes → correcting accrual posts (FR-81).ชั่งใหม่แทนที่ → ลงรายการสะสมแก้ไข (FR-81)
4finance_officer · portal
Release the upfront step at installment-1 dueจ่ายงวดล่วงหน้าเมื่อถึงกำหนดงวดที่ 1
Pre: Accrual final; installment 1 due
Post: upfront_pct released; remainder withheld
Guards: Σ releases ≤ Σ accruals
Events: PremiumStepReleased, JournalPosted
Release before acceptance finality → blocked.จ่ายก่อนการตรวจรับสิ้นสุด → บล็อก

SLA: Accrual posts with acceptance; upfront release rides the installment-1 due dateการสะสมลงพร้อมการตรวจรับ; จ่ายล่วงหน้าตามวันครบกำหนดงวดที่ 1
State pinning:การตรึง state: No delivery-state transitions; premium ledger only.ไม่มี transition ของการส่งมอบ; เป็นสมุด premium เท่านั้น

WF-33 · Fulfilment releaseจ่ายส่วนครบปริมาณ

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1system · —
Detect contract-volume fulfilment (season-to-date delivered ≥ contract_volume_t)ตรวจพบการส่งครบปริมาณสัญญา (ยอดสะสมฤดู ≥ ปริมาณสัญญา)
Pre: Active agreement with withheld balance
Post: Fulfilment flagged
Guards: volume from accepted deliveries only
Events: ContractVolumeFulfilled
Season ends unfulfilled → variant terms decide the withheld disposition (net_no_benefit forfeits; upfront_plus_benefit pro-rata — FR-82).ฤดูจบแต่ไม่ครบ → เงื่อนไขตัวแปรของข้อตกลงตัดสินส่วนที่กันไว้ (net_no_benefit ริบ; upfront_plus_benefit จ่ายตามสัดส่วน — FR-82)
2finance_officer · portal
Release the withheld balance in ONE fulfilment payoutจ่ายยอดพักไว้ทั้งหมดในครั้งเดียว
Pre: Fulfilment flagged
Post: Agreement → fulfilled; books auto-post
Guards: single payout — no dribble
Events: PremiumStepReleased, JournalPosted
——

SLA: Fulfilment payout in the next release run after detectionจ่ายส่วนครบปริมาณในรอบจ่ายถัดไปหลังตรวจพบ
State pinning:การตรึง state: Agreement active → fulfilled.ข้อตกลง active → fulfilled

WF-35 · Renegotiation & concurrent agreementsเจรจาใหม่และข้อตกลงพร้อมกัน

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1mill_manager · portal
Author a new agreement revision (or an additional concurrent agreement)จัดทำ revision ใหม่ (หรือข้อตกลงเพิ่มแบบพร้อมกัน)
Pre: Active agreement
Post: Revision effective_from ≥ tomorrow
Guards: non-retroactive (NFR-22) · concurrent agreements must not overlap scope
Same-day effect → impossible by design.ขอให้มีผลวันเดียวกัน → เป็นไปไม่ได้โดยการออกแบบ
2quota_farmer / cane_farmer · mobile / portal
Countersign the revisionคู่สัญญาลงนาม revision
Pre: Revision shared
Post: Prior revision superseded forward-only; posted accruals unchanged
Events: StrategicAgreementSigned
Declined → prior revision stays in force.ปฏิเสธ → revision เดิมมีผลต่อ

SLA: Earliest effect: next dayมีผลเร็วสุด: วันถัดไป
State pinning:การตรึง state: Agreement revision chain: active → superseded (forward-only).สาย revision ของข้อตกลง: active → superseded (ไปข้างหน้าเท่านั้น)

Amended — PROP-045 (spec v0.22.0)แก้ไข — PROP-045 (spec v0.22.0) Concurrent agreements are re-validated by the shared resolver on EVERY mutation; scope changes bind effective-forward only — a change that would create retroactive overlap cannot exist; accrued rows untouched (OQ-17). A plan publish colliding with a live agreement offers SUPERSEDE under two-act approval: old ends today, new effective next day (FR-186). ข้อตกลงพร้อมกันถูกตรวจซ้ำโดย resolver ร่วมทุก mutation; การเปลี่ยน scope มีผลไปข้างหน้าเท่านั้น — การเปลี่ยนที่จะสร้างการทับซ้อนย้อนหลังเกิดไม่ได้; แถวที่ accrue แล้วไม่แตะ (OQ-17) publish แผนที่ชนข้อตกลง live เสนอ SUPERSEDE แบบอนุมัติสองขั้น: ฉบับเก่าสิ้นสุดวันนี้ ฉบับใหม่มีผลวันถัดไป (FR-186)

WF-36 · Books onboardingเริ่มใช้บัญชี

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1system · —
Seed the capacity's ChartTemplate as system_flag accountsSeed ผังบัญชีของ capacity เป็นบัญชีระบบ (system_flag)
Pre: Tenant's first books use; not yet seeded
Post: Chart seeded (idempotent)
Guards: system accounts locked (no delete/renumber)
Events: ChartSeeded
Already seeded → no-op.seed แล้ว → ไม่ทำซ้ำ
2system · —
Open the first FiscalPeriod; create BooksProfile (mill: basis accrual, edition split, view full — PROP-011)เปิดงวดบัญชีแรก สร้าง BooksProfile (โรงงาน: เกณฑ์คงค้าง, edition แยก, มุมมองเต็ม — PROP-011)
Pre: Chart seeded
Post: Books operational
Guards: basis explicit on every period (FR-105)
——

SLA: Books ready before the tenant's first auto-posting (FR-87)บัญชีพร้อมก่อนการลงอัตโนมัติครั้งแรกของ tenant (FR-87)
State pinning:การตรึง state: FiscalPeriod: open.งวดบัญชี: open

WF-37 · Auto-postingการลงบัญชีอัตโนมัติ

PROP-023 (v0.16.0): step 1 now resolves books.postingMap — one declarative row per (event, affected capacity) joined by the shared event id, leg amounts from NAMED source fields (OQ-5); an unmapped event raises books.err.unmapped, fires PostingUnmapped and blocks the batch item (NFR-52); corrections are black reversal + repost (reverses_entry_id, OQ-7); mirroring proven by the graph-validator balancing check (OQ-6).ขั้น 1 resolve ผ่าน books.postingMap — หนึ่งแถว declarative ต่อ (event, capacity) เชื่อมด้วย event id ร่วม ยอดขาจาก field ต้นทางตั้งชื่อ (OQ-5); event ไม่มีแถวยก books.err.unmapped ยิง PostingUnmapped และ block รายการ (NFR-52); การแก้ไขเป็น black reversal + post ใหม่ (reverses_entry_id, OQ-7); การสะท้อนพิสูจน์ด้วยการตรวจสมดุลของ validator (OQ-6)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1system · —
On each money-event, resolve the auto-posting map to balanced entry(ies) for every affected tenantทุกเหตุการณ์เงิน: แปลงตาม posting map เป็นรายการดุลของทุก tenant ที่เกี่ยวข้อง
Pre: Money-event committed (settlement, เงินเกี๊ยว, service payment, loan, strategic release)
Post: JournalEntry per tenant, source-attributed (source_type, source_id)
Guards: balanced (NFR-24) · idempotent on source key · append-only (NFR-13)
Events: JournalPosted
Unbalanced mapping → refused & alarmed, no partial write. Books unavailable → retry from event log; source event never blocked.ไม่ดุล → ปฏิเสธและแจ้งเตือน ไม่มีการเขียนบางส่วน; books ล่ม → ลองใหม่จาก event log เหตุการณ์ต้นทางไม่ถูกบล็อก

SLA: Auto-post within 5 min of the source event (FR-88)ลงอัตโนมัติภายใน 5 นาทีหลังเหตุการณ์ต้นทาง (FR-88)
State pinning:การตรึง state: ——

WF-38 · AR/AP cycleวงจรลูกหนี้/เจ้าหนี้

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1finance_officer · portal
Raise/receive an Invoice (auto from source event or manual)ออก/รับใบแจ้งหนี้ (อัตโนมัติจากเหตุการณ์ต้นทาง หรือด้วยมือ)
Pre: Counterparty balance exists
Post: Invoice issued
Events: InvoiceIssued
——
2finance_officer · portal
Record a Receipt (AR) or PaymentVoucher (AP), partial supportedบันทึกใบเสร็จ (AR) หรือใบสำคัญจ่าย (AP) ชำระบางส่วนได้
Pre: Open invoice
Post: Open balance cleared partially/fully; journal auto-posts
Guards: overpayment → counterparty credit, never negative AR · receipt on a paid invoice blocked
Events: ReceiptPosted, PaymentVoucherPosted, JournalPosted
Void → reversing document (append-only).ยกเลิกเอกสาร → ออกเอกสารกลับรายการ (append-only)
3system · —
Walk invoice statusเดินสถานะใบแจ้งหนี้
Pre: Postings
Post: issued → part_paid → paid
Events: InvoiceSettled
——

SLA: AR/AP aging reconciles to open documents to the satang (FR-89)รายงานอายุหนี้กระทบกับเอกสารคงค้างถึงระดับสตางค์ (FR-89)
State pinning:การตรึง state: Invoice: issued → part_paid → paid.ใบแจ้งหนี้: issued → part_paid → paid

WF-39 · Bank reconciliationกระทบยอดธนาคาร

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1finance_officer · portal
Import or hand-enter BankTransaction lines for a CashAccountนำเข้าหรือกรอกรายการธนาคารของบัญชีเงินสด
Pre: CashAccount exists
Post: Lines staged
Guards: idempotent by line hash
Events: BankTransactionImported
Duplicate import → deduped.นำเข้าซ้ำ → ตัดซ้ำอัตโนมัติ
2finance_officer · portal
Match lines to journal entries; resolve differences (fees → adjusting entries)จับคู่รายการกับสมุดบัญชี แก้ผลต่าง (ค่าธรรมเนียม → รายการปรับปรุง)
Pre: Staged lines
Post: Matched set + running difference
Events: JournalPosted
Unmatchable line → carried open, blocks close.รายการจับคู่ไม่ได้ → ค้างไว้ และปิดไม่ได้
3finance_officer · portal
Close the reconciliationปิดการกระทบยอด
Pre: statement balance = ledger balance
Post: Reconciliation closed
Guards: nonzero difference → close impossible (FR-90)
Events: ReconciliationClosed
——

SLA: Monthly close, balanced, for every active CashAccountปิดรายเดือนแบบดุลครบทุกบัญชีเงินสดที่ใช้งาน
State pinning:การตรึง state: Reconciliation: open → closed (balanced only).การกระทบยอด: open → closed (ปิดได้เมื่อดุลเท่านั้น)

WF-40 · Period close & statementsปิดงวดและงบการเงิน

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1finance_officer · portal
Start period closeเริ่มปิดงวด
Pre: Auto-posting backlog empty (else blocked with list)
Post: FiscalPeriod → closing
Guards: backlog gate (FR-91)
Backlog → resolve first.มีรายการอัตโนมัติค้างลง → ต้องแก้ก่อน
2mill_manager · portal
Confirm closeยืนยันการปิด
Pre: closing
Post: FiscalPeriod → closed; postings into it refused (late events → open period w/ source date)
Events: PeriodClosed
Reopen closed→closing allowed with audited reason until locked.เปิดใหม่ closed→closing ได้พร้อมเหตุผล (มีบันทึก) จนกว่าจะล็อก
3finance_officer · portal
Generate frozen statements (P&L, balance sheet, trial balance, cash flow) per period/seasonสร้างงบตรึง (กำไรขาดทุน งบดุล งบทดลอง กระแสเงินสด) รายงวด/รายฤดู
Pre: closed
Post: FinancialStatement snapshots (versioned, immutable — NFR-25)
Guards: regenerate = new version
Events: StatementGenerated
Statement on open period renders draft-watermarked, unshareable (FR-92).งบบนงวดเปิดติดตรา 'ฉบับร่าง' แบ่งปันไม่ได้ (FR-92)

SLA: Close ≤ 5 working days after period endปิด ≤ 5 วันทำการหลังสิ้นงวด
State pinning:การตรึง state: FiscalPeriod: open → closing → closed → locked.งวดบัญชี: open → closing → closed → locked

WF-64 · Period lock & reopen (PROP-023, extends WF-40)lock และ reopen งวดบัญชี (PROP-023 ต่อจาก WF-40)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · เงื่อนไข · event
1finance_officer · portal · request lock on a closed period (mill-period)finance_officer · portal · ขอ lock งวดที่ปิดแล้ว (mill-period)closed → lock requested; from closed onlyclosed → ขอ lock แล้ว; จาก closed เท่านั้น
2mill_manager · portal · approve the lock (two-act, A-17 pattern; configured approver chain)mill_manager · portal · อนุมัติ lock (สอง act แบบ A-17; สายผู้อนุมัติที่ตั้งค่า)→ locked (FINAL), no exit transition · PeriodLocked→ locked (เป็นที่สุด) ไม่มีทางออก · PeriodLocked
3system · auto-lock timer — per-tenant, factory-configurable (working default 60 days after close); ALWAYS on for cash-basis growers (their sole path, OQ-9)system · timer ล็อกอัตโนมัติ — ราย tenant ตั้งค่ารายโรงงาน (ค่าทำงาน 60 วันหลังปิด); เปิดเสมอสำหรับชาวไร่เกณฑ์เงินสด (ทางเดียวของเขา, OQ-9)closed + timer elapsed → locked (lock_source timer) · PeriodLockedclosed + ครบ timer → locked (lock_source timer) · PeriodLocked
4system · season close force-lock — after the final true-up posts, every period of the season lockssystem · ปิดฤดูบังคับ lock — หลัง true-up สุดท้าย post ทุกงวดของฤดู lock→ locked (lock_source season_close) · PeriodLocked→ locked (lock_source season_close) · PeriodLocked
5finance_officer + mill_manager · portal · reopen a closed (never locked) period for genuine correction — two-act, audited reasonfinance_officer + mill_manager · portal · reopen งวด closed (ไม่ใช่ locked) เพื่อแก้ไขตัวงวดจริง — สอง act พร้อมเหตุผลที่ auditclosed → closing; frozen statements VOIDED (regenerate on re-close) · PeriodReopened; NEVER a repost vehicle — late reposts post into the current open period with effective_date (OQ-10)closed → closing; งบแช่แข็งเป็นโมฆะ (สร้างใหม่เมื่อปิดซ้ำ) · PeriodReopened; ไม่ใช่ยานพาหนะ repost — repost ช้าลงงวดเปิดปัจจุบันพร้อม effective_date (OQ-10)

SLA: No closed period remains unlocked beyond the configured timer bound. States: closed → locked (final); closed → closing (reopen, audited).ไม่มีงวด closed ค้างไม่ lock เกินขอบ timer ที่ตั้ง สถานะ: closed → locked (เป็นที่สุด); closed → closing (reopen แบบ audit)

WF-41 · Statement sharingการแบ่งปันงบ

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1mill_manager · portal
Grant ConsentGrant scope books to a bank (time-boxed, revocable)ให้ ConsentGrant scope books แก่ธนาคาร (จำกัดเวลา เพิกถอนได้)
Pre: Frozen statement exists
Post: Consent active
Guards: scope books only; never bundled (NFR-23)
Events: ConsentGranted
Draft statement → sharing blocked (FR-93).งบฉบับร่าง → แบ่งปันไม่ได้ (FR-93)
2system · finance
Serve the statement to the bank; export CSV/PDFส่งงบให้ธนาคาร พร้อมส่งออก CSV/PDF
Pre: Active consent
Post: StatementShared logged
Guards: full statement (PROP-011 Q5); strategic line detail collapsed without strategic_terms consent (FR-94, NFR-26); NO path to the government capacity
Events: StatementShared
Consent revoked → access ends immediately.เพิกถอน consent → การเข้าถึงจบทันที

SLA: Access rides the consent window exactlyการเข้าถึงเท่ากับหน้าต่าง consent พอดี
State pinning:การตรึง state: ——

WF-45 · Fuel redemption at the pump (PROP-027)การใช้สิทธิน้ำมันที่ปั๊ม (PROP-027)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1station attendant · pump kiosk / station appคีออสก์ปั๊ม / แอปสถานี
Scan/key the delivery note (self-contained QR: delivery identity, validation no., net tonnes, cap inputs) → delivery, cap and live headroom render (FR-119)สแกน/คีย์ใบส่งอ้อย (QR ครบในตัว: อัตลักษณ์ delivery เลขตรวจสอบ ตันสุทธิ ข้อมูลเพดาน) → แสดงการส่งมอบ เพดาน และวงเงินสด (FR-119)
Pre: Service enabled (MillFuelConfig); note unredeemedบริการเปิด (MillFuelConfig); ใบยังไม่ใช้
Post: Single fill authorized up to headroomอนุมัติเติมครั้งเดียวไม่เกินวงเงิน
Guards: server-side headroom authoritative (F1); one fill per note ever (OQ-2)วงเงินยึดฝั่ง server (F1); เติมครั้งเดียวต่อใบ (OQ-2)
Service off / note unknown / already redeemed / zero headroom → refused with a plain-Thai reason.บริการปิด / ไม่รู้จักใบ / ใช้แล้ว / วงเงินหมด → ปฏิเสธพร้อมเหตุผลภาษาไทย
2station attendant · pump kiosk / station appคีออสก์ปั๊ม / แอปสถานี
Record litres, fuel type, price (pump price or subsidy override) against the validation number; print the farmer receiptบันทึกลิตร ชนิดน้ำมัน ราคา (หน้าปั๊มหรือราคาอุดหนุน) เทียบเลขตรวจสอบ; พิมพ์ใบเสร็จให้ชาวไร่
Pre: Fill completeเติมเสร็จ
Post: FuelCredit row (open); bearer redemption — no identity check (OQ-3)แถว FuelCredit (open); ผู้ถือใบใช้สิทธิ — ไม่ตรวจตัวตน (OQ-3)
Guards: redeemed_amount ≤ headroom
Events: FuelCreditRedeemed
Kiosk offline → queue locally (pre-fetched reference data), authoritative reconciliation at sync; double-redemption caught at sync flags for review (OQ-4).คีออสก์ offline → เข้าคิวท้องถิ่น (ข้อมูลอ้างอิงดึงล่วงหน้า) กระทบยอดจริงตอน sync; ใช้ซ้ำที่จับได้ตอน sync ติดธงตรวจทาน (OQ-4)

SLA: Headroom computed and shown in real time on every surface (FR-119)คำนวณและแสดงวงเงินแบบ real time ทุก surface (FR-119)
State pinning:การตรึง state: FuelCredit: open → offset | voided

WF-46 · Fuel-credit offset posting (PROP-027)การ post หักกลบเครดิตน้ำมัน (PROP-027)

#Actor · surface · actionผู้กระทำ · ช่องทาง · การกระทำPre → post · guards · eventsก่อน → หลัง · guard · eventFailure branchกิ่งความล้มเหลว
1system · payment pipelinepipeline การจ่าย
On payout computation, convert the open FuelCredit to an FR-17-family deduction on that payout; attribute to the delivering sub-farmer unless bought outright (OQ-3)เมื่อคำนวณเงินค่าอ้อย แปลง FuelCredit ที่เปิดเป็นการหักตระกูล FR-17 บนเงินก้อนนั้น; ระบุที่ลูกไร่ผู้ส่ง เว้นแต่ซื้อขาด (OQ-3)
Pre: Installment computation covering the deliveryการคำนวณงวดที่ครอบคลุมการส่งมอบ
Post: Statement itemized; credit → offsetแจกแจงบน statement; เครดิต → offset
Guards: existing deduction ordering & waiting-item rules unchanged (A-41…A-43, F2); no farmer fee/interest by defaultลำดับหักและกติกา item รอคงเดิม (A-41…A-43, F2); ไม่มีค่าธรรมเนียม/ดอกเบี้ยโดยค่าเริ่มต้น
Events: FuelCreditOffsetPosted
Payout < redeemed value → residual treatment is a requirements-pass item; a void needs reason + audit (NFR-35), FuelCreditVoided.เงินค่าอ้อย < มูลค่าที่เติม → การจัดการส่วนเหลือเป็นงานรอบ requirements; การ void ต้องมีเหตุผล + audit (NFR-35), FuelCreditVoided

SLA: Offset posts in the same computation run as the payoutการหักกลบ post ในรอบคำนวณเดียวกับเงินค่าอ้อย
State pinning:การตรึง state: FuelCredit: open → offset | voided

Queue train workflows — WF-47…53 (PROP-020 + PROP-024, spec v0.12.0)workflow ขบวนคิว — WF-47…53 (PROP-020 + PROP-024, spec v0.12.0)

Seven workflows land with the queue train; the graph carries the full numbered step contracts (workflows.nodes[].spec, canonical). The QueueTicket aggregate precedes the Delivery: — → waiting → called → checked_in → served, with expired / cancelled terminals, requeue-once-then-expire on missed grace, and QueueFrozen as the FR-30/A-18 freeze mechanism (not a ticket transition). Digest:

เจ็ด workflow มากับขบวนคิว; graph ถือสัญญาขั้นตอนแบบมีหมายเลขฉบับเต็ม (workflows.nodes[].spec, canonical) aggregate บัตรคิวมาก่อน Delivery: — → waiting → called → checked_in → served พร้อม terminal expired / cancelled กติกาต่อท้ายหนึ่งครั้งแล้วหมดอายุเมื่อพลาดช่วงผ่อนผัน และ QueueFrozen เป็นกลไก freeze ของ FR-30/A-18 (ไม่ใช่ transition ของบัตร) สรุป:

Amended v0.33.0 (PROP-061) — the yard is several lines. WF-47 step 1 now binds the line at issuance: the booth picks the lane (usually implied by the cane type already captured), the platform resolves its open instance or opens the next one on overflow (FR-322), and lane_seq_no is the truck’s place in that line — the offline reserved ranges become per-gate per-lane ranges. Step 2 publishes the pair: which line is being released now, today’s release sequence so far, the farmer’s own line and place in it, trucks ahead in that line (counted) and the hour band beside it (always marked an estimate; it widens on low confidence and is withheld only below eta_min_releases — NFR-113). WF-49 gains two steps: release a line (whole line or up to a stated sequence; every release records actor + lane instance + count and is published as it happens, never promised before the day — FR-321, D-2) and record a lane change (pending until the truck’s current line is called in, then joining the new line at its tail — D-3). Full numbered step contracts stay canonical in the graph.

แก้ v0.33.0 (PROP-061) — ลานคือหลายแถว WF-47 ขั้น 1 ผูก แถว ตอนออกบัตร: ป้อมเลือกแถว (มักอนุมานจากชนิดอ้อยที่บันทึกอยู่แล้ว) ระบบหาแถวที่เปิดอยู่หรือเปิดแถวถัดไปเมื่อเต็ม (FR-322) และ lane_seq_no คือที่ของรถในแถวนั้น ส่วนช่วงเลขสำรองออฟไลน์เป็นรายป้อม รายแถว ขั้น 2 ประกาศคู่เลข: กำลังปล่อยแถวใด วันนี้ปล่อยไปแล้วกี่แถว แถวของชาวไร่และลำดับในแถวนั้น จำนวนคันข้างหน้าในแถว (นับได้) และช่วงชั่วโมงข้าง ๆ (กำกับว่าเป็นค่าประมาณเสมอ กว้างขึ้นเมื่อความมั่นใจต่ำ และไม่แสดงเฉพาะเมื่อต่ำกว่า eta_min_releases — NFR-113) WF-49 เพิ่มสองขั้น: ปล่อยแถว (ทั้งแถวหรือถึงลำดับที่กำหนด ทุกครั้งบันทึกผู้ทำ แถวที่เปิดจริง และจำนวน พร้อมประกาศตามที่เกิดขึ้น ไม่สัญญาไว้ก่อนเริ่มวัน — FR-321, D-2) และ บันทึกการเปลี่ยนแถว (รอผลจนกว่าแถวปัจจุบันของรถจะถูกเรียกเข้า แล้วไปต่อท้ายแถวใหม่ — D-3) สัญญาขั้นตอนฉบับเต็มยังเป็น canonical ใน graph

Amended v0.34.0 (PROP-063) — the release step now carries a reason and a count. WF-49 (queue release / call) gains three preconditions on any release taken out of turn: one of the three published reason categories, room under the mill's published daily ceiling, and a membership holding the shift-level grant permission — which is never the factory-settings permission that publishes or raises the ceiling (separation of duties, PROP-063 D-6). The step writes the reason and the actor with the release and increments the day's count in the same commit, so a release cannot exist without its reason and cannot slip past the ceiling; at the ceiling the step is refused outright, the single exception being a mill_remedy release, which is permitted, labelled and reported separately. In V2 the same step writes an ExpressGrant (with ExpressGranted) inside the transaction that performs the lane change, and a farmer's later flag (ExpressFlagged) attaches to the committed grant without touching queue state — reviewed at season close, never in the day.

แก้ v0.34.0 (PROP-063) — ขั้นการปล่อยมีเหตุผลและตัวนับ WF-49 (ปล่อย/เรียกคิว) เพิ่มเงื่อนไขก่อนสามข้อสำหรับการปล่อย แทรกลำดับ: หมวดเหตุผลที่ประกาศหนึ่งในสาม ที่ว่างใต้เพดานรายวันที่ประกาศ และสิทธิ์ระดับกะซึ่งไม่ใช่สิทธิ์ระดับตั้งค่าโรงงานที่ใช้ประกาศหรือยกเพดาน (แยกหน้าที่ ตาม D-6) ขั้นนี้เขียนเหตุผลและผู้ทำพร้อมการปล่อย และเพิ่มตัวนับของวันใน commit เดียวกัน จึงไม่มีการปล่อยที่ไม่มีเหตุผลและไม่มีการเลยเพดาน เมื่อถึงเพดานขั้นนี้ถูกปฏิเสธ ยกเว้น mill_remedy ที่ทำได้ ติดป้าย และรายงานแยก ใน V2 ขั้นเดียวกันเขียน ExpressGrant (พร้อม ExpressGranted) ใน transaction ที่ย้ายแถว และธงของชาวไร่ (ExpressFlagged) ผูกกับการให้สิทธิ์ที่ commit แล้วโดยไม่แตะสถานะคิว ทบทวนตอนปิดฤดู

WFNameชื่อSubstanceสาระ
WF-47Walk-in queue intake (QL-0+)รับคิว walk-in (QL-0+)Gate issues the ticket ≤10 s (quota ID + plate + cane type) → live board/mobile/QR position → physical FCFS call → check-in → gate registration creates the Delivery into arrived (seq_no → coin_no) → WF-03 step 3. Offline: reserved per-gate seq ranges.ประตูออกบัตร ≤10 วิ (รหัสโควตา + ทะเบียน + ชนิดอ้อย) → ลำดับสดบนป้าย/มือถือ/QR → เรียกตามมาก่อนได้ก่อน → เช็กอิน → ลงทะเบียนประตูสร้าง Delivery เข้า arrived (seq_no → coin_no) → WF-03 ขั้น 3 offline: ช่วงเลขสำรองรายประตู
WF-48RETIRED v0.32.0 — remote join & call-forward (QL-1)ยกเลิก v0.32.0 — เข้าคิวระยะไกลและเรียกคิว (QL-1)Retired with QL-1 (PROP-060 OQ-2): a yard is several physical parked lines released a whole line at a time, so a position cannot be held without the truck and a truck cannot be inserted mid-line. What survives is pre-registration inside WF-47 — the app pre-fills the ticket data, the booth issues the position. Id retired, never reused.ยกเลิกไปกับ QL-1 (PROP-060 OQ-2): ลานคือหลายแถวที่ปล่อยเข้าทีละแถว จึงถือลำดับคิวไว้โดยไม่มีรถไม่ได้ และแทรกรถกลางแถวไม่ได้ สิ่งที่เหลือคือการกรอกข้อมูลล่วงหน้าใน WF-47 — แอปกรอกข้อมูลบัตร ป้อมเป็นผู้ออกลำดับคิว รหัสถูกยกเลิกและไม่นำกลับมาใช้
WF-49Queue console operationsปฏิบัติการคอนโซลคิวOpen/pause/freeze (auto on the A-18 capacity cut); call tuning; audited exception handling — every manual reorder demands actor + reason; day close expires open tickets and stale bookings (Q-03 disposal).เปิด/พัก/แช่แข็ง (อัตโนมัติเมื่อลดกำลังตาม A-18); ปรับการเรียก; จัดการข้อยกเว้นแบบตรวจสอบได้ — จัดลำดับด้วยมือทุกครั้งต้องมีผู้กระทำ + เหตุผล; ปิดวันทำให้บัตรและการจองค้างหมดอายุ (Q-03)
WF-50Blended intake — booked + walk-in lanes (QL-2+)รับอ้อยผสม — ช่องจอง + walk-in (QL-2+)Amends WF-03 step 1: booking targets a TimeSlot within booked_share_pct; window arrival → booked lane; miss → walk-in tail (evented); A-18 cut bumps last-booked-first with keep/cancel; excused by construction (R3).แก้ WF-03 ขั้น 1: จองระบุ TimeSlot ภายใน booked_share_pct; มาถึงในช่วง → ช่องจอง; พลาด → ท้าย walk-in (มี event); การลดตาม A-18 bump จองหลังโดนก่อนพร้อมเลือกคง/ยกเลิก; excused โดยโครงสร้าง (R3)
WF-51Slot booking & arrival resolutionจอง slot และตัดสินการมาถึงSlot picker within the privilege horizon → transactional slot + day drawdown → booth resolves in-window / early (wait or convert-and-surrender, OQ-4) / late-demote + minutes / day-close no-show / in-time cancel — one reliability event per outcome (R1).เลือก slot ภายในระยะตามสิทธิ์ → หัก slot + วันแบบ transactional → บูธตัดสิน ในช่วง / ก่อนเวลา (รอหรือแปลง-สละ, OQ-4) / ช้า-ลดชั้น + นาที / no-show ตอนปิดวัน / ยกเลิกทันเวลา — หนึ่งเหตุการณ์ความน่าเชื่อถือต่อผลลัพธ์ (R1)
WF-52Reliability recompute & band transitionคำนวณคะแนนและเปลี่ยนชั้นDeterministic recompute under the pinned platform formula (byte-identical, NFR-41) → band compare per mill policy → BookingPrivilegeChanged + farmer notification with cause and recovery path; excused events recompute nothing.คำนวณเชิงกำหนดตามสูตร platform ที่ตรึงไว้ (ตรงทุกไบต์, NFR-41) → เทียบชั้นตามนโยบายโรงงาน → BookingPrivilegeChanged + แจ้งชาวไร่พร้อมสาเหตุและทางกู้คืน; เหตุการณ์ excused ไม่คำนวณ
WF-53Slot & privilege administrationบริหาร slot และสิทธิ์SlotTemplate / BookingPrivilegePolicy editing (effective-forward, two-act publish per A-17), per-farmer overrides, score disputes resolved ONLY by a compensating excused event — history is never edited.แก้ SlotTemplate / BookingPrivilegePolicy (มีผลไปข้างหน้า ประกาศสองจังหวะตาม A-17) override รายชาวไร่ ข้อโต้แย้งคะแนนแก้ด้วยเหตุการณ์ excused ชดเชยเท่านั้น — ไม่มีวันแก้ประวัติ

On-site tier workflows — WF-54…58 (PROP-021 + PROP-028, spec v0.13.0)workflow ชั้นติดตั้งในโรงงาน — WF-54…58 (PROP-021 + PROP-028, spec v0.13.0)

Five workflows land with the on-site train; the graph carries the full numbered step contracts (workflows.nodes[].spec, canonical). Governing principles: stations talk to the gateway during NORMAL operation (G1 — offline is the absence of one background job); one allocator per factory (G2); split authority makes sync boring (G3 — gateway owns intake facts, platform owns masters/config). Digest:

ห้า workflow มากับขบวนติดตั้งในโรงงาน; graph ถือสัญญาขั้นตอนแบบมีหมายเลขฉบับเต็ม (workflows.nodes[].spec, canonical) หลักการกำกับ: สถานีคุยกับ gateway ในการทำงานปกติ (G1 — offline คือการหายไปของงานเบื้องหลังหนึ่งงาน); ผู้จ่ายเลขหนึ่งเดียวต่อโรงงาน (G2); การแบ่งอำนาจทำให้ sync น่าเบื่อ (G3 — gateway เป็นเจ้าของข้อเท็จจริงการรับอ้อย platform เป็นเจ้าของข้อมูลหลัก/config) สรุป:

WFNameชื่อSubstanceสาระ
WF-54Station intake chain (S1→S6)สายโซ่รับอ้อยของสถานี (S1→S6)ST-QB ticket → ST-WB weigh-in (gateway dispenses ticket_no, token pair) → ST-CT coin → ST-TIP dump + %N tag → ST-LAB CCS in trap order → continuous auto-match into the IntakeMatchSet. Every commit ≤2 s on the LAN; no step touches the internet.บัตร ST-QB → ชั่งเข้า ST-WB (gateway จ่าย ticket_no, เหรียญคู่) → เหรียญ ST-CT → เท ST-TIP + แท็ก %N → CCS ที่ ST-LAB ตามลำดับ trap → จับคู่อัตโนมัติต่อเนื่องลง IntakeMatchSet ทุกการบันทึก ≤2 วิบน LAN; ไม่มีขั้นใดแตะอินเทอร์เน็ต
WF-55Gateway sync & offline operationการ sync ของ gateway และการทำงาน offlineFacts up as an append-only checkpointed stream (idempotent replay after the last acknowledged SyncCheckpoint — the platform observes, never renumbers); config down as versioned snapshots binding from ACKNOWLEDGEMENT only (OQ-3, "pending at factory"); internet loss pauses the upstream job and nothing else.ข้อเท็จจริงขึ้นเป็น stream แบบ append-only มี checkpoint (replay แบบ idempotent หลัง SyncCheckpoint ที่ยืนยันล่าสุด — platform สังเกต ไม่จ่ายเลขใหม่); config ลงเป็น snapshot มีเวอร์ชัน มีผลเมื่อยืนยันรับเท่านั้น (OQ-3, "รอถึงโรงงาน"); อินเทอร์เน็ตล่มหยุดเพียงงานขาขึ้น
WF-56Auto-match & exception reviewจับคู่อัตโนมัติและทบทวนข้อยกเว้นThe match engine runs locally on the gateway (matching survives internet loss); exceptions (conflicts, unmatched rows, void/reissue pairs) to mill-match with actor + reason on resolution; corrections only ever APPEND (void/dispute = new events on the same stream).เครื่องจับคู่ทำงานท้องถิ่นบน gateway (จับคู่ต่อได้แม้เน็ตล่ม); ข้อยกเว้น (ความขัดแย้ง แถวไม่จับคู่ คู่ยกเลิก/จ่ายใหม่) เข้า mill-match พร้อมผู้กระทำ + เหตุผล; การแก้ไขทำได้เพียงเพิ่ม (void/ข้อพิพาท = event ใหม่บนสายเดิม)
WF-57Coin circulation & void-and-reissueเหรียญหมุนเวียนและยกเลิก-จ่ายใหม่Per-line per-day circulation config (mill-settings token topic, effective from gateway acknowledgement); void with reason (number dead until daily reset) → reissue from the reserve band linked to the SAME delivery; TokenVoided → TokenReissued audited as one thread in mill-match.config ชุดหมุนเวียนต่อ line ต่อวัน (หัวข้อเหรียญใน mill-settings มีผลเมื่อ gateway ยืนยันรับ); ยกเลิกพร้อมเหตุผล (เลขตายจนรีเซ็ตประจำวัน) → จ่ายใหม่จากช่วงสำรองผูกการส่งมอบเดิม; TokenVoided → TokenReissued audit เป็นเส้นด้ายเดียวใน mill-match
WF-149The four-checkpoint coin journey v0.80.0การเดินทางของเหรียญสี่จุดตรวจ v0.80.0PROP-033. ONE reusable coin per delivery journey, tapped four times: weigh-in opens the TokenBinding at the moment of the physical handover and writes the binding-scoped driver capability to the tag; the coin tower ASSIGNS the dump/tipper slot and the tap carries that assignment forward; the tipper tap writes crushing_line and tipper_slot from the reader’s own station configuration and links the DumpEvent, completing the %N-### tag with no keystroke; weigh-out runs the saga — tare commit → binding close → grant revoke → A-36 print → pool release last. The observed route beats the assignment for the tag and a divergence is a routing exception. Both invariants are database partial uniques, and the certified weight commits in its OWN transaction (FR-568…FR-575, FR-597, A-10/NFR-33).PROP-033 เหรียญใช้ซ้ำหนึ่งอันต่อการเดินทางส่งมอบหนึ่งครั้ง แตะสี่ครั้ง: ชั่งเข้าเปิด TokenBinding ณ วินาทีส่งมอบจริงและเขียน capability ของคนขับลงแท็ก; หอเหรียญกำหนดช่องเทและการแตะพาการกำหนดนั้นไปข้างหน้า; การแตะช่องเทเขียน crushing_line และ tipper_slot จากการตั้งค่าสถานีของเครื่องอ่านเอง และลิงก์ DumpEvent ทำให้แท็ก %N-### ครบโดยไม่คีย์; ชั่งออกเดิน saga — บันทึกน้ำหนักออก → ปิดการผูก → เพิกถอน grant → พิมพ์ตาม A-36 → ปลดเข้า pool เป็นขั้นสุดท้าย เส้นทางที่สังเกตได้ชนะการกำหนดสำหรับแท็ก และความต่างเป็นข้อยกเว้นการจัดเส้นทาง ข้อคงที่ทั้งสองเป็น partial unique ที่ฐานข้อมูล และน้ำหนักที่รับรอง commit ใน transaction ของตัวเอง (FR-568…FR-575, FR-597, A-10/NFR-33)
WF-150Degraded mode — authorization and reconciliation v0.80.0โหมดเสื่อม — การอนุญาตและการกระทบยอด v0.80.0PROP-033. Three operational levels, and only the third is degraded: an A-2 warm-standby promotion is normal infrastructure recovery (no coin-workflow supervisor, no exception) and buffered capture with every validation intact is normal operation. Level 3 begins only on the declared conditions, under nine reason codes, and needs the mill’s on-duty Operations Shift Supervisor — never Cane support, never the operator who met the failure — with a short-lived signed cached grant for a total outage. Identity is recovered ONLY from the machine-applied serial, the reference mark or the printed number; certified weights are never keyed. The truck continues on its statutory note while the binding and the delivery stay exception-pending and settlement and CCS matching WAIT for reconciliation (FR-583, FR-599, FR-600).PROP-033 สามระดับการทำงาน และมีเพียงระดับที่สามที่เป็นความเสื่อม: การเลื่อนสถานะเครื่องสำรองอุ่นชั้น A-2 เป็นการกู้คืนโครงสร้างพื้นฐานตามปกติ (ไม่ต้องมีหัวหน้าใน workflow เหรียญ ไม่มีข้อยกเว้น) และการเก็บข้อมูลแบบ buffer โดยการตรวจสอบครบเป็นการทำงานปกติ ระดับ 3 เริ่มเฉพาะตามเงื่อนไขที่ประกาศ ด้วยรหัสเหตุผลเก้ารหัส และต้องมีหัวหน้ากะปฏิบัติการที่อยู่เวร — ไม่ใช่ทีมสนับสนุนของ Cane ไม่ใช่ผู้ปฏิบัติงานที่เจอความล้มเหลว — พร้อมสิทธิ์ที่ลงลายเซ็นและแคชไว้อายุสั้นเมื่อล่มทั้งหมด กู้อัตลักษณ์ได้เฉพาะจากเลขลำดับที่ทำด้วยเครื่อง เครื่องหมายอ้างอิง หรือเลขพิมพ์; น้ำหนักที่รับรองไม่เคยคีย์ด้วยมือ รถเดินต่อด้วยใบตามกฎหมาย ขณะที่การผูกและการส่งมอบคงสถานะรอชี้ขาด และการชำระเงินกับการจับคู่ CCS รอการกระทบยอด (FR-583, FR-599, FR-600)
WF-151Central enrolment, marking and tag replacement v0.80.0การลงทะเบียน ทำเครื่องหมาย และเปลี่ยนแท็กที่ศูนย์กลาง v0.80.0PROP-033 (PO-4, PO-6). An authoritative coin identity is created ONLY by Cane’s single published, versioned provisioning procedure, at a controlled enrolment, encoding, marking and verification station, at BOTH hardware postures: batch registered with supplier, BOM version, operator and date → each unit encoded, keyed, machine-marked and proved readable → the mill inventories, issues, returns, counts and requests replacement and provisions nothing → a retired chip is replaced and the key retired with the coin or the tenant. Keys are tenant-scoped, referenced and never stored on a domain record; no raw key material reaches a mill and none is handled in the yard (FR-605, FR-606, NFR-225, NFR-232).PROP-033 (PO-4, PO-6) อัตลักษณ์เหรียญที่มีอำนาจถูกสร้างโดยขั้นตอนการเตรียมใช้งานฉบับเดียวที่ Cane ประกาศและมีเวอร์ชันเท่านั้น ที่สถานีลงทะเบียน เขียนข้อมูล ทำเครื่องหมาย และตรวจสอบ ที่ควบคุม ในทั้งสองท่าทีฮาร์ดแวร์: ลงทะเบียนชุดผลิตพร้อมผู้ขาย เวอร์ชัน BOM ผู้ปฏิบัติงาน และวันที่ → เขียนข้อมูล ใส่กุญแจ ทำเครื่องหมายด้วยเครื่อง และพิสูจน์ว่าอ่านได้ทุกชิ้น → โรงงานดูแลคลัง แจก รับคืน ตรวจนับ และขอเปลี่ยนแทน และไม่เตรียมใช้งานสิ่งใด → ชิปที่ปลดระวางถูกเปลี่ยน และกุญแจถูกปลดพร้อมเหรียญหรือ tenant กุญแจผูกกับ tenant ถูกอ้างอิงและไม่เคยเก็บบนระเบียนโดเมน; ไม่มีสาระกุญแจดิบถึงโรงงานและไม่มีการจับต้องในลาน (FR-605, FR-606, NFR-225, NFR-232)
WF-58Suite onboarding & gateway commissioningเปิดใช้ชุดสถานีและติดตั้ง gatewayOpt-in enablement (PROP-016) → appliance commissioning (signed image, sealed datastore F-6, allocator epoch F-3, out-of-band management) → station registration (certificates, per-type down-posture F-5, signed binaries verified) → staged migration up the ladder — no big-bang cutover.เปิดใช้แบบ opt-in (PROP-016) → ติดตั้ง appliance (image ลงนาม, ฐานข้อมูลผนึก F-6, allocator epoch F-3, ช่องจัดการนอกสาย) → ลงทะเบียนสถานี (ใบรับรอง ท่าเมื่อล่มรายประเภท F-5 ตรวจ binary ลงนาม) → ย้ายเป็นขั้นตามบันได — ไม่มีการตัดเปลี่ยนครั้งใหญ่

Strategic planning workflows — WF-59…61 (PROP-022, spec v0.14.0) + WF-73 (PROP-044, spec v0.23.0)workflow การวางแผนกลยุทธ์ — WF-59…61 (PROP-022, spec v0.14.0) + WF-73 (PROP-044, spec v0.23.0)

Three workflows land with the paid planning suite; the graph carries the full numbered step contracts (canonical). Governing rules: simulation never touches live accruals; publish is two-act across a permission hierarchy (author → executive); everything effective-forward (NFR-22) inside the confidentiality wall (NFR-49). Digest:

สาม workflow มากับชุดวางแผนจ่ายเพิ่ม; graph ถือสัญญาขั้นตอนฉบับเต็ม (canonical) กฎกำกับ: การจำลองไม่แตะ accrual จริง; publish เป็นสอง act ข้ามลำดับชั้น permission (ผู้เขียน → ผู้บริหาร); ทุกอย่างมีผลไปข้างหน้า (NFR-22) ในกำแพงความลับ (NFR-49) สรุป:

WFNameชื่อSubstanceสาระ
WF-59Author & publish a plan versionเขียนและ publish เวอร์ชันแผนScenario sandbox (break-even · adequacy · envelope) → submit with written justification → executive review (books-position impact, insight analytics; str_plan_approve, no self-approval) → immutable PlanVersion effective its declared date (≥ tomorrow) writes CheckpointRate + CalcBasisPolicy rows; PlanPublished. The version is created PENDING — atomic activation at effective_from is WF-73 (PROP-044, v0.23.0); exactly one pending per plan, cancel-and-replace only.sandbox สถานการณ์ (คุ้มทุน · ความพอเพียง · กรอบวงเงิน) → ส่งพร้อมเหตุผลประกอบ → หน้าทบทวนผู้บริหาร (ผลต่อฐานะบัญชี, insight analytics; str_plan_approve ห้ามอนุมัติตนเอง) → PlanVersion แก้ไขไม่ได้ มีผลวันที่ประกาศ (≥ พรุ่งนี้) เขียนแถว CheckpointRate + CalcBasisPolicy; PlanPublished เวอร์ชันเกิดในสถานะ PENDING — การ activate แบบ atomic ณ effective_from คือ WF-73 (PROP-044, v0.23.0); pending ทีละหนึ่งต่อแผน ยกเลิกแล้วแทนที่เท่านั้น
WF-60Calc-basis resolution at accrualresolve calc basis ตอน accrueAmends WF-32 step 3: cascade resolve (agreement/tenant → group → mill default; tier override most specific; agreement at the apex, OQ-5) → apply marginal | whole_volume math; a whole-volume threshold crossing follows the agreement's retro flag — retro top-up accrual or forward-only (OQ-1).แก้ WF-32 ขั้น 3: resolve ตามลำดับชั้น (ข้อตกลง/ชาวไร่ → กลุ่ม → ค่าเริ่มต้นโรงงาน; override ราย tier เฉพาะที่สุด; ข้อตกลงคือยอด, OQ-5) → คำนวณ marginal | whole_volume; การข้าม threshold ของ whole-volume เป็นไปตาม flag retro ของข้อตกลง — accrual เติมย้อนหลังหรือไปข้างหน้าเท่านั้น (OQ-1)
WF-61Cost & forecast refresh + alertingrefresh ต้นทุน/พยากรณ์และการเตือนEvery stamp/accrual updates the mill-str-cost aggregates within minutes (NFR-48); the four-signal forecast recomputes (stamped run rate · bookings · quota plans · forecast_t); alerts fire before money moves — TierThresholdApproaching (retro quantified), SpendEnvelopeExceeded, under-pulling band flags. No farmer-side push at base tier (OQ-4 → PROP-039/041).ทุกการประทับตรา/accrual อัปเดต mill-str-cost ภายในไม่กี่นาที (NFR-48); พยากรณ์สี่สัญญาณคำนวณซ้ำ (run rate ที่ stamp · การจอง · แผนโควตา · forecast_t); เตือนก่อนเงินขยับ — ใกล้ threshold (retro เป็นตัวเลข), เกินกรอบวงเงิน, ธงช่วงระยะดึงต่ำ ไม่ push ฝั่งชาวไร่ในชั้นฐาน (OQ-4 → PROP-039/041)
WF-73Adjust a live plan — pending version & atomic activationปรับแผนที่ live — เวอร์ชัน pending และการ activate แบบ atomic(PROP-044, v0.23.0; OQ-22…25 client-decided.) Fork from live with season-to-date actuals → slice-edit down to the individual farmer agreement (published version = ALWAYS the complete snapshot, OQ-22) → two-act publish PENDING, effective_from ≥ tomorrow, exactly ONE pending, cancel-and-replace only → continuous + at-activation re-validation; conflict cancels with alert, never partial (OQ-24) → atomic activation (PlanVersionActivated / PlanAdjustmentCancelled); deliveries bucket at mill acceptance, retro re-rating stops at the boundary, ladder never resets (OQ-23) → propagation: unilateral rows + new-agreement templates only; live agreements → flagged WF-35 renegotiation worklist with console drift (OQ-25). Full step contract in the graph (FR-187).(PROP-044, v0.23.0; ลูกค้าตัดสิน OQ-22…25) fork จาก live พร้อมตัวเลขจริงสะสม → แก้รายส่วนลึกถึงข้อตกลงรายชาวไร่ (เวอร์ชันที่ publish = snapshot ทั้งแผนเสมอ, OQ-22) → publish สอง act สถานะ PENDING, effective_from ≥ พรุ่งนี้, pending ทีละหนึ่ง ยกเลิกแล้วแทนที่เท่านั้น → validate ซ้ำต่อเนื่องและตอน activate; ขัดแย้งยกเลิกพร้อม alert ไม่มีบางส่วน (OQ-24) → activate แบบ atomic (PlanVersionActivated / PlanAdjustmentCancelled); จัดการส่งมอบตามการรับมอบที่โรงงาน re-rate ย้อนหลังหยุดที่ขอบ บันไดไม่ reset (OQ-23) → ส่งผลต่อ: แถวฝ่ายเดียว + แม่แบบสำหรับข้อตกลงใหม่เท่านั้น; ข้อตกลง live → worklist เจรจาใหม่ WF-35 พร้อม drift บน console (OQ-25) สัญญาขั้นตอนเต็มอยู่ใน graph (FR-187)

3.x WF-62 · WF-63 — capacity & maintenance-plan loops (PROP-032, v0.15.0)3.x WF-62 · WF-63 — วงจรกำลังหีบและแผนซ่อมบำรุง (PROP-032, v0.15.0)

Full step contracts in the graph (workflows.nodes WF-62/WF-63).สัญญาขั้นตอนเต็มอยู่ใน graph (workflows.nodes WF-62/WF-63)

WFLoopวงจร
WF-62Downtime capture → binding forecast → sweep: designated operator records the stop immediately (record-first) → forecast_t republishes ≤ 5 s → sweep bumps last-booked-first / excused if booked_t > forecast_t → supervisor confirms only estimate EXTENSIONS → close with actuals (P5 variance). In parallel the flow-silence detector raises DowntimeSuspected on a silent line (page → escalate); only the human record deducts.เก็บ downtime → พยากรณ์ผูกพัน → sweep: operator ผู้รับผิดชอบบันทึกทันที (บันทึกก่อน) → forecast_t เผยแพร่ใหม่ ≤ 5 วินาที → sweep bump จองหลังก่อน/excused หาก booked_t > forecast_t → หัวหน้ากะยืนยันเฉพาะการยืดประมาณการ → ปิดด้วยค่าจริง (variance ตาม P5) ขนานกัน ตัวตรวจจับความเงียบของ flow ยก DowntimeSuspected บนสายที่เงียบ (แจ้ง → ยกระดับ); เฉพาะบันทึกของคนที่หักจริง
WF-63Season maintenance plan: author MillSeason frame → author windows + recurrence patterns → SINGLE-ACT publish (patterns expand, overlaps merge, late-change flag non-blocking) → whole-season fold into forecast_t + headroom-diff notification to the sugarcane department → day-open materialization as LineDowntime cause = planned → close extension = MillSeason edit.แผนซ่อมบำรุงประจำฤดู: เขียนกรอบ MillSeason → เขียนหน้าต่าง + จังหวะเกิดซ้ำ → เผยแพร่จังหวะเดียว (จังหวะกระจาย หน้าต่างซ้อน merge ธงเปลี่ยนช้าไม่กั้น) → รวมทั้งฤดูเข้า forecast_t + แจ้ง diff ที่ว่างไปฝ่ายไร่ → materialize ตอนเปิดวันเป็น LineDowntime cause = planned → การยืดวันปิด = การแก้ MillSeason

4. Guards enforced at my gates4. เงื่อนไขที่บังคับใช้ที่ประตูของฉัน

Q1 gate verdict amendments (v0.7.0)การแก้ไขตามคำวินิจฉัยด่าน Q1 (v0.7.0) The PROP-019 Q1 gate verdict packet (A-01…A-20 · A-29…A-50 + the A-38 addendum) is applied to the workflow contracts in the graph (canonical): WF-03 — walk-in-first admission (booth-created deliveries), slot-timed bookings with auto-cancel + booked_t release, station-bound hard tolerance, scale-link HALT (no manual entry); WF-04 — new step 6: T+3 reconciliation-window close locks CCS (measured → daily average → carried average → manual hard stop); WF-05 — full offset ordering key + A-13 rounding, partially_posted / waiting roll-forward, installment-2 blocked-by-predecessor, companion strategic legs via the parallel StrategicBatch; WF-10 — per-line capacity with the binding downtime forecast, LIFO bump (never returns), auto-freeze; WF-31/35 — overlap predicate cited to PROP-022; WF-32/33 — releases ride the StrategicBatch (A-47). Section 3 tables below render the pre-verdict contracts where not restated; the graph governs. ชุดคำวินิจฉัยด่าน Q1 ของ PROP-019 (A-01…A-20 · A-29…A-50 + ส่วนเพิ่มเติม A-38) ถูกนำเข้าสัญญา workflow ใน graph (ซึ่งเป็น canonical): WF-03 — รับ walk-in เป็นหลัก (สร้าง delivery ที่จุดแจ้งคิว), การจองมีช่วงเวลาพร้อมยกเลิกอัตโนมัติและคืน booked_t, ค่าเผื่อแข็งผูกสถานี, เครื่องชั่งล่ม = หยุดชั่ง (ไม่มีการกรอกด้วยมือ); WF-04 — ขั้นที่ 6 ใหม่: ปิดหน้าต่างกระทบ T+3 ล็อก CCS (ค่าวัด → ค่าเฉลี่ยรายวัน → ค่ายกจากวันก่อน → หยุดรอกรอกด้วยมือ); WF-05 — key ลำดับการหักครบชุด + การปัดเศษตาม A-13, partially_posted / waiting ยกไปรอบถัดไป, งวดที่ 2 ถูกหน่วงตามงวดก่อน, ขากลยุทธ์ไปกับ StrategicBatch คู่ขนาน; WF-10 — กำลังราย line พร้อมพยากรณ์ผูกพันจาก downtime, bump แบบจองหลังก่อน (ไม่คืน), freeze อัตโนมัติ; WF-31/35 — predicate ทับซ้อนอ้าง PROP-022; WF-32/33 — การปล่อยผ่าน StrategicBatch (A-47) ตาราง ข้อ 3 ด้านล่างยังแสดงสัญญาก่อนคำวินิจฉัยในจุดที่ไม่ได้เขียนใหม่; ให้ยึด graph

5. Exceptions that reach me5. กรณียกเว้นที่มาถึงฉัน

6. Timing / SLA table6. ตารางเวลา / SLA

ClockนาฬิกาBoundขอบเขตSourceที่มา
Two-installment scheduleตารางสองงวดInst 1 = next cycle after acceptance + note; inst 2 = first cycle ≥ +30 d; posted ON the cycle date, never afterงวด 1 = รอบถัดไปหลังตรวจรับ + ใบส่งมอบ; งวด 2 = รอบแรก ≥ +30 วัน; บันทึกตรงวันรอบ ไม่มีหลังกำหนดNFR-27 · FR-95
Weigh-in round-tripรอบเวลาชั่งเข้า< 1 s P95 (LAN)FR-05
Offline syncการ sync offline≤ 60 s after reconnectหลังกลับมาเชื่อมต่อNFR-01
Farmer-visible tonnageชาวไร่เห็นน้ำหนัก≤ 60 s after WeightRecordedหลัง WeightRecordedFR-97
CCS confirmationการยืนยัน CCS≤ 7 days after weigh-out (target)≤ 7 วันหลังชั่งออก (เป้า)FR-06
Auto-posting lagความหน่วงการลงอัตโนมัติ≤ 5 minFR-88
Period closeการปิดงวดบัญชี≤ 5 working days after period end≤ 5 วันทำการหลังสิ้นงวดFR-91
Final-price true-upสรุปราคาสุดท้ายBefore the next season's first crushing dayก่อนวันหีบแรกของฤดูถัดไปFR-99
Fuel headroomวงเงินน้ำมันReal-time on every surface; offset posts in the payout's own computation runreal time ทุก surface; หักกลบ post ในรอบคำนวณของเงินค่าอ้อยเองFR-119 · WF-46

7. The quota account — five workflows on the factory desk (PROP-085)7. โควตา — ห้า workflow บนโต๊ะโรงงาน (PROP-085)

Applied 2026-08-17 as spec v0.73.0. Nothing in the delivery, weighing, CCS or statutory-payment chain changes shape — a truck still arrives, is weighed, is dumped, gets a 4-ply note and is paid in two installments. What changes is which ACCOUNT each of those facts belongs to. Full step contracts are in the graph at workflows.nodes.

apply 2026-08-17 เป็น spec v0.73.0 ไม่มีอะไรในสายการส่งมอบ การชั่ง ค่าความหวาน หรือการจ่ายตามกฎหมายเปลี่ยนรูป รถยังเข้ามา ถูกชั่ง ถูกเท ได้ใบสี่ตอน และได้เงินสองงวด สิ่งที่เปลี่ยนคือข้อเท็จจริงแต่ละอย่างเป็นของบัญชีใด สัญญาขั้นตอนฉบับเต็มอยู่ในกราฟ

#WorkflowWorkflowContractข้อตกลง
WF-138Open a quota accountOpen a quota accountCane-office clerk creates the account against the factory’s own register — number as issued or blank with a reason, named holder in parts, address from the PROP-047 registries, kind — then attaches the dossier from the vault in declared roles and links the holder, or NEITHER (a stewarded account, no credit line until claimed). A duplicate number is refused naming the existing account. A holder tenant without the grower or quota capacity is PARKED pending, never rejected: the factory’s contract is a fact before our capacities are.เจ้าหน้าที่ฝ่ายไร่สร้างบัญชีตามทะเบียนของโรงงานเอง ใส่เลขตามที่ออกให้หรือเว้นพร้อมเหตุผล ชื่อผู้ถือเป็นส่วน ๆ ที่อยู่จากทะเบียน และชนิด แล้วแนบชุดเอกสารจากคลังตามบทบาท และผูกผู้ถือ หรือไม่ผูกเลย เลขซ้ำถูกปฏิเสธพร้อมระบุบัญชีเดิม tenant ที่ยังไม่มี capacity ถูกพักไว้ ไม่ถูกปฏิเสธ
WF-139Bind or change the payment destinationBind or change the payment destinationTwo acts, four eyes: a holder membership or a factory finance clerk proposes a destination with an effective_from ≥ today; a DIFFERENT membership holding the amount-bearing approve act activates it and the previous assignment is superseded, never deleted. The holder is notified on the money class with the last four digits and the effective date, whoever requested it. A cycle in flight is never re-routed. The failed-installment path finally has a record: a failure at WF-05 step 5 runs this workflow and the retry names the NEW assignment.สองการกระทำ สี่ตา ผู้เสนอคือ membership ของผู้ถือหรือเจ้าหน้าที่การเงินโรงงาน และผู้เปิดใช้งานต้องเป็นคนละคนที่ถือสิทธิอนุมัติแบบมีจำนวนเงินติดอยู่ รายการก่อนถูกทับ ไม่ถูกลบ แจ้งผู้ถือในชั้นเงินพร้อมเลขสี่ตัวท้ายและวันที่มีผล งวดที่กำลังดำเนินอยู่ไม่ถูกเปลี่ยนเส้นทาง
WF-140Bind accounts into a factory groupBind accounts into a factory groupThe group is created with a purpose, an effective date and netting = none; accounts join with dated membership and a cross-factory account is refused by the GUARD, not by review. Turning netting on is a separate second act requiring agreement_ref and a policy-role approval, announced to the holder BEFORE the first cycle it can affect. One netting group per account at a time; a group of different holders may share a view but never a recovery pool. Removing an account ends its period and re-rates nothing (netting is release v2).กลุ่มถูกสร้างพร้อมวัตถุประสงค์ วันที่มีผล และการหักกลบปิดไว้ บัญชีเข้าร่วมด้วยสมาชิกภาพที่มีวันที่ และบัญชีข้ามโรงงานถูกการ์ดปฏิเสธ การเปิดการหักกลบเป็นการกระทำที่สองแยกออกมา ต้องมีเลขอ้างอิงข้อตกลงและการอนุมัติเชิงนโยบาย และต้องแจ้งผู้ถือก่อนงวดแรกที่มีผล
WF-142Change holder, go dormant, close, renumberChange holder, go dormant, close, renumberA holder change is two-sided where both sides are on the platform and a factory act with a reason and evidence where they are not — inheritance being the common case; it closes the open period and opens the next, and nothing posted is re-attributed. Dormancy needs NO act: it is the absence of a season figure. Closure requires no open credit and no unposted installment and refuses naming the blocking figure. A renumber creates a successor and moves nothing — history stays where it was produced.การเปลี่ยนผู้ถือเป็นการกระทำสองฝ่ายเมื่อทั้งสองอยู่บนแพลตฟอร์ม และเป็นการกระทำของโรงงานพร้อมเหตุผลและหลักฐานเมื่อไม่อยู่ ปิดช่วงเดิมและเปิดช่วงใหม่ สิ่งที่ลงบัญชีแล้วไม่ถูกเปลี่ยนการอ้างถึง การพักไม่ต้องมีการกระทำ การปิดต้องไม่มีสินเชื่อค้าง และการออกเลขใหม่สร้างบัญชีที่ทับของเดิมโดยไม่ย้ายอะไร
WF-143Add, verify, rank and withdraw a banking detailAdd, verify, rank and withdraw a banking detailA detail is ADDED unverified and unpayable from the first second; VERIFICATION is a separate act by a different membership against evidence, recorded as an event with its method, date and author — never a flag flipped in place; RANKING binds it to an account through WF-139’s two acts, and a swap of ranks is two supersedes and two events; WITHDRAWAL needs a mandatory reason and the row stays readable forever; a withdrawn detail may be REINSTATED and its second life is a second run of events under the same payee_id — one history, not two records.รายละเอียดถูกเพิ่มโดยยังไม่ยืนยันและจ่ายไม่ได้ตั้งแต่วินาทีแรก การยืนยันเป็นการกระทำแยกโดยคนละ membership เทียบหลักฐาน บันทึกเป็นเหตุการณ์พร้อมวิธี วันที่ และผู้ทำ ไม่ใช่ธงที่ถูกกดในที่เดิม การจัดอันดับผูกกับบัญชีผ่านสองการกระทำของ WF-139 การถอนต้องมีเหตุผล และแถวยังอ่านได้ตลอดไป ส่วนการนำกลับเป็นชีวิตที่สองใต้ payee_id เดิม

Applied workflows that change wording or a guard, never mechanism: WF-02 allocates to an ACCOUNT and a sub-allocation names the account the tonnage will be delivered against · WF-03 step 2 types the factory’s quota ACCOUNT number, not a "quota farmer identification number" · WF-05 step 2 offsets per account then across a declared netting group, step 5 posts against the active PayeeAssignment and records it · WF-06 a factory line names its account · WF-70/WF-71 the station’s own quota number IS an account.workflow ที่ apply แล้วซึ่งเปลี่ยนถ้อยคำหรือการ์ด ไม่เปลี่ยนกลไก ได้แก่ WF-02 จัดสรรให้บัญชี · WF-03 ขั้น 2 พิมพ์เลขบัญชีของโรงงาน · WF-05 ขั้น 2 หักกลบรายบัญชีแล้วจึงข้ามกลุ่มที่ประกาศไว้ ขั้น 5 ลงบัญชีต่อการผูกที่ใช้งานอยู่ · WF-06 วงเงินของโรงงานระบุบัญชี · WF-70/WF-71 เลขโควตาของสถานีคือบัญชี

8. The strategic agreement — four workflows (PROP-090)8. ข้อตกลงค่าอ้อยกลยุทธ์ — สี่ workflow (PROP-090)

Applied 2026-08-17 as spec v0.74.0. Full step contracts are in the graph at workflows.nodes.

apply 2026-08-17 เป็น spec v0.74.0 สัญญาขั้นตอนฉบับเต็มอยู่ในกราฟ

#Contractข้อตกลง
WF-144Author an agreement over accounts. Terms as applied, then the scope — accounts by number, checkpoints, fields, dates, distance, or an axis left unrestricted. The screen states IN WORDS what the agreement will cover and shows last season’s tonnage under that scope as the size of the promise. The overlap predicate runs before the counterparty ever sees it and a conflict names the other agreement and its scope. shortfall_treatment is chosen (pro_rata preselected) and rendered on an example tonne; where overlap is enabled the resolver policy version in force is shown beside it. Both parties confirm the treatment explicitly and either confirmation missing blocks activation. Countersignature binds the agreement to the policy version shown. A scope that matches nothing is warned and not blocked — a factory may price a zone it hopes to win.เขียนข้อตกลงบนบัญชี เงื่อนไขตามที่ apply แล้ว จากนั้นเลือกขอบเขต หน้าจอบอกเป็นคำว่าจะครอบอะไร และแสดงปริมาณของฤดูก่อนใต้ขอบเขตนั้น predicate การซ้อนทำงานก่อนคู่สัญญาจะเห็น เลือก shortfall_treatment โดยตั้ง pro_rata ไว้ก่อน และแสดงบนอ้อยหนึ่งตันตัวอย่าง ทั้งสองฝ่ายยืนยันอย่างชัดแจ้ง ขาดฝ่ายใดฝ่ายหนึ่งจะไม่มีผล การลงนามตอบผูกข้อตกลงกับเวอร์ชันนโยบายที่แสดงไว้
WF-145The ground moves. A trigger arrives from outside the plane — a QuotaHolderPeriod closes, a suspension starts, a party serves notice. Accrual stops on the effective date, never retroactively, and an AgreementAssignment freezes the accrued tonnage and the withheld balance. Where an incoming holder countersigns, the agreement continues effective-forward from that signature and the frozen figures carry; for up to 30 days before he signs he is paid the normal statutory price and nothing accrues under the old terms. No signature by day 30 ends it. Suspension days are excluded from the volume clock unless the clause says otherwise — otherwise a payer manufactures the shortfall that forfeits the withheld half.พื้นใต้เท้าขยับ ตัวกระตุ้นมาจากนอกระนาบ การสะสมหยุดในวันที่มีผล ไม่ย้อนหลัง และ AgreementAssignment ตรึงปริมาณที่สะสมและยอดที่หักไว้ เมื่อผู้ถือใหม่ลงนามตอบ ข้อตกลงเดินต่อไปข้างหน้านับจากลายเซ็นนั้น ระหว่างที่ยังไม่ลงนาม ไม่เกิน 30 วัน เขาได้รับราคาตามกฎหมายปกติ ถ้าครบ 30 วันแล้วยังไม่ลงนาม ข้อตกลงสิ้นสุด และวันที่ถูกระงับไม่ถูกนับในนาฬิกาปริมาณ เว้นแต่ข้อสัญญาเขียนไว้เป็นอื่น
WF-146Season end. Every agreement with accruals presents its withheld position to BOTH parties with contracted vs delivered tonnes beside it. Volume met: the balance releases through the applied volume_fulfilled_balance path in the companion batch. Volume not met: the declared treatment runs — pro rata computes and releases, negotiated opens a two-sided settlement both sign, forfeit requires the named clause and the counterparty’s countersignature on the figure. One WithheldOutcome closes the position either way, and an unresolved position stays visible to both parties as owed until it is closed. Nothing is netted against a statutory instalment.สิ้นฤดู ทุกข้อตกลงที่มีการสะสมแสดงยอดที่หักไว้ต่อทั้งสองฝ่าย พร้อมปริมาณตามสัญญาเทียบที่ส่งจริง เมื่อส่งครบ ยอดถูกปล่อยผ่านเส้นทางที่ apply แล้วในชุดจ่ายคู่ขนาน เมื่อไม่ครบ ใช้วิธีที่ประกาศไว้ มี WithheldOutcome หนึ่งรายการปิดสถานะไม่ว่าทางใด และยอดที่ยังไม่ยุติปรากฏต่อทั้งสองฝ่ายว่าเป็นหนี้ ไม่มีการหักกลบกับงวดตามกฎหมาย
WF-147A parked agreement. After 45 days with zero accruals — counted from the first scheduled delivery date, scope_date_from or effective_from where that axis is null — the counterparty may serve notice, or may instead serve a competing_offer notice asserting an offer on the same scope, which the platform records and never verifies. Either starts a seven calendar day cure period visible to both parties with its end date on the notice. The mill answers inside it: justify with a stated reason shown to the counterparty, or agree a revised delivery date. No answer releases the scope, which writes ScopeReleased, ends the agreement and settles the withheld position. No automatic expiry, and no release without a served notice and an elapsed cure period.ข้อตกลงที่จอดทิ้งไว้ เมื่อครบ 45 วันโดยไม่มีการสะสม นับจากวันส่งมอบตามกำหนดวันแรก คู่สัญญาบอกกล่าวได้ หรือบอกกล่าวแบบ competing_offer ซึ่งแพลตฟอร์มบันทึกและไม่ตรวจสอบ ทั้งสองแบบเริ่มช่วงแก้ไข เจ็ดวันตามปฏิทิน ที่ทั้งสองฝ่ายเห็นพร้อมวันสิ้นสุดบนการบอกกล่าว โรงงานตอบภายในช่วงนั้น ถ้าไม่ตอบ ขอบเขตถูกปล่อย เขียน ScopeReleased ข้อตกลงสิ้นสุด และยอดที่หักไว้ถูกยุติ ไม่มีการหมดอายุอัตโนมัติ และไม่มีการปล่อยโดยไม่มีการบอกกล่าวและช่วงแก้ไขที่ผ่านไปแล้ว

Applied workflows that gain a clause, none in mechanism: WF-35 (renegotiation — the worklist now shows the withheld position beside the terms), WF-73 (plan publication — the affected-agreement list names accounts), WF-05 (settlement — unchanged; the companion batch reads the resolved assignment of PROP-085).workflow ที่ apply แล้วซึ่งเพิ่มข้อความ ไม่เปลี่ยนกลไก ได้แก่ WF-35 (การเจรจาใหม่ รายการงานแสดงยอดที่หักไว้ข้างเงื่อนไข) WF-73 (การเผยแพร่แผน รายชื่อข้อตกลงที่ได้รับผลระบุบัญชี) และ WF-05 (การจ่าย ไม่เปลี่ยน)

9. Related documents9. เอกสารที่เกี่ยวข้อง

PROP-030 applied (spec v0.21.0, 2026-07-23) — WF-70…72ปรับใช้ PROP-030 แล้ว (spec v0.21.0, 23 ก.ค. 2569) — WF-70…72 Three transfer-station workflows join the mill scope; full numbered step contracts live in the graph (workflows.nodes[].spec). Workflow สถานีขนถ่ายสามชุดเข้าร่วมขอบเขตโรงงาน; สัญญาขั้นตอนแบบมีหมายเลขฉบับเต็มอยู่ใน graph (workflows.nodes[].spec)
WFFlow (digest)Flow (สรุป)EventsEvent
WF-70Station intake (farmer side): weigh-in on the station's prefix range → crane load + CraneToken (mother/daughter) → exit weigh, token return, 4-ply StationBill print → mid-load full truck: cut & reopen (FR-176). Farmer settles on station weights.รับอ้อยที่สถานี (ฝั่งชาวไร่): ชั่งเข้าในช่วงเลข prefix ของสถานี → เครนโหลด + CraneToken (แม่/ลูก) → ชั่งออก คืน token พิมพ์ StationBill 4 สำเนา → รถเต็มกลางคัน: ตัดและเปิดใหม่ (FR-176) ชาวไร่ชำระตามตาชั่งสถานีCraneTokenIssued · CraneTokenReturned · StationBillCut
WF-71Station→mill delivery & haulage settlement: depart with the sub-note bundle [overweight → director approval, FR-178] → factory weigh-in under the station quota, bundle surrendered & reconciled → LossClaim only above the accepted-loss threshold × per-kg rate (FR-184) → HaulageSettlement = mill weigh-in × rate card − claim; farmer side settles separately through the mill payroll stack with the policies in force.ส่งเข้าโรงงานและชำระค่าขนถ่าย: ออกพร้อมชุดใบชั่งย่อย [น้ำหนักเกิน → อนุมัติ ผอ., FR-178] → ชั่งเข้าโรงงานใต้โควตาสถานี ยื่นและกระทบยอดชุดใบ → LossClaim เฉพาะส่วนเกินเกณฑ์ × อัตราต่อ กก. (FR-184) → HaulageSettlement = ชั่งเข้า × rate card − ค่าเรียก; ฝั่งชาวไร่ชำระแยกผ่าน payroll โรงงานตามนโยบายที่มีผลLossClaimRaised · HaulageSettled
WF-72Data custody (offline-first): record against pre-fetched reference data → scheduled sync (default 2 h) / ERP real-time / physical-media fallback → 24:00 cutoff, day close, reconcile (NFR-57).การนำส่งข้อมูล (offline-first): บันทึกจากข้อมูลอ้างอิงล่วงหน้า → sync ตามรอบ (ค่าเริ่มต้น 2 ชม.) / ERP real-time / fallback สื่อกายภาพ → ตัดปิดวัน 24.00 กระทบยอด (NFR-57)StationDaySynced

Checkpoint-terminal workflows — WF-74/WF-75 (PROP-043, spec v0.24.0, applied 2026-07-24)workflow เทอร์มินัล checkpoint — WF-74/WF-75 (PROP-043, spec v0.24.0 ปรับใช้ 24 ก.ค. 2569)

Two workflows land with the checkpoint terminal; the graph carries the full numbered step contracts (canonical). Governing rules: the app arms only inside the checkpoint's designated geofence (C-2a); the stamp is evidence, not money — accrual buckets at mill acceptance (PROP-044 OQ-23); zero strategic figures on any checkpoint screen or ticket (PROP-042); the terminal never tracks anyone — in-bound tracking is a per-trip opt-in on the driver's/farmer's own app, and refusing never gates payment or queueing (OQ-32).

สอง workflow มากับเทอร์มินัล checkpoint; graph ถือสัญญาขั้นตอนฉบับเต็ม (canonical) กฎหลัก: แอปเปิดใช้เฉพาะใน geofence ที่โรงงานกำหนด (C-2a); ตราคือหลักฐาน ไม่ใช่เงิน — accrual นับที่การรับ ณ โรงงาน (PROP-044 OQ-23); ไม่มีตัวเลขกลยุทธ์บนหน้าจอหรือตั๋วใด ๆ (PROP-042); เครื่องไม่ติดตามใคร — การติดตามขาเข้าเป็น opt-in ต่อเที่ยวบนแอปของคนขับ/ชาวไร่เอง การปฏิเสธไม่กระทบการจ่ายหรือคิว (OQ-32)

WFNameชื่อSubstanceสาระ
WF-74Checkpoint registrationการลงทะเบียนจุดตรวจArrive (armed lane) → resolve identity (QR / quota + plate; new Truck on the spot) → capture EV-1…EV-5 → commit (StampEvent; offline journal) → print the A-59 ticket → downstream reads (farmer app · ST-QB · ST-WB); ≤ 90 s per truckมาถึง (ช่องเปิดใช้) → resolve ตัวตน (QR / โควตา+ทะเบียน; สร้างรถทันที) → เก็บ EV-1…EV-5 → บันทึก (StampEvent; journal offline) → พิมพ์ตั๋ว A-59 → อ่านต่อปลายทาง (แอปชาวไร่ · ST-QB · ST-WB); ≤ 90 วินาทีต่อคัน
WF-75In-bound trip intelligenceintelligence เที่ยวขาเข้าPer-trip opt-in at registration → I-1 in-bound tonnage (strategic cost behind the NFR-21 wall) + I-2 ETA → I-3 advisory RouteAbandonSuspected → trace purged at delivery + weigh-out (no dispute window, OQ-32)opt-in ต่อเที่ยวตอนลงทะเบียน → I-1 ตันขาเข้า (ต้นทุนกลยุทธ์หลังกำแพง NFR-21) + I-2 เวลาถึง → I-3 RouteAbandonSuspected เชิงแนะนำ → ลบรอยพิกัดเมื่อส่งถึง + ชั่งออก (ไม่มีช่วงพิพาท, OQ-32)

10. Revision history10. ประวัติการแก้ไข

RevฉบับDateวันที่Changesการเปลี่ยนแปลง
1.02026-07-07Initial version — PROP-002 Proposal A (spec v3.0)ฉบับแรก — PROP-002 ข้อเสนอ A (spec (สเปก) v3.0)
1.12026-07-08PROP-005 (FED, spec v6.0): perspective re-keyed from customer group to capacity (document code unchanged); identity defers to the federation context (Person · Tenant · TenantCapacity · Membership); every *_tenant_type + *_tenant_id pair collapses to tenant_id.PROP-005 (FED, spec v6.0): มุมมองเปลี่ยนคีย์จากกลุ่มลูกค้าเป็น capacity (รหัสเอกสารคงเดิม); อัตลักษณ์อ้างอิงบริบท federation (Person · Tenant · TenantCapacity · Membership); คู่ *_tenant_type + *_tenant_id ทั้งหมดยุบเป็น tenant_id
1.22026-07-09PROP-009 (STR, spec v8.0): the mill drives WF-31…33, 35 — strategic-agreement setup, stamp→accrue→step release, fulfilment balance and renegotiation; confidential ค่าอ้อยกลยุทธ์ on top of the statutory price, never a PaymentItem component (NFR-21).PROP-009 (STR, spec v8.0): โรงงานขับเคลื่อน WF-31…33, 35 — ตั้งข้อตกลงกลยุทธ์ ประทับตรา→สะสม→จ่ายเป็นงวด ส่วนครบปริมาณ และการเจรจาใหม่; ค่าอ้อยกลยุทธ์เป็นความลับจ่ายเพิ่มจากราคาตามกฎหมาย ไม่เป็นส่วนของ PaymentItem (NFR-21)
1.32026-07-09PROP-010 (GL, spec v9.0): the mill runs WF-36…41 — books onboarding, auto-posting, AR/AP, bank reconciliation, period close & statements, statement sharing; balanced/idempotent/source-attributed postings (NFR-24), frozen statements & gated period reopen (NFR-25), PROP-009 postings excluded from a government share (FR-94, NFR-26).PROP-010 (GL, spec v9.0): โรงงานดำเนิน WF-36…41 — เริ่มใช้ books ลงอัตโนมัติ AR/AP กระทบยอดธนาคาร ปิดงวดและงบ แบ่งงบ; ลงดุล/idempotent/ระบุที่มา (NFR-24) งบตรึงและเปิดงวดมีสิทธิ์ (NFR-25) กลยุทธ์ PROP-009 ไม่เข้างบรัฐ (FR-94, NFR-26)
1.42026-07-10PROP-012 (settlement & CCS-by-re-note correction, spec v10.0): WF-04 re-grounded to government re-note ingestion & auto-match on the %N-### tag (no on-site lab, no "same day"); the delivery machine adds part_settled and the two statutory installments; WF-05 posts two installments per cycle with a season-end final-price true-up.PROP-012 (แก้การจ่ายเงินและ CCS จากรีโน้ต, spec v10.0): WF-04 อิงการนำเข้ารีโน้ตของรัฐและจับคู่ด้วยแท็ก %N-### (ไม่มีแล็บในโรงงาน); state machine เพิ่ม part_settled และสองงวดตามกฎหมาย; WF-05 จ่ายสองงวดต่อรอบ พร้อมสรุปราคาสุดท้ายปลายฤดู
0.1.02026-07-11PROP-014 (spec v0.1.0): semantic versioning restarted at 0.1.0 (was Rev 1.4 · 2026-07-10); docnav updated for the gov_cluster split — GOV re-homed to docs/gov/ocsb/, new BOARD (กอน.) sibling added.PROP-014 (spec v0.1.0): รีสตาร์ท semantic versioning ที่ 0.1.0 (เดิม Rev 1.4 · 2026-07-10); ปรับ docnav ตามการแยก gov_cluster — ย้าย GOV ไป docs/gov/ocsb/ เพิ่มพี่น้อง BOARD (กอน.)
0.1.12026-07-12PROP-016 (spec v0.2.1): mill admission presented as invitation-only — the mill onboarding begins at the operator-issued Invitation (WF-28). Editorial/presentation correction; no model change (mill.admission was already invitation since PROP-006).PROP-016 (spec v0.2.1): นำเสนอการรับเข้าโรงงานเป็นเข้าโดยการเชิญ — การเริ่มใช้ของโรงงานเริ่มที่ Invitation ที่ operator ออก (WF-28) แก้เชิงบรรณาธิการ/การนำเสนอ ไม่แก้โมเดล (mill.admission เป็น invitation ตั้งแต่ PROP-006)
0.1.22026-07-13PROP-012 conformance (spec v0.4.1, patch): Thai purpose line re-grounded to re-note intake (the English line was already correct).ปรับตาม PROP-012 (spec v0.4.1, patch): แก้บรรทัดวัตถุประสงค์ภาษาไทยเป็นการนำเข้า re-note (บรรทัดอังกฤษถูกอยู่แล้ว)
0.2.02026-07-13PROP-019 Q1 (spec v0.5.0): zero-assumption workflow contracts — new Section 3 renders numbered step tables (actor · surface · action · pre · post · guards · events · failure branch) for all 14 mill workflows from the graph's new workflows.nodes[].spec, each closed by SLA + state pinning; new Section 6 aggregates the timing/SLA clocks. Prior Sections 3–6 renumbered 4/5/7/8.PROP-019 ระยะ Q1 (spec v0.5.0): สัญญา workflow แบบไร้ข้อสมมติ — ข้อ 3 ใหม่ render ตารางขั้นตอนมีหมายเลข (ผู้กระทำ · ช่องทาง · การกระทำ · ก่อน · หลัง · guard · event · กิ่งความล้มเหลว) ของ workflow โรงงานทั้ง 14 จาก workflows.nodes[].spec ใหม่ใน graph ปิดท้ายด้วย SLA + การตรึง state; ข้อ 6 ใหม่รวมนาฬิกาเวลา/SLA ข้อ 3–6 เดิมเปลี่ยนเลขเป็น 4/5/7/8
0.2.12026-07-16PROP-029 (spec v0.6.0): WF-01 step 4 re-grounded — tokens (เหรียญ) collected at exit weigh, the statutory 4-ply delivery note (แบบ อ. 1) prints on the impact printer (A-36); the stale 80 mm thermal wording and reprint-later failure branch are retired (spoiled sets re-run whole; lost plies re-issue at the mill cane office marked COPY).PROP-029 (spec v0.6.0): ปรับขั้นตอนที่ 4 ของ WF-01 — รับเหรียญคืนตอนชั่งออก พิมพ์ใบรับอ้อย 4 สำเนาตามกฎหมาย (แบบ อ. 1) ด้วยเครื่องพิมพ์ impact (A-36); เลิกข้อความพิมพ์ความร้อน 80 มม. และกิ่งพิมพ์ซ้ำภายหลัง (ชุดเสียพิมพ์ใหม่ทั้งชุด; สำเนาหายขอใบแทนที่สำนักงานอ้อย ประทับ COPY)
0.3.02026-07-16PROP-019 Q1 gate amendment pass (spec v0.7.0): verdict packet A-01…A-50 applied — WF-03/04/05/10/31…33/35 contracts amended in the graph (walk-in first, T+3 CCS window, offset ordering + rounding, partial/blocked settlement states, per-line capacity forecast, StrategicBatch); Section 5 exceptions corrected (A-04 two checks, A-35 on-site tier, A-12 production-only mill lab); manual weight entry deleted (A-10/NFR-33).รอบแก้ไขด่าน Q1 ของ PROP-019 (spec v0.7.0): นำชุดคำวินิจฉัย A-01…A-50 เข้าสัญญา WF-03/04/05/10/31…33/35 ใน graph (walk-in เป็นหลัก, หน้าต่าง CCS T+3, ลำดับการหัก + การปัดเศษ, สถานะจ่ายบางส่วน/ถูกหน่วง, พยากรณ์กำลังราย line, StrategicBatch); แก้ข้อยกเว้นข้อ 5 (A-04 ตรวจสองอย่าง, A-35 ชั้นติดตั้งในโรงงาน, A-12 แล็บโรงงานเพื่อการผลิต); ลบการกรอกน้ำหนักด้วยมือ (A-10/NFR-33)
0.3.12026-07-16PROP-031 accepted (spec v0.8.0): the WF-03 scale-link HALT is now fully defined — ScaleLinkLost → wb.blocked.scale_link per bridge (queue stops calling, mid-cycle trucks finish on any working bridge), automatic recovery after two agreeing stable frames; readings commit only from a registered ScaleHead, stable-only, certificate current. The weighing seat is the ST-WB station app (.NET MAUI, factory/standalone modes).รับ PROP-031 (spec v0.8.0): การหยุดชั่งเมื่อสายหลุดใน WF-03 นิยามครบ — ScaleLinkLost → wb.blocked.scale_link รายแท่น (คิวหยุดเรียก รถกลางรอบจบที่แท่นใดก็ได้) กู้คืนอัตโนมัติหลัง frame นิ่งตรงกันสองครั้ง; commit ค่าอ่านเฉพาะจาก ScaleHead ลงทะเบียน ค่านิ่ง ใบรับรองไม่ขาดอายุ ที่นั่งชั่งคือแอปสถานี ST-WB (.NET MAUI โหมดโรงงาน/standalone)
0.4.02026-07-17PROP-027 accepted (spec v0.10.0): +WF-45 (fuel redemption at the pump) and +WF-46 (offset posting) step contracts, scope-table row, and the fuel-headroom SLA line.รับ PROP-027 (spec v0.10.0): เพิ่มสัญญาขั้นตอน WF-45 (ใช้สิทธิน้ำมันที่ปั๊ม) และ WF-46 (post หักกลบ), แถวตารางขอบเขต และบรรทัด SLA วงเงินน้ำมัน
0.5.02026-07-17PROP-020 + PROP-024 accepted as ONE queue train (spec v0.12.0, 2026-07-17): Section 3 gains the WF-47…53 queue-train digest (walk-in intake, remote join, console ops, blended intake, slot booking & arrival resolution, reliability recompute, slot administration) + the queue-ticket state machine summary; WF-03 step 1 and WF-10 drawdown amended onto TimeSlot; full step contracts live in the graph.รับ PROP-020 + PROP-024 เป็นขบวนคิวเดียว (spec v0.12.0, 17 ก.ค. 2569): ข้อ 3 เพิ่มสรุป WF-47…53 ของขบวนคิว + สรุป state machine บัตรคิว; แก้ WF-03 ขั้น 1 และการหักของ WF-10 เป็น TimeSlot; สัญญาขั้นตอนฉบับเต็มอยู่ใน graph
0.6.02026-07-19PROP-021 + PROP-028 applied as ONE train (spec v0.13.0): Section 3 gains the WF-54…58 on-site-tier digest (station intake chain, gateway sync & offline, auto-match, coin void-and-reissue, onboarding/commissioning); graph step contracts canonical. Draft ids renumbered (PROP-021 WF-49…53 → WF-54…58).ปรับใช้ PROP-021 + PROP-028 เป็นขบวนเดียว (spec v0.13.0): ข้อ 3 เพิ่มสรุป WF-54…58 ของชั้นติดตั้งในโรงงาน (สายโซ่สถานี, sync/offline ของ gateway, จับคู่อัตโนมัติ, ยกเลิก-จ่ายใหม่เหรียญ, การเปิดใช้/ติดตั้ง); สัญญาขั้นตอนใน graph เป็น canonical เลขร่างถูกจัดใหม่ (WF-49…53 → WF-54…58)
0.7.02026-07-19PROP-022 applied (spec v0.14.0): Section 3 gains the WF-59…61 strategic-planning digest (author & publish with executive review; calc-basis resolution amending WF-32 step 3 with the per-agreement retro flag; cost/forecast refresh + alerting); graph step contracts canonical. Draft ids renumbered (WF-54…56 → WF-59…61); WF-54's pending-lifecycle wording deferred to PROP-044.ปรับใช้ PROP-022 (spec v0.14.0): ข้อ 3 เพิ่มสรุป WF-59…61 การวางแผนกลยุทธ์ (เขียนและ publish พร้อมทบทวนผู้บริหาร; resolve calc basis แก้ WF-32 ขั้น 3 พร้อม flag retro รายข้อตกลง; refresh ต้นทุน/พยากรณ์ + การเตือน); สัญญาขั้นตอนใน graph เป็น canonical เลขร่างถูกจัดใหม่ (WF-54…56 → WF-59…61); ถ้อยคำ pending ของ WF-54 เลื่อนไป PROP-044
0.8.02026-07-20PROP-032 accepted (spec v0.15.0): the mill drives WF-62 (downtime capture → binding forecast → sweep, with flow-silence detection) and WF-63 (season maintenance plan: single-act publish, whole-season fold, day-open materialization). New Section 3 digest; SLA — forecast recompute ≤ 5 s (NFR-50).รับ PROP-032 (spec v0.15.0): โรงงานขับเคลื่อน WF-62 (เก็บ downtime → พยากรณ์ผูกพัน → sweep พร้อมตรวจจับความเงียบของ flow) และ WF-63 (แผนซ่อมบำรุงประจำฤดู: เผยแพร่จังหวะเดียว รวมทั้งฤดู materialize ตอนเปิดวัน) เพิ่มสรุปข้อ 3; SLA — recompute พยากรณ์ ≤ 5 วินาที (NFR-50)
0.9.02026-07-22PROP-023 applied (spec v0.16.0): +WF-64 period lock & reopen contract (two-act lock, auto-lock timer, grower auto-lock only, season force-lock, statement-voiding reopen); WF-37 amended to resolve books.postingMap with the unmapped-fail guard, black-reversal corrections and the balancing check; Section 2 gains the WF-64 row.PROP-023 ปรับใช้ (spec v0.16.0): +สัญญา WF-64 lock/reopen งวด (lock สอง act, timer อัตโนมัติ, ชาวไร่ auto-lock เท่านั้น, ปิดฤดูบังคับ lock, reopen ทำงบเป็นโมฆะ); แก้ WF-37 ให้ resolve books.postingMap พร้อม guard เมื่อไม่มีแถว, การแก้ไขแบบ black reversal และการตรวจสมดุล; ข้อ 2 ได้แถว WF-64
0.10.02026-07-23PROP-025 applied (spec v0.20.0): +WF-66 row in Section 2 — the factory-local two-act duplicate truck merge (clerk composes with blast-radius preview + mandatory reason; A-17 policy-role approval; atomic execution with merged_into_truck_id lineage; surviving row re-enters the PLT matching pipeline fire-and-forget). The pipeline workflows WF-67…69 are PLT-owned — see SPEC-PWF-PLT.ปรับใช้ PROP-025 (spec v0.20.0): +แถว WF-66 ในข้อ 2 — การผสานทะเบียนรถซ้ำสองจังหวะภายในโรงงาน (เสมียนเรียบเรียงพร้อม preview ผลกระทบ + เหตุผลบังคับ; อนุมัติตามบทบาท policy A-17; ดำเนินการ atomic พร้อมร่องรอย merged_into_truck_id; แถวที่คงอยู่เข้า pipeline จับคู่ของ PLT แบบ fire-and-forget) ส่วน workflow ของ pipeline WF-67…69 เป็นของ PLT — ดู SPEC-PWF-PLT
0.11.02026-07-23PROP-030 applied (spec v0.21.0): +WF-70 station intake · +WF-71 station→mill delivery & haulage settlement · +WF-72 offline-first data custody; digest table added, full step contracts in the graph.ปรับใช้ PROP-030 (spec v0.21.0): เพิ่ม WF-70 รับอ้อยที่สถานี · WF-71 ส่งเข้าโรงงานและชำระค่าขนถ่าย · WF-72 นำส่งข้อมูล offline-first; เพิ่มตารางสรุป สัญญาขั้นตอนเต็มอยู่ใน graph
0.12.02026-07-23PROP-045 applied (spec v0.22.0): WF-31/WF-35 overlap guards re-grounded to the shared resolver (FR-185) — predicate defined, per-mill enablement, lowest-cost resolution, forward-only mutation; publish-time supersede noted (FR-186).ปรับใช้ PROP-045 (spec v0.22.0): guard การทับซ้อนของ WF-31/WF-35 อิง resolver ร่วม (FR-185) — นิยาม predicate, เปิดใช้รายโรงงาน, ต้นทุนต่ำสุดชนะ, mutation มีผลไปข้างหน้า; supersede ตอน publish (FR-186)
0.13.02026-07-23PROP-044 applied (spec v0.23.0): +WF-73 adjust-a-live-plan contract (fork-from-live · pending version, one at a time, cancel-and-replace · all-or-nothing activation · acceptance-time boundary bucketing, no cross-boundary retro re-rate · renegotiation-worklist propagation); WF-59 step 4 re-worded — publish creates the version PENDING.ปรับใช้ PROP-044 (spec v0.23.0): +สัญญา WF-73 การปรับแผนที่ live (fork จาก live · เวอร์ชัน pending ทีละหนึ่ง ยกเลิกแล้วแทนที่ · activate ทั้งหมดหรือไม่เลย · จัดตามการรับมอบ ไม่ re-rate ข้ามขอบ · ส่งผลต่อผ่าน worklist เจรจา); แก้ถ้อยคำขั้น 4 ของ WF-59 — publish สร้างเวอร์ชันสถานะ PENDING
0.14.02026-07-24PROP-043 approved & applied (spec v0.24.0): +WF-74 checkpoint-registration contract (armed lane → identity → EV-1…EV-5 → commit → A-59 ticket → downstream reads) and +WF-75 in-bound trip intelligence (per-trip opt-in · I-1/I-2 readings · advisory I-3 · purge at weigh-out); digest added; step contracts canonical in the graph.PROP-043 อนุมัติและปรับใช้ (spec v0.24.0): +WF-74 สัญญาการลงทะเบียนจุดตรวจ และ +WF-75 intelligence เที่ยวขาเข้า; เพิ่มสรุป; สัญญาขั้นตอนเป็น canonical ใน graph
0.15.02026-07-28PROP-060 applied — spec v0.32.0. WF-48 (remote join & call-forward, QL-1) is RETIRED — a yard is several physical parked lines released a whole line at a time, so a position cannot be held without the truck; pre-registration inside WF-47 is what survives. WF-50…53 carry release: v2.apply PROP-060 — spec v0.32.0 ยกเลิก WF-48 (เข้าคิวระยะไกล QL-1); เหลือการกรอกข้อมูลล่วงหน้าใน WF-47 และ WF-50…53 มีป้าย release: v2
0.16.02026-07-29PROP-061 applied — spec v0.33.0. WF-47 binds the LINE at issuance (lane + open instance + in-lane position; per-gate per-lane offline ranges) and publishes the pair plus the two-number estimate; WF-49 gains release a line (recorded and published as it happens, never promised before the day) and record a lane change (pending until the truck’s current line is called in, then joining the new line’s tail). Graph step contracts canonical.apply PROP-061 — spec v0.33.0 WF-47 ผูกแถวตอนออกบัตร (แถว + แถวที่เปิดจริง + ลำดับในแถว; ช่วงเลขออฟไลน์รายป้อมรายแถว) และประกาศคู่เลขพร้อมตัวเลขสองตัวของการประมาณ; WF-49 เพิ่ม ปล่อยแถว (บันทึกและประกาศตามที่เกิดขึ้น ไม่สัญญาก่อนเริ่มวัน) และ บันทึกการเปลี่ยนแถว (รอผลจนแถวปัจจุบันถูกเรียกเข้า แล้วต่อท้ายแถวใหม่) สัญญาขั้นตอนใน graph เป็น canonical
0.17.02026-07-29PROP-063 applied — spec v0.34.0. WF-49's release step gains the express preconditions — a published reason category, room under the published daily ceiling, and the shift-level grant permission held separately from the ceiling-publishing permission (D-6) — with reason, actor and count written in the same commit as the release. Two events join gate_queue: ExpressGranted and ExpressFlagged (both release: v2). PROP-034 abandoned in the same change set: no priority-class step exists anywhere in the mill workflows.apply PROP-063 — spec v0.34.0 ขั้นการปล่อยของ WF-49 เพิ่มเงื่อนไขแถวด่วน และเพิ่ม event ExpressGranted · ExpressFlagged (release: v2) พร้อมยกเลิก PROP-034
0.18.02026-08-03PROP-073 (spec v0.47.0): one word — Tenant. Party → Tenant, party_id (and every prefixed form) → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, party context/switcher → tenant context/switcher, cross-party → cross-tenant, organisation → organization, and ผู้เล่น retired as the Thai gloss (the Latin word tenant instead, R-THAI). Hold list untouched: counterparty · third party · tripartite working group · Person*/person_id; display codes and token claims were held by R-NULL for one release and then MOVED at v0.47.1 on client decision (C-1), because no token has ever been SIGNED — no auth exists in the built ocsb/ocsf prototypes — and the only printed codes were eight fixture strings in apps/ocsf/fund-shell.jsx, swept in the same pass: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep. Carried in the same pass: the PROP-075 rectification — the retired directory noun domain becomes department (A-82 R-ONETREE) and the dangling A-86/A-87/A-88 citations are re-pointed at the ids they were actually given, A-81/A-82/A-83.PROP-073 (spec v0.47.0): คำเดียว — Tenant Party → Tenant, party_id ทุกรูป → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, cross-party → cross-tenant และเลิกใช้ ผู้เล่น เป็นคำแทนวัตถุนี้ในภาษาไทย (ใช้คำละติน tenant ตาม R-THAI) รายการห้ามแตะไม่ถูกแตะ: คู่สัญญา · third party · คณะทำงานไตรภาคี · Person*/person_id รอบเดียวกันแก้ค้างจาก PROP-075: domain → department (A-82) และแก้การอ้าง A-86/A-87/A-88 ที่ไม่มีอยู่จริงเป็น A-81/A-82/A-83
0.18.12026-08-03PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 as applicable): the identifiers v0.47.0 had held, moved on client decision. PTY-######## → TNT-######## · PCA-######## → TCA-######## · PQL-######## → TQL-######## · token claim pty → tnt · token claim dom → dep (v0.47.1, C-1 — R-NULL had held them as a stored VALUE and a wire format; reversed because no token has ever been signed and the only printed codes were fixture strings). quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2 — org is organization abbreviated, not a resemblance). The retired role LABEL swept as a phrase family and quota organization naming the tenant → quota group / กลุ่มโควตา (v0.47.3). All retired forms are in the FR-396 crosswalk and refused in new text by NFR-142.PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 ตามที่เกี่ยวข้อง): ตัวระบุที่ v0.47.0 คงไว้ ถูกย้ายตามการตัดสินของลูกค้า PTY- → TNT- · PCA- → TCA- · PQL- → TQL- · claim pty → tnt · claim dom → dep (v0.47.1, C-1) · quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2) · ป้ายชื่อบทบาทที่เลิกใช้และ องค์กรโควตา ที่เรียก tenant → กลุ่มโควตา (v0.47.3) ทุกรูปที่เลิกใช้อยู่ในตารางแปลง FR-396
0.19.02026-08-17The quota account — spec v0.73.0 (PROP-085 approved & applied 17 Aug 2026). Five new workflows on this desk (WF-138 · WF-139 · WF-140 · WF-142 · WF-143) and five applied ones amended in wording or a guard (WF-02 · WF-03 · WF-05 · WF-06 · WF-70/WF-71). New Section 7.โควตา — spec v0.73.0 (PROP-085 อนุมัติและ apply 17 ส.ค. 2569) workflow ใหม่ห้าชุดบนโต๊ะนี้ (WF-138 · WF-139 · WF-140 · WF-142 · WF-143) และที่ apply แล้วห้าชุดซึ่งเปลี่ยนถ้อยคำหรือการ์ด (WF-02 · WF-03 · WF-05 · WF-06 · WF-70/WF-71) เพิ่มข้อ 7
0.20.02026-08-17The strategic agreement — spec v0.74.0 (PROP-090 approved & applied 17 Aug 2026). Four workflows (WF-144 author over accounts · WF-145 the ground moves · WF-146 season end · WF-147 a parked agreement) and three applied ones gaining a clause (WF-35 · WF-73 · WF-05). New Section 8.ข้อตกลงค่าอ้อยกลยุทธ์ — spec v0.74.0 (PROP-090 อนุมัติและ apply 17 ส.ค. 2569) เพิ่ม workflow สี่ชุด (WF-144 · WF-145 · WF-146 · WF-147) และที่ apply แล้วสามชุดซึ่งเพิ่มข้อความ (WF-35 · WF-73 · WF-05) เพิ่มข้อ 8
0.21.02026-08-20The NFC reusable queue coin — spec v0.80.0 (PROP-033 approved & applied 20 Aug 2026). Three workflows join Section 2: WF-149 the four-checkpoint coin journey (one coin, an ASSIGNING coin tower, the observed route authoritative for the %N-### tag, and the weigh-out saga with pool release last), WF-150 degraded mode in three levels with the on-duty Operations Shift Supervisor as the only authorizer and money waiting for reconciliation, and WF-151 central enrolment, permanent marking and tag replacement with the key regime retired alongside the coin. WF-57 (coin circulation and void-and-reissue) is unchanged and now reads beside them.เหรียญคิว NFC ใช้ซ้ำได้ — spec v0.80.0 (PROP-033 อนุมัติและ apply 20 ส.ค. 2569) เพิ่ม workflow สามชุดในข้อ 2: WF-149 การเดินทางของเหรียญสี่จุดตรวจ (เหรียญอันเดียว หอเหรียญที่กำหนดช่องเท เส้นทางที่สังเกตได้มีอำนาจสำหรับแท็ก %N-### และ saga ตอนชั่งออกที่ปลดเข้า pool เป็นขั้นสุดท้าย), WF-150 โหมดเสื่อมสามระดับ โดยมีหัวหน้ากะปฏิบัติการที่อยู่เวรเป็นผู้อนุญาตเพียงผู้เดียว และเงินรอการกระทบยอด, และ WF-151 การลงทะเบียน ทำเครื่องหมายถาวร และเปลี่ยนแท็กที่ศูนย์กลาง พร้อมปลดกุญแจไปกับเหรียญ WF-57 คงเดิมและอ่านคู่กันได้