SPEC-APP-FIN Rev 0.5.2 · 2026-08-04

Cane Agency · APP Seriesสถาบันอ้อย · ชุดเอกสาร APP

Application Design Requirements — Bank (financial institution)ข้อกำหนดการออกแบบแอปพลิเคชัน — ธนาคาร / สถาบันการเงิน

Documentเอกสาร
SPEC-APP-FIN
Versionversion (เวอร์ชัน)
0.5.2 · Draftฉบับร่าง
CapacityCapacity
bank
Surfaceช่องทางใช้งาน
finance
Updatedปรับปรุงล่าสุด
2026-08-04
Masterเอกสารหลัก
SPEC-APP

1. Scope & perspective1. ขอบเขตและมุมมอง

This is the Bank (financial institution) perspective of SPEC-APP — the application design requirements slice for the bank capacity (finance surface). Cross-cutting content lives in the master; the single source of truth is the graph (docs/graph/spec-graph.json). Created by PROP-014 (v0.1.0) as part of the APP perspective split.

นี่คือมุมมอง ธนาคาร / สถาบันการเงิน ของ SPEC-APP — ส่วนข้อกำหนดการออกแบบแอปพลิเคชันสำหรับ capacity bank (ช่องทางใช้งาน finance) เนื้อหาข้ามมุมมองอยู่ในเอกสารหลัก แหล่งความจริงเดียวคือ graph (docs/graph/spec-graph.json) สร้างโดย PROP-014 (v0.1.0) เป็นส่วนหนึ่งของการแยกมุมมอง APP

2. In this perspective2. สิ่งที่อยู่ในมุมมองนี้

3. Access contract3. สัญญาการเข้าถึง

Rendered from the graph (v0.4.0, PROP-018 P3 — federation.entitlementMatrix · roles · requirements). A tenant's surface entitlement is the UNION over its active capacities and the compiled srf claim must equal it (NFR-15); the roles below are the role set grantable on this capacity's surfaces (one role per surface per membership), and the requirement index lists every functional requirement whose surfaces intersect this capacity's entitlement.

Render จาก graph (v0.4.0, PROP-018 P3 — federation.entitlementMatrix · roles · requirements) สิทธิ์ surface ของ tenant คือ UNION ของ capacity ที่ active และ claim srf ที่คอมไพล์ต้องเท่ากันเสมอ (NFR-15); role ด้านล่างคือชุด role ที่ให้ได้บน surface ของ capacity นี้ (หนึ่ง role ต่อ surface ต่อ membership) และดัชนีข้อกำหนดแสดง functional requirement ทุกข้อที่ surface ตัดกับสิทธิ์ของ capacity นี้

entitled surfacessurface ที่มีสิทธิ์ account · finance

Role idNameชื่อSurfacesSurfaceNoteหมายเหตุ
ownerOwner (fixed-full role) · เจ้าของevery entitled surfaceทุก surface ที่มีสิทธิ์Fixed-full role — holds every permission, undeletable.Role เต็มแบบตรึง — ถือทุกสิทธิ์ ลบไม่ได้
relationship_officerRelationship officer · เจ้าหน้าที่ลูกค้าสัมพันธ์สินเชื่อfinance—
credit_analystCredit analyst · นักวิเคราะห์สินเชื่อfinance—
risk_officerRisk officer · เจ้าหน้าที่บริหารความเสี่ยงfinance—
compliance_officerCompliance officer · เจ้าหน้าที่กำกับการปฏิบัติงานfinance—
fi_adminFI admin · ผู้ดูแลระบบสถาบันการเงินfinance—

Functional-requirement index (32)ดัชนี functional requirement (32 ข้อ)

FRRequirementข้อกำหนดSurfacesSurfacePriorityลำดับ
FR-14Tenant provisioning & membership linking (org tenants + individual tenants, invitation/linking) — v6.0: superseded in substance by FR-60…63; retained for traceabilityaccount · portal · websiteP0
FR-34Bank tenant provisioning + dedicated finance portal, strict tenant/data isolationfinance · websiteP0
FR-35Data-sharing consent (PDPA): scoped, time-boxed, revocable; enforced on every cross-tenant readfinance · account · mobile · portalP0
FR-36Cane credit score & assessment from platform data (delivery, CCS, quota, contract, repayment, yield); auditable snapshot & model versionfinanceP0
FR-37Loan product catalogue (crop input, working capital, equipment term, quota-backed, supply-chain finance)financeP1
FR-38Loan application, scoring-assisted underwriting & approval workflowfinance · mobileP0
FR-39Loan account & amortization ledger (append-only disbursement/repayment/interest/fee/write-off)financeP0
FR-40Collateral management (standing crop, quota, delivery receivable, land, contract, machine)financeP1
FR-41Disbursement & repayment incl. settlement-offset on assigned delivery receivablesfinance · portalP0
FR-42Collections, delinquency, restructuring & NPL classificationfinanceP1
FR-43Risk & portfolio dashboards; regulatory exports (BoT / NCB-aligned)financeP1
FR-44Contractor onboarding: contractor capacity on an tenant, registered or not (WF-24/25 branch); verification; capacity move keeps the recorddispatch · account · websiteP0
FR-54Contractor credit: consent-gated performance data feeds CreditAssessment; equipment term & working-capital products; machine collateral (extends PROP-003)finance · dispatchP1
FR-59P&L, machine-profitability and cash-flow reports; accountant-ready export; statement sharing to banks via ConsentGrant scope booksdispatch · financeP1 (export P2)
FR-60One federated sign-in per person (phone OTP + external OIDC providers); tenant-context switcher; exactly one active tenant per token; re-issue on switchaccount · allP0
FR-61Tenant & capacity management: found tenant, request/grant/suspend/revoke capacities, per-capacity verification levels, exclusivity enforcementaccountP0
FR-62Entitlement compiler: srf = union of the entitlement matrix over active capacities; surface switcher renders exactly the claimaccount · allP0
FR-63Memberships & surface-role grants: invite by phone, one role per surface per membership, owner fixed-full, template role sets per capacityaccountP0
FR-64Permission catalogs & role × permission matrix authoring per surface, owner column locked, locked chips for unreachable surfacesaccountP1
FR-65Scope overrides: province / district / mill_zone / quota_network / field_set, equal-or-narrower enforcedaccountP1
FR-66ConsentGrant generalized to tenant↔tenant with capacity-aware scopes; grant/revoke UI on account surfaceaccount · financeP0
FR-68Platform view-as sessions: permission-gated start, persistent banner, dual logging, session recordaccount · portal · dispatchP1
FR-69Migration & merge tooling: tenant→party and user→person mapping, phone-verified assisted person merge, full audit of every mergeaccountP0
FR-70Admission classes: capacities carry `admission` (self_serve | invitation); invitation-only capacities (mill, bank, government, operator) grantable ONLY against an open operator-issued Invitation; self-requests rejected with an explain-and-redirect state (WF-25/28)admin · accountP0
FR-73Representative → active conversion preserves mill_id, tenant_id and every quota/designation/plan link (continuity promise, WF-29)admin · accountP0
FR-84Confidentiality controls — hard wall from the government surface + ConsentGrant scope strategic_terms for private cross-tenant sharingportal · accountP0
FR-92Statements — P&L, balance sheet, trial balance, cash flow; per period/season; append-only frozen snapshotsportal · mobile · financeP1
FR-93Statement sharing to a bank via ConsentGrant scope books; accountant-ready export (CSV / PDF)portal · financeP1
FR-94Confidential inheritance — PROP-009 strategic postings visible in the owner's books but excluded from any statement shared to the government capacityportal · accountP0
FR-105Per-tenant accounting basis: BooksProfile.default_basis seeds each new FiscalPeriod (cash | accrual), editable by the books owner; a change applies to the next open period only, never a closed or in-flight one (reproducibility, NFR-25)portal · mobile · accountP1
FR-107Books editions — unified vs split AR/AP + cash surfaces: mill fixed split, grower fixed unified, quota & contractor upgradeable to split via the operator-granted books_split entitlement; books_edition is a derived read, not a data forkportal · admin · accountP2
FR-108Full-statement sharing to a bank — a consent-gated (ConsentGrant scope books) statement is sent in full with no per-line redaction; the only exclusion in the system is the government-capacity strategic wall (FR-94)portal · financeP1
FR-313Reliability-score consent — a farmer grants a NAMED bank the reliability_score scope on its own screen, plain Thai, mandatory expiry; never bundled, never pre-ticked; grant, expiry, every read and revoke live in his consent registermobile · account · portalP1
FR-314The Reliability Extract — score + band + formula_version + computed_at, trailing-three-season summary and tenure; raw event rows, mill identities and delivery facts withheldfinance · portalP1
FR-315The extract is an assessment factor only under an active grant, and is pinned into factors_snapshot so a decision survives revocationfinance · portalP1

Full requirement definitions and the non-functional set live in SPEC-APP Sections 4–6 (unchanged addresses).

นิยามข้อกำหนดฉบับเต็มและชุด non-functional อยู่ใน SPEC-APP ข้อ 4–6 (ตำแหน่งเดิม)

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

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

RevฉบับDateวันที่Changeการเปลี่ยนแปลง
0.1.02026-07-11Initial split from the area master (PROP-014, spec v0.1.0). Semantic versioning restarted at 0.1.0; the legacy master line reached v12.0. States its scope and defers depth to the graph, to deepen in later patches.แยกจากเอกสารหลัก (PROP-014, spec v0.1.0) รีสตาร์ท semantic versioning ที่ 0.1.0 (สายเดิมถึง v12.0) ระบุขอบเขตและอ้างอิงรายละเอียดจาก graph จะลงลึกในแพตช์ถัดไป
0.2.02026-07-13PROP-018 P3 (spec v0.4.0): generated Access contract (Section 3) — entitled surfaces, grantable role set and the functional-requirement index binding this capacity, rendered from the graph (federation.entitlementMatrix · roles · requirements).PROP-018 P3 (spec v0.4.0): เพิ่มสัญญาการเข้าถึงที่ generate (ข้อ 3) — surface ที่มีสิทธิ์ ชุด role ที่ให้ได้ และดัชนี functional requirement ที่ผูกพัน render จาก graph (federation.entitlementMatrix · roles · requirements)
0.3.02026-07-28PROP-037 applied (spec v0.29.0). Access contract gains FR-313…315 — the reliability_score consent scope, the Reliability Extract contract and the factors_snapshot pin. The scope is applied alone: the commercial product (PROP-039) and the regulator posture (PROP-038 / BOT legal review) stay open, and no bank is enabled until the opinion is on file (A-64).apply PROP-037 (spec v0.29.0) สัญญาการเข้าถึงเพิ่ม FR-313…315 — scope reliability_score สัญญาข้อมูล Reliability Extract และการตรึงใน factors_snapshot; apply เฉพาะ scope ส่วนราคาและท่าทีผู้กำกับยังเปิดอยู่ และยังไม่เปิดใช้กับธนาคารใดจนกว่าจะมีความเห็นทางกฎหมาย (A-64)
0.4.02026-08-03PROP-075 approved & applied — spec v0.46.0. Editorial: the customer-profile line stops calling a tenant “an individual or organization tenant” — a tenant is a container (A-81, R-CONTAINER) and the registered legal body is a Department carrying a legal_form. department_id / department_path → department_* where cited.PROP-075 อนุมัติและ apply — spec v0.46.0 เชิงบรรณาธิการ: เลิกเรียก tenant ว่า tenant แบบบุคคลหรือองค์กร
0.5.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), so one tree has one name.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; รหัสแสดงผลและ claim ถูก R-NULL คงไว้หนึ่งรุ่น แล้วย้ายที่ v0.47.1 ตามการตัดสินของลูกค้า (C-1) เพราะยังไม่มีโทเคนใดถูกลงนาม (ต้นแบบ ocsb/ocsf ที่สร้างแล้วไม่มีระบบ auth) และรหัสที่พิมพ์มีเพียงแปดสายใน apps/ocsf/fund-shell.jsx ซึ่งถูกกวาดในรอบเดียวกัน: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep รอบเดียวกันแก้ค้างจาก PROP-075: คำนามไดเรกทอรีที่เลิกใช้ domain เปลี่ยนเป็น department (A-82 R-ONETREE)
0.5.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.5.22026-08-04PROP-072 approved & applied — spec v0.50.0 (patch). The bank profile carried the bare line "Exclusive capacity (NFR-16)", which reads as though a bank officer were barred from farming — the exact misreading PROP-072 H-9 warned about. It now says on the same tenant and cites FR-402, which states the scope: exclusivity is a property of the TENANT and there is no exclusivity on the person side. Four words; a policy nobody intended, prevented.PROP-072 approved & applied — spec v0.50.0 (patch) โปรไฟล์ธนาคารเขียนว่า "capacity เอกสิทธิ์ (NFR-16)" ลอย ๆ ซึ่งอ่านได้ว่าเจ้าหน้าที่ธนาคารถูกห้ามทำไร่ — เป็นการอ่านผิดที่ H-9 ของ PROP-072 เตือนไว้พอดี ตอนนี้เขียนว่า บน tenant เดียวกัน และอ้าง FR-402 ซึ่งระบุขอบเขต: การผูกขาดเป็นคุณสมบัติของ tenant และไม่มีการผูกขาดฝั่งคน สี่คำ กันนโยบายที่ไม่มีใครตั้งใจ