PROP-009 Rev 1.0 · ACCEPTED · 09 Jul 2026

Cane Agency · Change Proposal (ACCEPTED — applied graph-first in spec v8.0)สถาบันอ้อย · ข้อเสนอการเปลี่ยนแปลง (อนุมัติแล้ว — นำเข้า graph ก่อนใน spec v8.0)

Strategic Cane Payment — the confidential premium a mill pays on top of the statutory price, and the checkpoint & volume-contract terms behind itค่าอ้อยกลยุทธ์ — เงินเพิ่มลับที่โรงงานจ่ายบนราคาตามกฎหมาย พร้อมเงื่อนไขจุดประทับตราและสัญญาปริมาณเบื้องหลัง

Documentเอกสาร
PROP-009
Statusสถานะ
ACCEPTED — applied in spec v8.0อนุมัติแล้ว — นำเข้า spec v8.0
Feature tagfeature tag
STR
Updatedปรับปรุงล่าสุด
09 Jul 2026
Depends onขึ้นกับ
PROP-005 (FED) party/capacity model; the settlement, regulation & books contextsโมเดล party/capacity ของ PROP-005 (FED); บริบท settlement regulation และ books
Precedesนำหน้า
PROP-010 — general ledger & financial system (its consumer)PROP-010 — บัญชีแยกประเภทและระบบการเงิน (ผู้บริโภคของมัน)
Affectsกระทบ
Graph, APP, PRD, ERD, DDD, PWF, UIX, SPEC-INDEXgraph (กราฟ), APP, PRD, ERD, DDD, PWF, UIX, SPEC-INDEX
New contextบริบทใหม่
strategic_pricing (the confidential premium plane — walled off from regulation)(ระนาบเงินเพิ่มที่เป็นความลับ — กั้นจากบริบท regulation)
New entitiesEntity ใหม่
StampCheckpoint · CheckpointRate · StampEvent · StrategicAgreement · PremiumAccrual · PremiumRelease · OnwardPremiumSettlement
No new surface / capacityไม่มีช่องทาง / capacity ใหม่
Feature inside the existing mill · grower · quota capacitiesฟีเจอร์ภายใน capacity mill · grower · quota เดิม

1. Summary1. สรุปข้อเสนอ

Statusสถานะ This is a draft. Nothing here is binding until accepted and mirrored graph-first into the spec series (see drafts/CLAUDE.md). It adds strategic cane payment (ค่าอ้อยกลยุทธ์) — a non-statutory, confidential premium a sugar mill pays a grower or quota farmer on top of the สอน. cane price and its CCS increment, expressed in baht per tonne extra. It is not regulated by law and must stay confidential to the mill and its counterparty. PROP-009 models the two market conditions under which it is paid — the checkpoint route (จุดประทับตรา, long-haul trucks stamped into the factory system, per-checkpoint and per-farmer rates by volume) and the fixed-price volume contract (เหมาจ่าย, a per-farmer flat ฿/t with two government-benefit variants) — the step release schedule (25 / 50 / 75% upfront per delivery, balance on contract-volume fulfilment), the quota→cane-farmer onward relay (cash on the factory delivery receipt), and a hard confidentiality wall keeping all of it out of the regulator's view. Feature tag STR. นี่คือร่าง ยังไม่มีผลผูกพันจนกว่าจะได้รับอนุมัติและสะท้อนแบบ graph ก่อนเข้าชุด spec (สเปก) (ดู drafts/CLAUDE.md) ข้อเสนอนี้เพิ่มค่าอ้อยกลยุทธ์ — เงินเพิ่มนอกกฎหมายและเป็นความลับที่โรงงานน้ำตาลจ่ายให้ชาวไร่หรือหัวหน้าโควต้าเพิ่มจากราคาอ้อยของ สอน. และส่วนเพิ่มตามค่า CCS โดยคิดเป็นบาทต่อตันที่เพิ่มขึ้น เงินนี้ไม่มีกฎหมายกำกับและต้องเก็บเป็นความลับระหว่างโรงงานกับคู่สัญญา PROP-009 สร้างแบบจำลองของสองเงื่อนไขที่ตลาดใช้จ่ายเงินนี้ — เส้นทางจุดประทับตรา (รถทางไกลลงทะเบียนเข้าระบบโรงงาน อัตราต่างกันตามจุดและตามชาวไร่/ปริมาณ) และสัญญาปริมาณแบบเหมาจ่าย (฿/ตัน คงที่รายชาวไร่ พร้อมสองรูปแบบเรื่องเงินช่วยเหลือรัฐ) — พร้อมตารางจ่ายเป็นงวด (จ่ายล่วงหน้า 25 / 50 / 75% ต่อการส่งมอบ ส่วนที่เหลือเมื่อครบปริมาณสัญญา) การส่งต่อสู่ลูกไร่ของหัวหน้าโควต้า (จ่ายสดตามใบส่งมอบของโรงงาน) และกำแพงความลับที่กันทั้งหมดนี้ออกจากสายตาผู้กำกับ feature tag STR

The trigger is a real commercial practice. A grower far from the mill costs more to reach and is easier for a competitor to poach; a mill that wants that cane secures it by paying more than the regulated price — quietly, farmer by farmer. That extra is ค่าอ้อยกลยุทธ์: "strategic" because it is a competitive weapon, not an entitlement. The platform already models the statutory price perfectly (CanePriceAnnouncement, the 70:30 RevenueAccount, the CCS increment, PaymentItem). What it does not model is the layer on top — the one the market actually competes on. PROP-009 adds that layer as its own confidential plane, deliberately kept separate from the statutory settlement so it can never leak into a regulator report.

แรงผลักคือธรรมเนียมการค้าจริง ชาวไร่ที่อยู่ไกลโรงงานมีต้นทุนขนส่งสูงกว่าและคู่แข่งดึงไปได้ง่ายกว่า โรงงานที่ต้องการอ้อยรายนั้นจึงยึดไว้ด้วยการจ่ายสูงกว่าราคาที่กฎหมายกำหนด — อย่างเงียบ ๆ เป็นรายชาวไร่ เงินส่วนเกินนั้นคือค่าอ้อยกลยุทธ์: "กลยุทธ์" เพราะเป็นอาวุธในการแข่งขัน ไม่ใช่สิทธิ์ตามกฎหมาย platform สร้างแบบจำลองราคาตามกฎหมายไว้ครบแล้ว (CanePriceAnnouncement, RevenueAccount ระบบ 70:30, ส่วนเพิ่ม CCS, PaymentItem) สิ่งที่ยังไม่มีคือชั้นที่อยู่ด้านบน — ชั้นที่ตลาดใช้แข่งขันกันจริง PROP-009 เพิ่มชั้นนั้นเป็นระนาบความลับของตัวเอง แยกจาก settlement ตามกฎหมายโดยเจตนา เพื่อไม่ให้รั่วเข้าสู่รายงานของผู้กำกับได้เลย

Principleหลักการ The statutory price is public and audited; the strategic premium is private and never leaves the two parties who agreed it. The platform records both with equal rigour — every accrual and payout append-only and reconcilable — but they live in different rooms. The regulator sees the statutory settlement in full and the strategic plane not at all; another private party sees a strategic term only through an explicit, revocable consent. Confidentiality here is not a feature toggle, it is the schema. ราคาตามกฎหมายเป็นสาธารณะและถูกตรวจสอบ; เงินเพิ่มกลยุทธ์เป็นความลับและไม่เคยออกไปพ้นสองฝ่ายที่ตกลงกัน platform บันทึกทั้งสองอย่างเข้มงวดเท่ากัน — ทุกการสะสมและการจ่ายเป็น append-only และกระทบยอดได้ — แต่ทั้งสองอยู่คนละห้อง ผู้กำกับเห็น settlement ตามกฎหมายครบถ้วนและไม่เห็นระนาบกลยุทธ์เลย; party เอกชนรายอื่นเห็นเงื่อนไขกลยุทธ์ได้ผ่านความยินยอมที่ชัดแจ้งและเพิกถอนได้เท่านั้น ความลับตรงนี้ไม่ใช่สวิตช์ฟีเจอร์ แต่เป็นตัว schema เอง

2. Background — where the premium sits2. ภูมิหลัง — เงินเพิ่มนี้อยู่ตรงไหน

2.1 The statutory price is already modelled — the premium is the missing layer2.1 ราคาตามกฎหมายมีแบบจำลองแล้ว — เงินเพิ่มคือชั้นที่ขาด

A grower's payout today is built by PaymentItem from three statutory parts: a base_amt (the สอน. ฿/t at 10 CCS), a ccs_premium ((CCS − ccs_base) × increment × net_t) and a cane_type_adj (burnt/green policy). All three are public, audited by สอน. (CcsAudit), and justified by the 70:30 RevenueAccount. The strategic premium is a fourth part that is none of those things: it is set by private agreement, not by announcement; it does not draw on the 70:30 pool; and it must not appear on the audited PaymentItem at all. That is why PROP-009 does not add a column to PaymentItem — it opens a separate ledger.

วันนี้เงินที่ชาวไร่ได้รับถูกประกอบขึ้นโดย PaymentItem จากสามส่วนตามกฎหมาย: base_amt (ราคา สอน. ฿/ตัน ที่ 10 CCS), ccs_premium ((CCS − ccs_base) × increment × net_t) และ cane_type_adj (นโยบายอ้อยไฟไหม้/สด) ทั้งสามส่วนเป็นสาธารณะ ถูก สอน. ตรวจสอบ (CcsAudit) และอิงบัญชี 70:30 (RevenueAccount) เงินเพิ่มกลยุทธ์คือส่วนที่สี่ซึ่งไม่ใช่สิ่งใดข้างต้น: กำหนดโดยข้อตกลงส่วนตัว ไม่ใช่ประกาศ; ไม่ดึงจากกองรายได้ 70:30; และต้องไม่ปรากฏบน PaymentItem ที่ถูกตรวจสอบเลย นั่นคือเหตุผลที่ PROP-009 ไม่เพิ่มคอลัมน์ให้ PaymentItem — แต่เปิดบัญชีแยกต่างหาก

PaymentItem (statutory · public · สอน.-audited) net_amt = base_amt + ccs_premium + cane_type_adj − deductions ▲ StrategicAgreement (private · confidential · walled off from the regulator) strategic_premium = premium_per_t × net_t ← paid ON TOP, never inside PaymentItem

2.2 Two market conditions the premium is paid under2.2 สองเงื่อนไขของตลาดที่จ่ายเงินเพิ่มนี้

Conditionเงื่อนไขHow it worksทำงานอย่างไร
Checkpoint routeเส้นทางจุดประทับตรา
จุดประทับตรา
A long-haul truck stops at a stamp checkpoint to register into the factory system before it reaches the mill (the platform can operate these checkpoints too). Each checkpoint carries its own extra ฿/t, and each farmer has their own rate at that checkpoint that varies with the tonnage they deliver. The premium accrues per delivery on the stamped, weighed net.รถทางไกลแวะที่จุดประทับตราเพื่อลงทะเบียนเข้าระบบโรงงานก่อนถึงโรงงาน (platform รับดำเนินการจุดเหล่านี้ได้ด้วย) แต่ละจุดมี ฿/ตัน เพิ่มของตัวเอง และชาวไร่แต่ละรายมีอัตราของตนที่จุดนั้น ซึ่งแปรตามปริมาณตันที่ส่ง เงินเพิ่มสะสมต่อการส่งมอบตามน้ำหนักสุทธิที่ประทับตราและชั่งแล้ว
Fixed-price volume contractสัญญาปริมาณแบบเหมาจ่าย
เหมาจ่าย
The mill agrees a flat ฿/t with an individual farmer against a committed volume — typically higher than the สอน. price at 10 CCS, with no CCS premium paid on top. Two variants by agreement: (a) net at purchase — the flat price is final and any later government benefit stays with the mill; (b) fixed upfront + government benefit — a lower flat price upfront, and the government's later top-up is passed to the farmer.โรงงานตกลง฿/ตัน คงที่กับชาวไร่รายบุคคลผูกกับปริมาณที่รับปาก — โดยทั่วไปสูงกว่าราคา สอน. ที่ 10 CCS และไม่จ่ายส่วนเพิ่ม CCS เพิ่มอีก มีสองแบบตามข้อตกลง: (ก) สุทธิ ณ วันซื้อ — ราคาคงที่ถือเป็นราคาสุดท้าย เงินช่วยเหลือรัฐที่มาภายหลังเป็นของโรงงาน; (ข) คงที่ล่วงหน้า + เงินช่วยเหลือรัฐ — ราคาคงที่ต่ำกว่าจ่ายล่วงหน้า แล้วส่งต่อเงินเพิ่มจากรัฐที่มาภายหลังให้ชาวไร่

2.3 What PROP-009 builds on2.3 PROP-009 ต่อยอดจากอะไร

PROP-009 reuses substrate the platform already has: party_id + capacities (PROP-005) name every counterparty (a mill party ↔ a grower/quota party); Delivery + WeighTicket give the net tonnes each accrual is computed on; ConsentGrant (PDPA, PROP-003) is the exact instrument for private cross-party disclosure — PROP-009 only adds a new scope value; the append-only books ledger (PROP-004 Proposal C, party-agnostic since v6.0) is where a mill's premium payouts post, and is the seam PROP-010 will widen. The mechanism is mostly naming a confidential plane the model can already carry.

PROP-009 ใช้ฐานที่ platform มีอยู่แล้ว: party_id + capacity (PROP-005) ระบุคู่สัญญาทุกฝ่าย (party โรงงาน ↔ party ชาวไร่/โควตา); Delivery + WeighTicket ให้จำนวนตันสุทธิที่ใช้คำนวณการสะสมแต่ละครั้ง; ConsentGrant (PDPA, PROP-003) คือเครื่องมือที่ตรงเป๊ะสำหรับการเปิดเผยข้ามฝ่ายแบบส่วนตัว — PROP-009 เพียงเพิ่มค่า scope ใหม่; บัญชี books แบบ append-only (PROP-004 Proposal C ซึ่งเป็น party-agnostic ตั้งแต่ v6.0) คือที่ที่การจ่ายเงินเพิ่มของโรงงานลงบัญชี และเป็นรอยต่อที่ PROP-010 จะขยาย กลไกส่วนใหญ่คือการตั้งชื่อระนาบความลับที่โมเดลรองรับอยู่แล้ว

3. The premium mechanics3. กลไกของเงินเพิ่ม

3.1 Rate resolution3.1 การหาอัตรา

A StrategicAgreement fixes the pricing_mode. In checkpoint mode the premium rate for a delivery is resolved from the CheckpointRate matching the delivery's stamp checkpoint, the farmer party and the applicable volume tier (season-to-date tonnes). In fixed_price (เหมาจ่าย) mode the flat ฿/t replaces the statutory computation for that grower — the agreement records the benefit_treatment so settlement knows whether a later สอน. final-price uplift is the mill's or the farmer's.

แต่ละ StrategicAgreement กำหนด pricing_mode ในโหมด checkpoint อัตราเงินเพิ่มของการส่งมอบหาได้จาก CheckpointRate ที่ตรงกับจุดประทับตราของการส่งมอบ party ชาวไร่ และช่วงปริมาณที่เข้าเกณฑ์ (ตันสะสมในฤดู) ในโหมด fixed_price (เหมาจ่าย) ราคา ฿/ตัน คงที่แทนที่การคำนวณตามกฎหมายสำหรับชาวไร่รายนั้น — ข้อตกลงบันทึก benefit_treatment เพื่อให้ settlement รู้ว่าเงินเพิ่มราคาสุดท้ายจาก สอน. ในภายหลังเป็นของโรงงานหรือของชาวไร่

3.2 The step release schedule (25 / 50 / 75)3.2 ตารางจ่ายเป็นงวด (25 / 50 / 75)

The agreed premium is not all paid at once. A mill sets an upfront_pct ∈ {25, 50, 75}: that share of each delivery's accrued premium is released with the delivery's settlement (at payment due time), and the remainder is withheld until the committed contract_volume_t is reached — then the balance is released in one fulfilment payout. This protects the mill (the cane keeps coming) and still pays the farmer meaningfully on every load.

เงินเพิ่มที่ตกลงกันไม่ได้จ่ายทั้งหมดในคราวเดียว โรงงานกำหนด upfront_pct ∈ {25, 50, 75}: สัดส่วนนั้นของเงินเพิ่มที่สะสมในแต่ละการส่งมอบจะจ่ายพร้อมการปิดยอดของการส่งมอบนั้น (ณ เวลาที่ถึงกำหนดจ่าย) ส่วนที่เหลือถูกกันไว้จนกว่าจะครบปริมาณตามสัญญา contract_volume_t — แล้วจึงจ่ายส่วนที่เหลือเป็นก้อนเดียวเมื่อครบสัญญา วิธีนี้คุ้มครองโรงงาน (อ้อยยังส่งต่อเนื่อง) และยังจ่ายชาวไร่อย่างมีนัยทุกเที่ยว

upfront 50% · per deliverybalance 50% · on ครบปริมาณ

Example: premium_per_t = ฿70, delivery net = 30 t, upfront_pct = 50 → accrued ฿2,100; released now ฿1,050; withheld ฿1,050 until contract_volume_t is met.

ตัวอย่าง: premium_per_t = ฿70, น้ำหนักสุทธิ = 30 ตัน, upfront_pct = 50 → สะสม ฿2,100; จ่ายตอนนี้ ฿1,050; กันไว้ ฿1,050 จนครบ contract_volume_t

3.3 The quota → cane-farmer onward relay3.3 การส่งต่อสู่ลูกไร่ของหัวหน้าโควต้า

A quota farmer who receives a strategic premium from the mill typically buys the cane outright from their sub-farmers and relays a similar scheme downward — often paying cash on the factory delivery receipt (or a few days after), using that receipt as the settlement basis. OnwardPremiumSettlement records this leg (from quota party → cane-farmer party) with its own scheme (mirror / flat-per-t / split) and method (cash / ledger), keeping the money trail visible to those two parties without exposing the mill's headline terms.

หัวหน้าโควต้าที่ได้รับค่าอ้อยกลยุทธ์จากโรงงานมักซื้ออ้อยขาดจากลูกไร่ของตนและส่งต่อรูปแบบคล้ายกันลงไป — บ่อยครั้งจ่ายสดตามใบส่งมอบของโรงงาน (หรือไม่กี่วันหลังจากนั้น) โดยใช้ใบส่งมอบนั้นเป็นฐานการปิดยอด OnwardPremiumSettlement บันทึกขานี้ (จาก party โควตา → party ลูกไร่) พร้อม scheme ของตัวเอง (mirror / flat-per-t / split) และวิธีจ่าย (สด / ลงบัญชี) ทำให้เส้นทางเงินโปร่งใสสำหรับสองฝ่ายนั้น โดยไม่เปิดเผยเงื่อนไขหลักของโรงงาน

3.4 Renegotiation & multiple agreements3.4 การเจรจาใหม่และหลายข้อตกลง

Each strategic agreement can be renegotiated at any time — but never retroactively. A renegotiation writes a new revision of the agreement that takes effect the next day (effective_from = tomorrow); every PremiumAccrual already posted against a past delivery is untouched (append-only, NFR-22) — earlier loads keep the rate they accrued at, and only deliveries from the effective date onward use the new terms. A counterparty may also hold multiple concurrent agreements with the same mill within one season (e.g. a checkpoint agreement and a fixed-price block), each with its own terms; a delivery accrues under the single agreement in force for its checkpoint/route on its delivery date.

ข้อตกลงกลยุทธ์แต่ละฉบับเจรจาใหม่ได้ทุกเมื่อ — แต่ไม่มีผลย้อนหลัง การเจรจาใหม่จะเขียนฉบับใหม่ (revision) ของข้อตกลงที่มีผลวันถัดไป (effective_from = พรุ่งนี้); ทุก PremiumAccrual ที่ลงไว้กับการส่งมอบก่อนหน้าไม่ถูกแตะต้อง (append-only, NFR-22) — อ้อยเที่ยวเก่าคงอัตราที่สะสมไว้เดิม และเฉพาะการส่งมอบตั้งแต่วันมีผลเป็นต้นไปที่ใช้เงื่อนไขใหม่ นอกจากนี้คู่สัญญายังถือหลายข้อตกลงพร้อมกันกับโรงงานเดียวกันภายในฤดูเดียวได้ (เช่น ข้อตกลงจุดประทับตราหนึ่ง และ ก้อนเหมาจ่ายหนึ่ง) แต่ละฉบับมีเงื่อนไขของตน; การส่งมอบหนึ่งจะสะสมภายใต้ข้อตกลงฉบับเดียวที่มีผลกับจุด/เส้นทางของมัน ณ วันส่งมอบ

4. Confidentiality — the wall4. ความลับ — กำแพง

Confidentiality is enforced two ways, together. (A) Hard wall from the regulator: the strategic_pricing context is never a producer or consumer edge to regulation; none of its entities appear in any government read-model; and because the premium is not a PaymentItem component, the audited settlement the regulator does see carries no trace of it — not even in aggregate. (B) Consent-gated between private parties: any cross-party read of a strategic term (e.g. a bank scoring a farmer, PROP-003) resolves only through an active ConsentGrant whose scope includes the new value strategic_terms — never bundled into another scope, always separately, revocably granted.

ความลับถูกบังคับสองทางพร้อมกัน (ก) กำแพงแข็งจากผู้กำกับ: บริบท strategic_pricing ไม่เคยมีเส้นเชื่อม (producer/consumer) ไปยัง regulation; entity ของมันไม่ปรากฏใน read-model ใด ๆ ของรัฐ; และเพราะเงินเพิ่มไม่ใช่ส่วนหนึ่งของ PaymentItem settlement ที่ผู้กำกับเห็นจึงไม่มีร่องรอยของมันเลย แม้แต่ในระดับรวม (ข) ต้องมีความยินยอมระหว่าง party เอกชน: การอ่านเงื่อนไขกลยุทธ์ข้ามฝ่าย (เช่น ธนาคารประเมินเครดิตชาวไร่ PROP-003) จะทำได้ผ่าน ConsentGrant ที่ active และมี scope รวมค่าใหม่ strategic_terms เท่านั้น — ไม่ผูกรวมกับ scope อื่น ให้แยกต่างหากและเพิกถอนได้เสมอ

settlement · regulation PaymentItem · CcsAudit RevenueAccount (70:30) strategic_pricing StrategicAgreement PremiumAccrual · Release confidentiality wall no edge private party (e.g. bank) reads via ConsentGrant scope: strategic_terms
The strategic plane has no edge to regulation; a private party reads a term only through a scoped ConsentGrant.ระนาบกลยุทธ์ไม่มีเส้นเชื่อมไป regulation; party เอกชนอ่านเงื่อนไขได้ผ่าน ConsentGrant ที่มี scope เท่านั้น

5. Domain model — the strategic_pricing context5. แบบจำลองโดเมน — บริบท strategic_pricing

A new bounded context strategic_pricing (ค่าอ้อยกลยุทธ์) owns seven entities. It reads Delivery/WeighTicket (net tonnes), Party/PartyCapacity (counterparties) and Season; it writes to books (payout postings) and is gated by credit_risk's ConsentGrant for any external read. It has no edge to regulation.

บริบทใหม่ strategic_pricing (ค่าอ้อยกลยุทธ์) เป็นเจ้าของ 7 entity อ่าน Delivery/WeighTicket (ตันสุทธิ) Party/PartyCapacity (คู่สัญญา) และ Season; เขียนไปยัง books (การลงบัญชีการจ่าย) และถูกกั้นด้วย ConsentGrant ของ credit_risk สำหรับการอ่านจากภายนอก มันไม่มีเส้นเชื่อมไป regulation

EntityEntityAttributesแอตทริบิวต์Notesหมายเหตุ
StampCheckpoint
จุดประทับตรา
CKP-####
checkpoint_id, mill_id, name_th, name_en?, province, geo_location?, operator, default_extra_rate_per_t, status operator: mill | platform — the platform can run a checkpoint as a service. status: active | inactive. default_extra_rate_per_t in satang/tonne; per-farmer overrides live on CheckpointRate.operator: mill | platform — platform รับดำเนินการจุดเป็นบริการได้ status: active | inactive default_extra_rate_per_t เป็นสตางค์/ตัน; อัตราเฉพาะรายชาวไร่อยู่ที่ CheckpointRate
CheckpointRate
อัตราจุดประทับตรารายชาวไร่
CKR-######
rate_id, checkpoint_id, agreement_id?, party_id, season_id, min_volume_t?, max_volume_t?, extra_rate_per_t, status One row per volume tier per farmer per checkpoint (min/max_volume_t define the tier). party_id = the grower/quota counterparty. Append-only supersession — a new row supersedes, never edits (NFR-22).หนึ่งแถวต่อช่วงปริมาณต่อชาวไร่ต่อจุด (min/max_volume_t กำหนดช่วง) party_id = คู่สัญญาชาวไร่/โควตา แบบ append-only — แถวใหม่แทนที่ ไม่แก้ของเดิม (NFR-22)
StampEvent
การประทับตรา
STE-########
stamp_id, checkpoint_id, truck_id, delivery_id?, party_id, planned_net_t?, stamped_at, recorded_by Append-only. Registers a long-haul truck into the factory system at the checkpoint; delivery_id matched when the truck weighs in at the mill, linking the accrual to the real net.append-only ลงทะเบียนรถทางไกลเข้าระบบโรงงานที่จุด; จับคู่ delivery_id เมื่อรถชั่งที่โรงงาน เชื่อมการสะสมกับน้ำหนักสุทธิจริง
StrategicAgreement
ข้อตกลงค่าอ้อยกลยุทธ์
SGA-25##-####
agreement_id, mill_id, counterparty_party_id, season_id, pricing_mode, premium_per_t?, contract_volume_t, upfront_pct, benefit_treatment?, confidential, revision_no, effective_from, supersedes_agreement_id?, status, signed_at, signed_by The confidential contract of record. pricing_mode: checkpoint | fixed_price (เหมาจ่าย); benefit_treatment: net_no_benefit | upfront_plus_benefit (fixed_price only); upfront_pct ∈ {25,50,75}; confidential default true; status: draft | active | fulfilled | suspended | closed. Counterparty must hold an active grower or quota capacity. Renegotiable & non-retroactive: a renegotiation writes a new revision (revision_no++, supersedes_agreement_id → the prior) with effective_from = next day; posted accruals are never revalued. UNIQUE is not (mill, counterparty, season) — a counterparty may hold multiple concurrent agreements per season.สัญญาลับที่เป็นทางการ pricing_mode: checkpoint | fixed_price (เหมาจ่าย); benefit_treatment: net_no_benefit | upfront_plus_benefit (เฉพาะ fixed_price); upfront_pct ∈ {25,50,75}; confidential ค่าเริ่มต้น true; status: draft | active | fulfilled | suspended | closed คู่สัญญาต้องถือ capacity grower หรือ quota ที่ active เจรจาใหม่ได้และไม่ย้อนหลัง: การเจรจาใหม่เขียนฉบับใหม่ (revision_no++, supersedes_agreement_id → ฉบับก่อน) โดย effective_from = วันถัดไป; การสะสมที่ลงแล้วไม่ถูกตีมูลค่าใหม่ ไม่มีข้อจำกัด UNIQUE (mill, counterparty, season) — คู่สัญญาถือหลายข้อตกลงพร้อมกันต่อฤดูได้
PremiumAccrual
การสะสมค่าอ้อยกลยุทธ์
PMA-########
accrual_id, agreement_id, delivery_id, stamp_event_id?, net_t, premium_rate_per_t, gross_premium_amt, upfront_pct, upfront_amt, withheld_amt, posted_at Append-only, one per delivery per agreement. gross = rate × net_t; upfront_amt = gross × upfront_pct; withheld_amt = gross − upfront_amt. Recomputes idempotently from the weigh-ticket net (NFR-22). Never on PaymentItem.append-only หนึ่งรายการต่อการส่งมอบต่อข้อตกลง gross = rate × net_t; upfront_amt = gross × upfront_pct; withheld_amt = gross − upfront_amt คำนวณซ้ำได้แบบ idempotent จากน้ำหนักสุทธิ (NFR-22) ไม่อยู่บน PaymentItem
PremiumRelease
การจ่ายค่าอ้อยกลยุทธ์เป็นงวด
PMR-########
release_id, agreement_id, release_type, pct?, amount, delivery_id?, method, paid_at, recorded_by, status Append-only payout. release_type: per_delivery_upfront | volume_fulfilled_balance | manual_adjustment; method: cash | settlement_offset | ledger. A ledger release posts a JournalEntry in books (PROP-010 widens this).การจ่ายแบบ append-only release_type: per_delivery_upfront | volume_fulfilled_balance | manual_adjustment; method: cash | settlement_offset | ledger การจ่ายแบบ ledger ลง JournalEntry ใน books (PROP-010 ขยายส่วนนี้)
OnwardPremiumSettlement
การส่งต่อค่าอ้อยกลยุทธ์สู่ลูกไร่
OPM-########
relay_id, from_quota_party_id, to_cane_party_id, source_agreement_id?, delivery_id?, delivery_receipt_ref, net_t?, scheme, amount, method, paid_at, recorded_by Append-only. The quota→sub-farmer leg. scheme: mirror | flat_per_t | split; method: cash | ledger; delivery_receipt_ref = the factory receipt the cash is paid against. Does not expose the mill's headline terms.append-only ขาโควตา→ลูกไร่ scheme: mirror | flat_per_t | split; method: cash | ledger; delivery_receipt_ref = ใบส่งมอบของโรงงานที่ใช้จ่ายสด ไม่เปิดเผยเงื่อนไขหลักของโรงงาน

5.1 Relationships & state5.1 ความสัมพันธ์และสถานะ

StrategicAgreement lifecycle: draft → active (signed) → fulfilled (contract_volume_t reached; balance released) → closed; active → suspended (either party pauses) and back; active → superseded (renegotiated — a new revision becomes active the next day, non-retroactive). Every transition append-only.

วงจร StrategicAgreement: draft → active (ลงนาม) → fulfilled (ครบ contract_volume_t; จ่ายส่วนที่เหลือ) → closed; active → suspended (ฝ่ายใดฝ่ายหนึ่งพัก) และกลับได้; active → superseded (เจรจาใหม่ — ฉบับใหม่กลายเป็น active วันถัดไป ไม่ย้อนหลัง) ทุกการเปลี่ยนสถานะเป็น append-only

6. Events & workflows6. อีเวนต์และเวิร์กโฟลว์

Domain eventอีเวนต์Producer → consumersผู้ผลิต → ผู้บริโภค
StrategicAgreementSignedstrategic_pricing → portal, mobile (never regulation)(ไม่ไป regulation)
CheckpointStampedstrategic_pricing → portal, mobile, delivery_weighbridge
PremiumAccruedstrategic_pricing → portal, mobile, books
PremiumStepReleasedstrategic_pricing → portal, mobile, books, notifications
ContractVolumeFulfilledstrategic_pricing → portal, mobile, notifications
OnwardPaymentRecordedstrategic_pricing → portal, mobile, books
IDWorkflowเวิร์กโฟลว์Perspectiveมุมมอง
WF-31 newEstablish a strategic agreement — mill ↔ grower/quota; pick checkpoint or fixed_price mode, premium, contract volume, upfront %; confidential by default.ตั้งข้อตกลงกลยุทธ์ — โรงงาน ↔ ชาวไร่/โควตา; เลือกโหมด checkpoint หรือ fixed_price กำหนดเงินเพิ่ม ปริมาณสัญญา และ % ล่วงหน้า; เป็นความลับโดยค่าเริ่มต้นMILL · CFC/CFQ
WF-32 newCheckpoint stamp → match delivery → accrue premium → release the upfront step at payment due.ประทับตรา → จับคู่การส่งมอบ → สะสมเงินเพิ่ม → จ่ายงวดล่วงหน้าเมื่อถึงกำหนดMILL · CFC/CFQ
WF-33 newContract-volume fulfilment → release the withheld balance in one fulfilment payout; agreement → fulfilled.ครบปริมาณสัญญา → จ่ายส่วนที่กันไว้เป็นก้อนเดียว; ข้อตกลง → fulfilledMILL · CFC/CFQ
WF-34 newQuota → cane-farmer onward relay — record the cash (or ledger) payout against the factory delivery receipt.การส่งต่อโควตา → ลูกไร่ — บันทึกการจ่ายสด (หรือลงบัญชี) ตามใบส่งมอบของโรงงานCFQ · CFC
WF-35 newRenegotiate an agreement — author a new revision effective the next day (effective_from); the prior revision is superseded and posted accruals are unchanged. Also covers opening an additional concurrent agreement within the same season.เจรจาข้อตกลงใหม่ — จัดทำฉบับใหม่ที่มีผลวันถัดไป (effective_from); ฉบับก่อนถูกแทนที่ การสะสมที่ลงแล้วไม่เปลี่ยน รวมถึงการเปิดข้อตกลงเพิ่มพร้อมกันในฤดูเดียวกันMILL · CFC/CFQ

7. Requirements7. ข้อกำหนด

IDRequirementข้อกำหนดSurfacesช่องทาง
FR-78Checkpoint registry (mill- or platform-operated) with per-farmer, volume-tiered extra ratesทะเบียนจุดประทับตรา (โรงงานหรือ platform ดำเนินการ) พร้อมอัตราเพิ่มรายชาวไร่แบ่งตามช่วงปริมาณportal · admin
FR-79Checkpoint stamp capture — register a long-haul truck into the factory system and match it to a deliveryบันทึกการประทับตรา — ลงทะเบียนรถทางไกลเข้าระบบโรงงานและจับคู่กับการส่งมอบportal · mobile
FR-80Strategic agreement authoring — checkpoint or fixed_price (เหมาจ่าย) mode, benefit treatment, upfront step 25/50/75, confidential by defaultการจัดทำข้อตกลงกลยุทธ์ — โหมด checkpoint หรือ fixed_price (เหมาจ่าย) การจัดการเงินช่วยรัฐ งวดล่วงหน้า 25/50/75 เป็นความลับโดยค่าเริ่มต้นportal
FR-81Per-delivery premium accrual off net weight + resolved rate, held OFF the statutory PaymentItemการสะสมเงินเพิ่มต่อการส่งมอบจากน้ำหนักสุทธิ + อัตราที่หาได้ โดยไม่แตะ PaymentItem ตามกฎหมายportal
FR-82Step release — upfront % per delivery at payment due; withheld balance on contract-volume fulfilment; cash / settlement-offset / ledgerการจ่ายเป็นงวด — % ล่วงหน้าต่อการส่งมอบเมื่อถึงกำหนด; ส่วนที่กันไว้จ่ายเมื่อครบปริมาณ; สด / หักกลบ / ลงบัญชีportal · mobile
FR-83Quota→cane-farmer onward relay recorded against the factory delivery receipt (cash / ledger)การส่งต่อโควตา→ลูกไร่ บันทึกตามใบส่งมอบของโรงงาน (สด / ลงบัญชี)portal · mobile
FR-84Confidentiality controls — hard wall from the government surface + ConsentGrant scope strategic_terms for private cross-party sharingการควบคุมความลับ — กำแพงแข็งจากช่องทางรัฐ + ConsentGrant scope strategic_terms สำหรับการแบ่งปันข้ามฝ่ายแบบส่วนตัวportal · account
FR-85Strategic-pricing statements & exports per agreement / season, visible only to the mill and its counterpartyใบแจ้งยอดและการส่งออกค่าอ้อยกลยุทธ์ต่อข้อตกลง / ฤดู เห็นได้เฉพาะโรงงานและคู่สัญญาportal · mobile
FR-86Agreement renegotiation — new revision effective the next day, non-retroactive to posted accruals; and multiple concurrent per-season agreements per counterpartyการเจรจาข้อตกลงใหม่ — ฉบับใหม่มีผลวันถัดไป ไม่ย้อนหลังกับการสะสมที่ลงแล้ว; และหลายข้อตกลงพร้อมกันต่อฤดูต่อคู่สัญญาportal · mobile
NFR-21Hard wall: strategic pricing never enters any regulator/government read-model, is never a PaymentItem component, and leaks nothing — not even aggregate — to the government capacityกำแพงแข็ง: ค่าอ้อยกลยุทธ์ไม่เข้าสู่ read-model ใด ๆ ของผู้กำกับ/รัฐ ไม่เป็นส่วนหนึ่งของ PaymentItem และไม่รั่วสิ่งใด — แม้ระดับรวม — สู่ capacity ของรัฐ—
NFR-22Accruals & releases append-only and attributable (mirrors NFR-13); accrual recomputes idempotently from the weigh-ticket net; renegotiations are non-retroactive — a posted accrual is never revaluedการสะสมและการจ่ายเป็น append-only และระบุที่มาได้ (สอดคล้อง NFR-13); การสะสมคำนวณซ้ำได้แบบ idempotent จากน้ำหนักสุทธิ; การเจรจาใหม่ไม่ย้อนหลัง — การสะสมที่ลงแล้วไม่ถูกตีมูลค่าใหม่—
NFR-23Confidential-by-default: no cross-party read without an active ConsentGrant scope strategic_terms; every access logged & attributed (mirrors NFR-08)เป็นความลับโดยค่าเริ่มต้น: ไม่มีการอ่านข้ามฝ่ายหากไม่มี ConsentGrant scope strategic_terms ที่ active; ทุกการเข้าถึงถูกบันทึกและระบุที่มา (สอดคล้อง NFR-08)—

8. Impact matrix8. ตารางผลกระทบ

On acceptance, apply graph-first, then mirror into every document. No new perspective family — STR is a feature tag, folding into the existing MILL, CFQ and CFC perspective docs.

เมื่ออนุมัติ ให้นำเข้า graph ก่อน แล้วสะท้อนเข้าทุกเอกสาร ไม่มีตระกูลเอกสารมุมมองใหม่ — STR เป็น feature tag รวมเข้ากับเอกสารมุมมอง MILL CFQ และ CFC เดิม

Targetเป้าหมายChangeการเปลี่ยนแปลง
graph new + changedAdd context strategic_pricing + 7 entities, their relationships, 6 events, WF-31…35, FR-78…86, NFR-21…23, glossary terms; extend ConsentGrant.scope with strategic_terms; add invariants line for the confidentiality wall.เพิ่มบริบท strategic_pricing + 7 entity ความสัมพันธ์ 6 อีเวนต์ WF-31…35 FR-78…86 NFR-21…23 คำศัพท์; ขยาย ConsentGrant.scope ด้วย strategic_terms; เพิ่มบรรทัด invariant ของกำแพงความลับ
SPEC-APP extendFR-78…86, NFR-21…23; confidentiality principle in the interaction contract; strategic_terms in the consent scope list.FR-78…86 NFR-21…23; หลักการความลับใน interaction contract; strategic_terms ในรายการ scope ความยินยอม
SPEC-ERD (+MILL/CFQ/CFC) extend7 new entities + edges on the master diagram; the mill owns checkpoints/agreements/accruals/releases, quota/grower own the onward relay & their side of agreements.7 entity ใหม่ + เส้นเชื่อมบนไดอะแกรมหลัก; โรงงานเป็นเจ้าของจุด/ข้อตกลง/การสะสม/การจ่าย โควตา/ชาวไร่เป็นเจ้าของการส่งต่อและด้านของตนในข้อตกลง
SPEC-DDD (+MILL/CFQ/CFC) extendNew strategic_pricing context section; events; the "no edge to regulation" boundary rule; books posting seam.ส่วนบริบท strategic_pricing ใหม่; อีเวนต์; กฎขอบเขต "ไม่มีเส้นเชื่อมไป regulation"; รอยต่อการลงบัญชี books
SPEC-PWF (+MILL/CFQ/CFC) extendWF-31…35 + the StrategicAgreement state machine (draft→active→fulfilled→closed / suspended / superseded).WF-31…35 + state machine (สเตตแมชชีน) StrategicAgreement (draft→active→fulfilled→closed / suspended / superseded)
SPEC-PRD (+MILL/CFQ/CFC) extendGoals/scope for the premium; competitive-retention framing; the confidentiality guarantee as a product promise.เป้าหมาย/ขอบเขตของเงินเพิ่ม; กรอบการรักษาลูกค้าเชิงแข่งขัน; การรับประกันความลับเป็นสัญญาผลิตภัณฑ์
SPEC-UIX extendMill portal: agreements board, checkpoint & rate editor, accrual/release ledger; mobile farmer: my strategic terms (private) & step-payment status; confidentiality affordances (locked/consent UI).พอร์ทัลโรงงาน: กระดานข้อตกลง ตัวแก้จุด/อัตรา บัญชีสะสม/จ่าย; มือถือชาวไร่: เงื่อนไขกลยุทธ์ของฉัน (ส่วนตัว) และสถานะจ่ายเป็นงวด; องค์ประกอบความลับ (UI ล็อก/ยินยอม)
SPEC-INDEX extendRegister the feature & version bump on acceptance.ลงทะเบียนฟีเจอร์และเลื่อนเวอร์ชันเมื่ออนุมัติ

9. Open questions9. คำถามที่ยังเปิด

10. Exhibit10. ตัวอย่างประกอบ

PROP-009 exhibit — Strategic-payment workbench →
An interactive, three-tab demo: (1) the premium calculator (checkpoint + fixed-price modes, step schedule → per-delivery & fulfilment payout), (2) the quota→cane-farmer onward relay, (3) a mill's books view with auto-posted strategic entries. Illustrative, not a binding visual design (SPEC-UIX is).เดโมโต้ตอบสามแท็บ: (1) เครื่องคำนวณเงินเพิ่ม (โหมด checkpoint + เหมาจ่าย ตารางงวด → จ่ายต่อการส่งมอบและครบสัญญา) (2) การส่งต่อโควตา→ลูกไร่ (3) มุมมอง books ของโรงงานพร้อมรายการกลยุทธ์ที่ลงอัตโนมัติ เป็นภาพประกอบ ไม่ใช่ดีไซน์ผูกพัน (SPEC-UIX เป็นตัวจริง)

Revision historyประวัติการแก้ไข

Revเวอร์ชันDateวันที่Changeการเปลี่ยนแปลง
0.109 Jul 2026Initial draft — strategic cane payment: checkpoint & เหมาจ่าย conditions, step release, onward relay, confidentiality wall, strategic_pricing context (7 entities), WF-31…34, FR-78…85, NFR-21…23, impact matrix + exhibit.ร่างแรก — ค่าอ้อยกลยุทธ์: เงื่อนไขจุดประทับตราและเหมาจ่าย การจ่ายเป็นงวด การส่งต่อสู่ลูกไร่ กำแพงความลับ บริบท strategic_pricing (7 entity) WF-31…34 FR-78…85 NFR-21…23 ตารางผลกระทบ + ตัวอย่าง
0.209 Jul 2026Added agreement renegotiation (new revision, effective_from = next day, non-retroactive to posted accruals) and multiple concurrent per-season agreements per counterparty — Section 3.4, StrategicAgreement gains revision_no · effective_from · supersedes_agreement_id + superseded state, WF-35, FR-86, NFR-22 clause.เพิ่มการเจรจาข้อตกลงใหม่ (ฉบับใหม่ effective_from = วันถัดไป ไม่ย้อนหลังกับการสะสมที่ลงแล้ว) และหลายข้อตกลงพร้อมกันต่อฤดูต่อคู่สัญญา — ข้อ 3.4, StrategicAgreement เพิ่ม revision_no · effective_from · supersedes_agreement_id + สถานะ superseded, WF-35, FR-86, ข้อ NFR-22.
1.009 Jul 2026ACCEPTED. Applied graph-first (spec v8.0): strategic_pricing context + 7 entities, relationships, 6 events, WF-31…35, FR-78…86, NFR-21…23, glossary and the confidentiality-wall convention added to spec-graph.json; ConsentGrant.scope extended with strategic_terms and JournalEntry.source_type with auto_strategic. Mirrored into APP, PRD, ERD, DDD, PWF, UIX and the MILL/CFQ/CFC perspective families + SPEC-INDEX, revs bumped.อนุมัติแล้ว นำเข้าแบบ graph ก่อน (spec v8.0): เพิ่มบริบท strategic_pricing + 7 entity ความสัมพันธ์ 6 อีเวนต์ WF-31…35 FR-78…86 NFR-21…23 คำศัพท์ และ convention กำแพงความลับใน spec-graph.json; ขยาย ConsentGrant.scope ด้วย strategic_terms และ JournalEntry.source_type ด้วย auto_strategic สะท้อนเข้า APP, PRD, ERD, DDD, PWF, UIX และตระกูลมุมมอง MILL/CFQ/CFC + SPEC-INDEX เลื่อน rev เรียบร้อย