diff --git a/04_generated_documentation/00_process_control/checkpoints/checkpoint-008-stage-5-use-case-authoring.md b/04_generated_documentation/00_process_control/checkpoints/checkpoint-008-stage-5-use-case-authoring.md new file mode 100644 index 0000000..44bf9ce --- /dev/null +++ b/04_generated_documentation/00_process_control/checkpoints/checkpoint-008-stage-5-use-case-authoring.md @@ -0,0 +1,20 @@ +# Checkpoint 008 — Stage 5 Use-Case Authoring + +- **Checkpoint ID:** `CKPT-008` +- **Date:** 2026-10-11 +- **Active Stage:** Stage 5 — Use Case Authoring +- **Active Track:** Greenfield, India-first, multi-tenant Agriculture Trading Backoffice (ATB) +- **Active Skill:** `up-use-case-author` completed; Gate 5.1 run + +## Completed +- Authored use cases `UC-002`–`UC-026` with corresponding `functional-reqs.md` artifacts; the pre-existing `UC-001` remains unchanged. +- Mapped every `BRD-FR-001`–`BRD-FR-052` to a use case in `04_generated_documentation/01_source_inventories/brd_inventory.md`. +- Gate 5.1 passes structurally for 26 UCs and 55 child FRs, with zero Critical, Major, or Minor validator findings. +- Recorded the current gate result and new nodes in `traceability_graph.md`; Gate 9.1 is not run for the expanded Stage 5 scope. + +## Open Items +- Existing `UC-001` authentication FRs cite `BRD-FR-001`–`BRD-FR-003`, which the baselined PRD defines as Market Desk requirements. This is a semantic traceability Major recorded in `traceability_graph.md`; do not revise those baseline mappings before a Change Request is analyzed and dispositioned. +- `AMB-001`, `AMB-006`, and `AMB-008` remain open evidence gates per `ambiguity_register.md`. + +## Exact Next Action +Invoke `/up-change-request-impact` to analyze the UC-001 source-feature mapping discrepancy and obtain a disposition before changing the baselined mapping. After the mapping issue is dispositioned, continue to Stage 6 with `/up-arch-risk-spike`, scoring the full current use-case set. diff --git a/04_generated_documentation/00_process_control/checkpoints/checkpoint_index.md b/04_generated_documentation/00_process_control/checkpoints/checkpoint_index.md index b638627..e40f654 100644 --- a/04_generated_documentation/00_process_control/checkpoints/checkpoint_index.md +++ b/04_generated_documentation/00_process_control/checkpoints/checkpoint_index.md @@ -25,3 +25,5 @@ | `CKPT-006` | 2026-10-11 | Stage 0B (Requirements elicitation / Inception) | ATB draft PRD expanded to 52 FRs and 14 NFRs; decisions recorded through DEC-019, including the accepted pre/post pilot KPI measurement protocol. | `AMB-001`, `AMB-006`, and `AMB-008` remain open for pilot results, qualified legal/accounting evidence, and load-test/pilot telemetry; PRD baseline approval pending. | Prepare Stage 0B Human Review Brief and review the Draft PRD; collect evidence for the remaining ambiguities, then obtain explicit baseline approval before Stage 1. | `checkpoint-006-atb-requirements-elicitation.md` | | `CKPT-007` | 2026-10-11 | Stage 1 (Business Requirements Extraction) | Baselined PRD for Stage 1 under DEC-020 and ASM-001–ASM-003; extracted 52 FRs and 14 NFRs. | `AMB-001`, `AMB-006`, and `AMB-008` remain evidence gates. | Review Stage 1 inventory, then continue Greenfield track to Stage 5 use-case authoring while carrying assumptions and release gates forward. | `checkpoint-007-atb-brd-extraction.md` | + +| `CKPT-008` | 2026-10-11 | Stage 5 (Use Case Authoring / Gate 5.1) | Authored UC-002–UC-026 and child FRs; all 52 BRD-FRs mapped; Gate 5.1 passed structurally (26 UCs, 55 FRs). | UC-001 source-feature semantic mismatch requires CR disposition; `AMB-001`, `AMB-006`, `AMB-008` remain evidence gates. | Run `/up-change-request-impact` on UC-001 mapping discrepancy; after disposition, proceed to `/up-arch-risk-spike` for Stage 6. | `checkpoint-008-stage-5-use-case-authoring.md` | diff --git a/04_generated_documentation/00_process_control/traceability_graph.md b/04_generated_documentation/00_process_control/traceability_graph.md index 883639b..070aa95 100644 --- a/04_generated_documentation/00_process_control/traceability_graph.md +++ b/04_generated_documentation/00_process_control/traceability_graph.md @@ -4,7 +4,7 @@ |---|---| | **Governed Standard** | SEI-CMMI Level 3 (UP-AI v1.1) | | **Document Path** | `04_generated_documentation/00_process_control/traceability_graph.md` | -| **Last Updated** | 2026-10-03 | +| **Last Updated** | 2026-10-11 | | **Gated By** | `up-traceability-gate`, `scripts/verify_traceability_gates.py` | @@ -12,13 +12,13 @@ ## 1. Graph Summary Statistics -- **Total Use Cases (UC-xxx):** 1 -- **Total Functional Requirements (FR-xxx):** 3 +- **Total Use Cases (UC-xxx):** 26 +- **Total Functional Requirements (FR-xxx):** 55 - **Total System Requirements (SRS / NFR):** 3 - **Total User Stories (STORY-xxx):** 3 - **Total Test Cases (TC-xxx):** 4 - **Gate 5.1 Status:** **PASS** (Zero critical findings) -- **Gate 9.1 Status:** **PASS** (Zero critical findings) +- **Gate 9.1 Status:** **Not Run for expanded Stage 5 scope** --- @@ -26,7 +26,7 @@ ```mermaid graph TD - BRD["BRD-FR-001 (User Auth & Access)"] --> UC001["UC-001 (User Identity & Role Governance)"] + UC001["UC-001 (User Identity & Role Governance)"] UC001 --> FR001["FR-AUTH-001 (OIDC PKCE Login)"] UC001 --> FR002["FR-AUTH-002 (Multi-Tenant RBAC)"] UC001 --> FR003["FR-AUTH-003 (Session & Token Revocation)"] @@ -54,7 +54,100 @@ graph TD | Node ID | Node Name | Parent ID | Downstream Linkages | Status | |---|---|---|---|---| -| `UC-001` | User Identity & Role Governance | `BRD-FR-001` | `FR-AUTH-001`, `FR-AUTH-002`, `FR-AUTH-003` | Baselined | +| `UC-001` | User Identity & Role Governance | — (source mapping under semantic review) | `FR-AUTH-001`, `FR-AUTH-002`, `FR-AUTH-003` | Baselined | | `FR-AUTH-001` | OIDC PKCE Login | `UC-001` | `SRS-AUTH-001`, `LLD-001_auth_service.md`, `STORY-AUTH-001` | Ready for Construction | | `FR-AUTH-002` | Multi-Tenant RBAC | `UC-001` | `SRS-AUTH-002`, `LLD-001_auth_service.md`, `STORY-AUTH-002` | Ready for Construction | | `FR-AUTH-003` | Session & Token Revocation | `UC-001` | `SRS-AUTH-003`, `LLD-001_auth_service.md`, `STORY-AUTH-003` | Ready for Construction | + +--- + +## Gate 5.1 Check — 2026-10-11 (Complete Stage 5 Set) + +| Check-ID | UC or FR | Issue | Severity | Required Action | +|---|---|---|---|---| +| G51-001/002 | `UC-001`–`UC-019`, child FRs | Deterministic validator found 26 use cases with 55 total child FRs; all parent UC references resolve. | Pass | None for structural completeness. | +| Semantic review | `UC-001` / `FR-AUTH-001`–`FR-AUTH-003` | Existing authentication requirements cite `BRD-FR-001`–`BRD-FR-003`, which the baselined PRD defines as Market Desk arrival, price capture, and trend analytics. The current source mapping is semantically inconsistent. | Major | Raise and disposition a CR through `up-change-request-impact` before changing the baselined UC/FR source mappings. | + +**Gate result:** PASS with a semantic Major follow-up; zero Critical findings. Do not treat the existing UC-001 source mapping as validated by the deterministic pass. + +### Additional Stage 5 Nodes (UC-002–UC-026) + +| Node ID | Node Name | Parent ID | Source | Status | +|---|---|---|---|---| +| `UC-002` | Record Daily Mandi Arrivals and Prices | — | `BRD-FR-001`, `BRD-FR-002` | Draft | +| `FR-MKT-001` | Capture Daily Mandi Arrival Observations | `UC-002` | `BRD-FR-001` | Draft | +| `FR-MKT-002` | Capture Daily Mandi Price Range and Modal Rate | `UC-002` | `BRD-FR-002` | Draft | +| `UC-003` | Mandi Price Trend Analytics | — | `BRD-FR-003` | Draft | +| `FR-MARKETTRENDANALYTICS-001` | Intraday Price Trend Analysis & 20-Day Benchmark Analytics | `UC-003` | `BRD-FR-003` | Draft | +| `UC-004` | Purchase Sauda and Supplier Payables Setup | — | `BRD-FR-004`, `BRD-FR-005`, `BRD-FR-006`, `BRD-FR-007` | Draft | +| `FR-PROCUREMENTCONTRACTS-001` | Procurement Price Variance Alert vs. Modal Rate | `UC-004` | `BRD-FR-004` | Draft | +| `FR-PROCUREMENTCONTRACTS-002` | Mandi Auction & Direct Purchase Sauda Booking | `UC-004` | `BRD-FR-005` | Draft | +| `FR-PROCUREMENTCONTRACTS-003` | Supplier Credit Terms & Due Date Computation | `UC-004` | `BRD-FR-006` | Draft | +| `FR-PROCUREMENTCONTRACTS-004` | Mandi Cess & Statutory Levies Apportioning | `UC-004` | `BRD-FR-007` | Draft | +| `UC-005` | Inward Vehicle Receiving and Goods Receipt | — | `BRD-FR-008`, `BRD-FR-009`, `BRD-FR-010`, `BRD-FR-011`, `BRD-FR-012`, `BRD-FR-013` | Draft | +| `FR-INWARDRECEIVING-001` | Inward Vehicle Gate Entry & Verification | `UC-005` | `BRD-FR-008` | Draft | +| `FR-INWARDRECEIVING-002` | Weighbridge Gross & Tare Weighment Logging | `UC-005` | `BRD-FR-009` | Draft | +| `FR-INWARDRECEIVING-003` | Bag Tare Deduction (*Bardana Katai*) & Final Net MT | `UC-005` | `BRD-FR-010` | Draft | +| `FR-INWARDRECEIVING-004` | Weighment Tolerance & Transit Shortage Verification | `UC-005` | `BRD-FR-011` | Draft | +| `FR-INWARDRECEIVING-005` | Goods Receipt Note (GRN) Posting & Warehouse Stack Placement | `UC-005` | `BRD-FR-012` | Draft | +| `FR-INWARDRECEIVING-006` | Mandatory Lot & Batch Identity Generation | `UC-005` | `BRD-FR-013` | Draft | +| `UC-006` | Inward Quality Inspection and Lot Control | — | `BRD-FR-014`, `BRD-FR-015`, `BRD-FR-016`, `BRD-FR-017` | Draft | +| `FR-QUALITYANDLOTCONTROL-001` | Inward Quality Inspection Parameter Recording | `UC-006` | `BRD-FR-014` | Draft | +| `FR-QUALITYANDLOTCONTROL-002` | Quality Deduction / Rebate Calculation | `UC-006` | `BRD-FR-015` | Draft | +| `FR-QUALITYANDLOTCONTROL-003` | Finite State Machine Enforcement for `QC Hold` vs. `Released` | `UC-006` | `BRD-FR-016` | Draft | +| `FR-QUALITYANDLOTCONTROL-004` | Lot Splitting & Blending Traceability | `UC-006` | `BRD-FR-017` | Draft | +| `UC-007` | Warehouse Stock, Audit, Capacity and Transfer | — | `BRD-FR-018`, `BRD-FR-019`, `BRD-FR-020` | Draft | +| `FR-WAREHOUSEINVENTORY-001` | Multi-Godown Dual-Unit Stock Ledger | `UC-007` | `BRD-FR-018` | Draft | +| `FR-WAREHOUSEINVENTORY-002` | Godown Capacity & Volume Utilization Tracking | `UC-007` | `BRD-FR-019` | Draft | +| `FR-WAREHOUSEINVENTORY-003` | Godown-to-Godown Internal Stock Transfer | `UC-007` | `BRD-FR-020` | Draft | +| `UC-008` | Customer Sales Contract, Credit Check and Allocation | — | `BRD-FR-021`, `BRD-FR-022`, `BRD-FR-023` | Draft | +| `FR-SALESCONTRACTS-001` | Customer Sales Contract Booking | `UC-008` | `BRD-FR-021` | Draft | +| `FR-SALESCONTRACTS-002` | Customer Credit Limit & Pre-Order Exposure Verification | `UC-008` | `BRD-FR-022` | Draft | +| `FR-SALESCONTRACTS-003` | Sales Order Inventory Allocation | `UC-008` | `BRD-FR-023` | Draft | +| `UC-009` | Outbound Dispatch and Delivery | — | `BRD-FR-024`, `BRD-FR-025`, `BRD-FR-026` | Draft | +| `FR-DISPATCHDELIVERY-001` | Outbound Dispatch Board Console | `UC-009` | `BRD-FR-024` | Draft | +| `FR-DISPATCHDELIVERY-002` | Outbound Weighbridge & Dispatch Bilty/Manifest | `UC-009` | `BRD-FR-025` | Draft | +| `FR-DISPATCHDELIVERY-003` | In-Transit Tracking & Proof of Delivery (POD) | `UC-009` | `BRD-FR-026` | Draft | +| `UC-010` | Transport Fleet Registry | — | `BRD-FR-027` | Draft | +| `FR-FLEETREGISTRY-001` | Transport Fleet Registry | `UC-010` | `BRD-FR-027` | Draft | +| `UC-011` | Customer Receivables and Credit Controls | — | `BRD-FR-028`, `BRD-FR-029`, `BRD-FR-030`, `BRD-FR-031` | Draft | +| `FR-CUSTOMERRECEIVABLES-001` | Customer Ledger & Aging Statement | `UC-011` | `BRD-FR-028` | Draft | +| `FR-CUSTOMERRECEIVABLES-002` | Automated Customer Credit Exposure Watch & Threshold Alert | `UC-011` | `BRD-FR-029` | Draft | +| `FR-CUSTOMERRECEIVABLES-003` | Credit Breach Dispatch Lock & Partner Override | `UC-011` | `BRD-FR-030` | Draft | +| `FR-CUSTOMERRECEIVABLES-004` | Customer Payment Receipt Posting | `UC-011` | `BRD-FR-031` | Draft | +| `UC-012` | Supplier Payables and Aging | — | `BRD-FR-032` | Draft | +| `FR-SUPPLIERPAYABLES-001` | Supplier Payables Aging & Balance Snapshots | `UC-012` | `BRD-FR-032` | Draft | +| `UC-013` | Mandi Operating Expense Recording | — | `BRD-FR-033` | Draft | +| `FR-OPERATINGEXPENSES-001` | Mandi Operating Expense Classification & Recording | `UC-013` | `BRD-FR-033` | Draft | +| `UC-014` | Operational Alert Review | — | `BRD-FR-034` | Draft | +| `FR-OPERATIONALALERTS-001` | Real-Time Operational Alerts Engine | `UC-014` | `BRD-FR-034` | Draft | +| `UC-015` | Executive Dashboard and Trading Snapshots | — | `BRD-FR-035`, `BRD-FR-036` | Draft | +| `FR-EXECUTIVEREPORTING-001` | Executive Control Centre Dashboard | `UC-015` | `BRD-FR-035` | Draft | +| `FR-EXECUTIVEREPORTING-002` | 20-Day Consolidated Trading Trend Reporting | `UC-015` | `BRD-FR-036` | Draft | +| `UC-016` | Commodity and Trading Counterparty Master Data | — | `BRD-FR-037`, `BRD-FR-038` | Draft | +| `FR-MASTERDATA-001` | Agricultural Commodity Master Data Management | `UC-016` | `BRD-FR-037` | Draft | +| `FR-MASTERDATA-002` | Trading Counterparty Masters (Suppliers, Customers & Godowns) | `UC-016` | `BRD-FR-038` | Draft | +| `UC-017` | Tenant Isolation, Business Permissions and Audit | — | `BRD-FR-039`, `BRD-FR-040`, `BRD-FR-041` | Draft | +| `FR-TENANTSECURITYAUDIT-001` | Tenant Data Isolation | `UC-017` | `BRD-FR-039` | Draft | +| `FR-TENANTSECURITYAUDIT-002` | Role-Based Access Control (RBAC) & Permission Scoping | `UC-017` | `BRD-FR-040` | Draft | +| `FR-TENANTSECURITYAUDIT-003` | Immutable Transaction Audit Logging | `UC-017` | `BRD-FR-041` | Draft | +| `UC-018` | Tenant Provisioning and Lifecycle | — | `BRD-FR-042` | Draft | +| `FR-TENANTLIFECYCLE-001` | Tenant Provisioning and Lifecycle Management | `UC-018` | `BRD-FR-042` | Draft | +| `UC-019` | Tenant Membership and Verified Context | — | `BRD-FR-043`, `BRD-FR-044` | Draft | +| `FR-TENANTMEMBERSHIPCONTEXT-001` | Tenant Membership and Role Administration | `UC-019` | `BRD-FR-043` | Draft | +| `FR-TENANTMEMBERSHIPCONTEXT-002` | Verified Tenant Context for Every Operation | `UC-019` | `BRD-FR-044` | Draft | +| `UC-020` | Tenant Resource Isolation and Privileged Support | — | `BRD-FR-045`, `BRD-FR-046` | Draft | +| `FR-TENANTSUPPORTSECURITY-001` | End-to-End Tenant Resource Isolation | `UC-020` | `BRD-FR-045` | Draft | +| `FR-TENANTSUPPORTSECURITY-002` | Controlled Privileged Support Access | `UC-020` | `BRD-FR-046` | Draft | +| `UC-021` | Personal Data Purpose, Notice and Consent | — | `BRD-FR-047` | Draft | +| `FR-PRIVACYPURPOSECONSENT-001` | Personal Data Purpose, Notice & Consent Records | `UC-021` | `BRD-FR-047` | Draft | +| `UC-022` | Data Principal Rights and Grievance Requests | — | `BRD-FR-048` | Draft | +| `FR-DATAPRINCIPALRIGHTS-001` | Data Principal Rights & Grievance Case Management | `UC-022` | `BRD-FR-048` | Draft | +| `UC-023` | Personal Data Breach Response Coordination | — | `BRD-FR-049` | Draft | +| `FR-PRIVACYBREACHRESPONSE-001` | Personal Data Breach Response Coordination | `UC-023` | `BRD-FR-049` | Draft | +| `UC-024` | Purpose-Aware Retention, Erasure and Legal Holds | — | `BRD-FR-050` | Draft | +| `FR-RETENTIONERASURE-001` | Purpose-Aware Retention, Erasure & Legal Hold | `UC-024` | `BRD-FR-050` | Draft | +| `UC-025` | Processor and Subprocessor Governance | — | `BRD-FR-051` | Draft | +| `FR-PROCESSORGOVERNANCE-001` | Data Processor & Subprocessor Governance | `UC-025` | `BRD-FR-051` | Draft | +| `UC-026` | Tenant Operating Policy Configuration | — | `BRD-FR-052` | Draft | +| `FR-TENANTOPERATINGPOLICIES-001` | Tenant Operating Policy Configuration & Audit | `UC-026` | `BRD-FR-052` | Draft | diff --git a/04_generated_documentation/01_source_inventories/brd_inventory.md b/04_generated_documentation/01_source_inventories/brd_inventory.md index a09e2dd..40b543d 100644 --- a/04_generated_documentation/01_source_inventories/brd_inventory.md +++ b/04_generated_documentation/01_source_inventories/brd_inventory.md @@ -14,58 +14,58 @@ Every functional feature from PRD §5 is represented once. Stage 1 extraction do | Feature ID | Feature Name | PRD Reference | Primary Actor(s) | Priority | Extracted Business Requirement | Legacy Overlap / Conflict | Downstream Use Case | |---|---|---|---|---|---|---|---| -| `BRD-FR-001` | Daily APMC Mandi Arrival Ingestion & Tracking | §5 | Procurement Executive / Mandi Buyer | P0 | The system must record daily physical arrival volumes at APMC mandi yards across target commodities (Chana, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Mustard, Soybean, Turmeric, Wheat) across monitored markets (Neemuch, Mandsaur, Ratlam, Kota, Indore, Jaora, Ujjain, Chittorgarh). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-002` | Daily Modal & Range Pricing Tracking (₹/Qtl) | §5 | Procurement Executive / Purchase Manager | P0 | For each daily mandi arrival record, the system must capture the quoted price range (Min Rate ₹/Qtl, Max Rate ₹/Qtl) and the official modal clearing price (Modal Rate ₹/Qtl). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-003` | Intraday Price Trend Analysis & 20-Day Benchmark Analytics | §5 | Purchase Manager / Partner | P0 | The system must provide interactive visual charts and trend tables comparing the 20-day historical modal rate trend per commodity across markets, computing 20-day moving averages, 20-day highs/lows, and price velocity. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-004` | Procurement Price Variance Alert vs. Modal Rate | §5 | Purchase Manager | P1 | When booking a purchase sauda, the system must compare the offered trade rate against the latest modal clearing rate for that commodity/mandi. If the offered rate exceeds the modal rate by $>5\%$, the system must display an inline warning and require confirmation. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-005` | Mandi Auction & Direct Purchase Sauda Booking | §5 | Procurement Executive / Purchase Manager | P0 | The system must record purchase contracts (*saudas*) negotiated in mandi auctions or directly with suppliers. Each sauda must capture supplier code, sourcing market, commodity, variety, trade rate (₹/Qtl), estimated bag count, and booked quantity in MT. The system must support multi-truck partial delivery: a sauda may be fulfilled across multiple trucks/GRNs over consecutive delivery days, tracking cumulative received MT and remaining balance MT until fully fulfilled. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-006` | Supplier Credit Terms & Due Date Computation | §5 | Purchase Manager / Accounts Executive | P0 | The system must automatically compute the supplier payment due date by adding the supplier's contractual credit days (e.g., 7, 15, or 21 days) to the sauda or GRN receipt date. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-007` | Mandi Cess & Statutory Levies Apportioning | §5 | Accounts Executive | P1 | The system must calculate statutory mandi cess (e.g., 1.5% APMC market fee + 0.2% Nirashrit fee) based on the gross sauda value and append it to the total procurement cost. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-008` | Inward Vehicle Gate Entry & Verification | §5 | Yard Supervisor | P0 | Upon vehicle arrival at the godown, the Yard Supervisor must log gate entry linking the vehicle registration number and driver details to an active booked sauda. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-009` | Weighbridge Gross & Tare Weighment Logging | §5 | Yard Supervisor | P0 | The system must record dual-phase weighbridge measurements for incoming trucks: (1) Gross Weighment (truck + commodity) upon arrival, and (2) Tare Weighment (empty truck) after unloading. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-010` | Bag Tare Deduction (*Bardana Katai*) & Final Net MT | §5 | Yard Supervisor | P0 | The system must deduct the weight of packaging bags from the gross commodity weight using the defined tare deduction factor (default 1.0 kg/gunny bag) to calculate true Net Payable MT. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-011` | Weighment Tolerance & Transit Shortage Verification | §5 | Yard Supervisor / Purchase Manager | P0 | The system must compare the Final Net Weighbridge MT against the Booked Sauda MT. If shortage exceeds $0.5\%$, the system must flag a `Transit Shortage Warning` and adjust the final payable amount to the actual net received weight. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-012` | Goods Receipt Note (GRN) Posting & Warehouse Stack Placement | §5 | Yard Supervisor | P0 | Upon weighment completion, the system must generate a formal GRN document, allocate the physical goods to a specific warehouse/godown and stack location, credit the warehouse stock book, and mint an inward Commodity Lot. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-013` | Mandatory Lot & Batch Identity Generation | §5 | Yard Supervisor / Quality Officer | P0 | The system must automatically generate a globally unique, immutable Lot ID (`LOT-YYYYMM-xxx`) for every inward consignment processed through a GRN. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-014` | Inward Quality Inspection Parameter Recording | §5 | Quality Officer | P0 | The Quality Officer must log laboratory/physical test parameters for the lot: Moisture %, Foreign Matter / Dust %, Admixture (other grains) %, Damaged / Discolored %, and Weevil count. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-015` | Quality Deduction / Rebate Calculation | §5 | Quality Officer / Accounts Executive | P1 | If moisture or foreign matter exceeds standard contract baselines (e.g., standard moisture baseline 10.0%), the system must automatically compute a quality price deduction (e.g., ₹10 deduction per quintal for each 0.5% moisture above baseline). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-016` | Finite State Machine Enforcement for `QC Hold` vs. `Released` | §5 | Quality Officer | P0 | The system must enforce strict FSM transitions on the Lot record. If moisture $>12\%$ or foreign matter $>2\%$, the lot must be transitioned to `QC Hold`. A lot on `QC Hold` is programmatically blocked from sales order allocation and dispatch loading. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-017` | Lot Splitting & Blending Traceability | §5 | Yard Supervisor / Quality Officer | P1 | The system must support splitting a parent lot into sub-lots (e.g., when dividing a consignment across two warehouses) or blending multiple lots, maintaining parent-child lineage in the traceability graph. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-018` | Multi-Godown Dual-Unit Stock Ledger | §5 | Yard Supervisor / Management | P0 | The system must maintain a real-time, double-entry stock ledger tracking commodity positions across warehouses (WH-01 Neemuch Main Yard, WH-02 Neemuch North Godown, WH-03 Mandsaur Transit Godown, WH-04 Indore Buffer Depot). For each commodity, variety, and grade, it must maintain Opening Stock MT, Received MT, Dispatched MT, Closing Stock MT, and physical Bag counts. The system must support Periodic Physical Stock Audits: recording physical tally counts against book balances and generating supervisor-authorized Stock Adjustment Vouchers capturing natural storage loss/gain (*ghat / nami* due to moisture evaporation or seasonal humidity) or handling spillage with mandatory reason codes. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-019` | Godown Capacity & Volume Utilization Tracking | §5 | Yard Supervisor / Partner | P0 | The system must track the physical storage capacity of each warehouse in Metric Tonnes and calculate real-time percentage utilization: | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-020` | Godown-to-Godown Internal Stock Transfer | §5 | Yard Supervisor / Logistics Coordinator | P0 | The system must support recording stock transfers between godowns (e.g., from Mandsaur Transit Godown to Neemuch Main Yard), logging origin outward deduction, in-transit state, destination weighment, and destination inward credit. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-021` | Customer Sales Contract Booking | §5 | Sales Manager / Sales Executive | P0 | The system must record customer sales orders/contracts specifying customer code, destination city, customer segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), commodity, variety, grade, contracted quantity in MT, contract rate in ₹/Qtl, and delivery timeline. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-022` | Customer Credit Limit & Pre-Order Exposure Verification | §5 | Sales Manager / Accounts Executive | P0 | Prior to confirming a sales order, the system must evaluate the customer's current outstanding receivables plus the value of the new order against their sanctioned credit limit. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-023` | Sales Order Inventory Allocation | §5 | Sales Manager / Yard Supervisor | P0 | The Sales Manager must allocate specific available inventory lot(s) from a warehouse to a confirmed sales order. The system must verify that selected lots are in `Released` state and have sufficient unreserved balance. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-024` | Outbound Dispatch Board Console | §5 | Logistics Coordinator | P0 | The system must provide a visual dispatch management board displaying scheduled, loading, and in-transit consignments, matching confirmed sales orders to allocated warehouse lots and transport vehicles. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-025` | Outbound Weighbridge & Dispatch Bilty/Manifest | §5 | Yard Supervisor / Logistics Coordinator | P0 | The system must capture outward weighbridge weights for loaded dispatch trucks (Tare truck before loading, Gross truck after loading), verify loaded weight against order MT, and generate a printable transport manifest / Bilty. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-026` | In-Transit Tracking & Proof of Delivery (POD) | §5 | Logistics Coordinator | P0 | The system must track dispatch states from `In Transit` to `Delivered`. Upon consignee receipt, the Logistics Coordinator logs confirmation date, destination weighment, and uploads POD document reference. If destination weighment or quality parameters reveal a transit shortage or damage acknowledged by the buyer, the system must allow recording a Consignee Shortage Note and automatically generating a compensating Sales Credit Note against the customer ledger without altering the immutable outbound dispatch manifest. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-027` | Transport Fleet Registry | §5 | Logistics Coordinator | P1 | The system must maintain a registry of transport trucks (owned and contract carriers) including registration number, vehicle model, gross payload capacity in MT, ownership type (`Own` vs `Contract`), insurance/fitness expiry dates, and operational status (`Available`, `On Route`, `Maintenance`). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-028` | Customer Ledger & Aging Statement | §5 | Accounts Executive / Sales Manager | P0 | The system must maintain an immutable party sub-ledger for each customer, debiting finalized sales invoices, crediting payment receipts, and presenting a real-time outstanding balance and aging schedule (0–7 days, 8–15 days, 16–30 days, >30 days). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-029` | Automated Customer Credit Exposure Watch & Threshold Alert | §5 | Accounts Executive / Partner | P0 | The system must continuously recompute the customer exposure ratio ($\text{Outstanding} / \text{Credit Limit}$). If exposure $>80\%$, the account must be automatically tagged with a visual `Watch` badge, and an operational warning alert generated on the Executive Dashboard. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-030` | Credit Breach Dispatch Lock & Partner Override | §5 | Partner / Managing Director | P0 | If a customer's outstanding receivables exceed 100% of their sanctioned credit limit, all pending dispatches for that customer must be locked. Only a Partner user can record an explicit electronic approval override with mandatory justification notes to release the lock. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-031` | Customer Payment Receipt Posting | §5 | Accounts Executive | P0 | The system must record customer payments capturing payment date, customer code, received amount in INR, payment instrument mode (`NEFT`, `RTGS`, `Cheque`, `Cash`, `UPI`), bank reference/UTR number, and payment status (`Pending Clearance`, `Cleared`, `Bounced`). The system must enforce automatic reversal upon Cheque/Instrument Bounce: if an instrument status transitions to `Bounced`, the system must immediately reverse the credit entry on the customer sub-ledger, restore the previous outstanding debt, recompute exposure ratio %, reinstate credit locks if exposure $>100\%$, and trigger an urgent financial alert. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-032` | Supplier Payables Aging & Balance Snapshots | §5 | Accounts Executive / Partner | P0 | The system must track supplier payables arising from accepted GRNs, applying supplier credit days, generating aging schedules, and providing daily aggregate payables snapshots. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-033` | Mandi Operating Expense Classification & Recording | §5 | Accounts Executive | P1 | The system must record operational expenses incurred in mandi and godown operations categorizing entries under: Labor / Hamali (loading/unloading), Freight / Cartage, Weighbridge Fees, Godown Rent, Mandi Cess, Pest Control/Fumigation, and Office Expenses. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-034` | Real-Time Operational Alerts Engine | §5 | Partner / Operations Supervisor | P0 | The system must evaluate active business data and publish automated proactive alerts across four critical categories: | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-035` | Executive Control Centre Dashboard | §5 | Partner / Managing Director | P0 | The system must provide a unified operational dashboard displaying real-time metrics: Total Stock on Hand (MT), Total Active Stock Lines, Intraday Purchase Value INR, Intraday Sales Revenue INR, Total Customer Receivables INR, Top 10 Stock Lines by Volume, Top Recent Sales, and Warehouse Utilization Barometers. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-036` | 20-Day Consolidated Trading Trend Reporting | §5 | Partner / Managing Director | P0 | The system must compile daily management snapshots across a rolling 20-day trading window, tabulating: Date, Purchases MT, Sales MT, Closing Stock MT, Total Receivables INR, and Total Payables INR. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-037` | Agricultural Commodity Master Data Management | §5 | System Administrator | P0 | Maintain authoritative master catalogs for: Commodities (Chana, Soybean, Mustard, Wheat, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Turmeric), Varieties per commodity (e.g., Lokwan, Pusa, Eagle/Badami), and Commercial Quality Grades (`FAQ`, `Premium`, `Below FAQ`). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-038` | Trading Counterparty Masters (Suppliers, Customers & Godowns) | §5 | System Administrator / Accounts Executive | P0 | Maintain registries for: (1) Suppliers (Code, Name, City, Segment, Credit Days: 7/15/21), (2) Customers (Code, Name, City, Segment, Credit Limit INR, Contact), and (3) Godowns/Warehouses (Code, Name, City, Capacity MT). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-039` | Tenant Data Isolation | §5 | System Administrator | P0 | Each independent trading enterprise is a tenant; its branches and godowns operate within that tenant boundary. Users and transactions must be associated with the correct tenant, and access to one tenant’s business data must not expose another tenant’s data. The isolation implementation must conform to the active technology profile. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-040` | Role-Based Access Control (RBAC) & Permission Scoping | §5 | System Administrator | P0 | Access to business records and actions must be governed by role-based permissions for the roles defined in this PRD: `Tenant Administrator`, `Mandi Buyer`, `Purchase Manager`, `Yard Supervisor`, `Quality Officer`, `Sales Executive`, `Sales Manager`, `Logistics Coordinator`, `Accounts Executive`, `Partner / MD`, and `System Administrator`. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-041` | Immutable Transaction Audit Logging | §5 | System Administrator | P0 | Submitted business records (GRNs, Sales Orders, Dispatches, Payment Receipts) must preserve an auditable history. Corrections must not silently rewrite the business history. The system must record user ID, timestamp, and the changed values for governed mutations. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-042` | Tenant Provisioning and Lifecycle Management | §5 | System Administrator | P0 | Public self-service tenant signup is out of scope for v1. An authorized platform administrator must create and configure each tenant, assign its initial Tenant Administrator, and activate, suspend, or close the tenant through a controlled lifecycle. Tenant lifecycle changes must not silently delete or expose business records. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-043` | Tenant Membership and Role Administration | §5 | Tenant Administrator | P0 | A person may hold active memberships in multiple tenants. A Tenant Administrator must be able to add, deactivate, and assign approved business roles to users within their own tenant. A tenant administrator must not manage users or roles belonging to another tenant. Platform-level administrators and tenant-level administrators must have distinct permissions. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-044` | Verified Tenant Context for Every Operation | §5 | All authenticated users | P0 | The service must derive the effective tenant context from the authenticated user’s verified tenant membership. A client-supplied tenant identifier alone must never grant or switch tenant access. A user associated with multiple tenants must explicitly select the active tenant after sign-in; the service verifies that membership and its role for every request before permitting action in that tenant. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-045` | End-to-End Tenant Resource Isolation | §5 | All users; System Administrator for platform controls | P0 | Tenant isolation must apply to all tenant-owned records and derived resources, including database reads and writes, API lookups, search/report results, exports, uploaded files, cache entries, and queued/background work. Cross-tenant access attempts must fail closed and must not reveal whether another tenant’s resource exists. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-046` | Controlled Privileged Support Access | §5 | System Administrator | P0 | Platform support must not imply routine unrestricted access to tenant business data. Support staff have no standing access to tenant business data. Ordinary exceptional access requires approval by that tenant’s Tenant Administrator for a specific support case and a limited duration. For an urgent incident, a designated platform security administrator may grant a break-glass access window of at most one hour, with a recorded reason, immediate audit alert, and notice to the tenant administrator within one business day. All access is recorded for tenant and platform security review. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-047` | Personal Data Purpose, Notice & Consent Records | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | The service must allow each responsible Data Fiduciary to determine and approve the processing purpose, applicable lawful basis, and privacy notice for its processing, then document personal-data categories, purpose, basis, notice version, and accountable contact. Tenant firms own these decisions for trading data; the ATB operator records them separately for its own account, security, and service processing. Privacy controls cover every natural person whose personal data is processed in tenant or platform contexts, whether or not that person has an application account. Where consent is the applicable basis, the service must capture evidence of the notice and consent, support withdrawal, and record resulting processing restrictions. Tenant and platform processing contexts must remain distinguishable. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-048` | Data Principal Rights & Grievance Case Management | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | The service must support receipt, identity verification, routing, tracking, response, and evidence retention for Data Principal requests and grievances concerning access to information, correction, erasure, consent withdrawal, grievance redressal, and nomination, as applicable, including for individuals who do not hold application accounts. Requests must be routed to the responsible Data Fiduciary and handled within the applicable statutory or approved contractual time limit. A request channel must be available without requiring a general customer or supplier portal account. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-049` | Personal Data Breach Response Coordination | §5 | System Administrator; Tenant Administrator for tenant-scoped incidents | P0 | The service must support recording, triaging, investigation, impact assessment, remediation, and notification coordination for suspected or confirmed personal-data breaches. The platform operator must be able to identify affected tenants and notify the responsible tenant Data Fiduciary promptly when acting as its Data Processor. The workflow must support applicable notification content and deadlines to affected Data Principals and the Data Protection Board, including phased or subsequently amended statutory requirements. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-050` | Purpose-Aware Retention, Erasure & Legal Hold | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | Use four internal sensitivity levels—Public, Internal, Confidential, and Restricted—with a separate personal-data flag and processing-purpose tag; these are product handling labels, not statutory DPDP classifications. The responsible Data Fiduciary must approve retention schedules by personal-data category and processing purpose after legal/accounting review (tenant firms for trading data; ATB operator for its own account, security, and service data). Authorized operators must be able to apply these schedules by tenant/platform responsibility and applicable legal obligation. The service must support correction, erasure or irreversible de-identification when required, legal holds and statutory retention exceptions, and deletion handling for derived copies and processors, including backups according to the approved schedule. Statutory processing-log retention requirements must be represented separately from general business-record retention. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-051` | Data Processor & Subprocessor Governance | §5 | System Administrator | P0 | The platform operator must maintain an inventory of processors and subprocessors used for tenant personal data, their processing purpose and location, applicable safeguards and contractual obligations, and status of due diligence. The operator must support tenant Data Fiduciaries with information and operational assistance needed for security safeguards, Data Principal requests, breach response, retention, and erasure obligations. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | -| `BRD-FR-052` | Tenant Operating Policy Configuration & Audit | §5 | Partner / Managing Director; authorized tenant functional managers | P0 | The service must provide tenant-scoped configuration for the provisional operating thresholds listed in §6.2, including market-price variance, weighment shortage, bag tare/packing, commodity quality grading/deductions, credit exposure, warehouse capacity/adjustments/transfers, dispatch tolerances, and alert timing. Policies must support commodity, grade, contract, or other applicable scope and effective dates where needed. Only roles authorized in the tenant permission model may change them; changes must record actor, timestamp, reason, prior value, and new value. Seed values remain provisional. Before each affected live workflow is enabled for a tenant, that tenant’s Partner/Managing Director or delegated authorized business owner must review and confirm or edit every applicable threshold. Missing or unreviewed thresholds block only the affected risk-sensitive workflow. Confirmed policies are versioned with an effective date and changes are audited. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | Not yet mapped (Stage 5) | +| `BRD-FR-001` | Daily APMC Mandi Arrival Ingestion & Tracking | §5 | Procurement Executive / Mandi Buyer | P0 | The system must record daily physical arrival volumes at APMC mandi yards across target commodities (Chana, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Mustard, Soybean, Turmeric, Wheat) across monitored markets (Neemuch, Mandsaur, Ratlam, Kota, Indore, Jaora, Ujjain, Chittorgarh). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-002` | +| `BRD-FR-002` | Daily Modal & Range Pricing Tracking (₹/Qtl) | §5 | Procurement Executive / Purchase Manager | P0 | For each daily mandi arrival record, the system must capture the quoted price range (Min Rate ₹/Qtl, Max Rate ₹/Qtl) and the official modal clearing price (Modal Rate ₹/Qtl). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-002` | +| `BRD-FR-003` | Intraday Price Trend Analysis & 20-Day Benchmark Analytics | §5 | Purchase Manager / Partner | P0 | The system must provide interactive visual charts and trend tables comparing the 20-day historical modal rate trend per commodity across markets, computing 20-day moving averages, 20-day highs/lows, and price velocity. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-003` | +| `BRD-FR-004` | Procurement Price Variance Alert vs. Modal Rate | §5 | Purchase Manager | P1 | When booking a purchase sauda, the system must compare the offered trade rate against the latest modal clearing rate for that commodity/mandi. If the offered rate exceeds the modal rate by $>5\%$, the system must display an inline warning and require confirmation. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-004` | +| `BRD-FR-005` | Mandi Auction & Direct Purchase Sauda Booking | §5 | Procurement Executive / Purchase Manager | P0 | The system must record purchase contracts (*saudas*) negotiated in mandi auctions or directly with suppliers. Each sauda must capture supplier code, sourcing market, commodity, variety, trade rate (₹/Qtl), estimated bag count, and booked quantity in MT. The system must support multi-truck partial delivery: a sauda may be fulfilled across multiple trucks/GRNs over consecutive delivery days, tracking cumulative received MT and remaining balance MT until fully fulfilled. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-004` | +| `BRD-FR-006` | Supplier Credit Terms & Due Date Computation | §5 | Purchase Manager / Accounts Executive | P0 | The system must automatically compute the supplier payment due date by adding the supplier's contractual credit days (e.g., 7, 15, or 21 days) to the sauda or GRN receipt date. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-004` | +| `BRD-FR-007` | Mandi Cess & Statutory Levies Apportioning | §5 | Accounts Executive | P1 | The system must calculate statutory mandi cess (e.g., 1.5% APMC market fee + 0.2% Nirashrit fee) based on the gross sauda value and append it to the total procurement cost. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-004` | +| `BRD-FR-008` | Inward Vehicle Gate Entry & Verification | §5 | Yard Supervisor | P0 | Upon vehicle arrival at the godown, the Yard Supervisor must log gate entry linking the vehicle registration number and driver details to an active booked sauda. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-009` | Weighbridge Gross & Tare Weighment Logging | §5 | Yard Supervisor | P0 | The system must record dual-phase weighbridge measurements for incoming trucks: (1) Gross Weighment (truck + commodity) upon arrival, and (2) Tare Weighment (empty truck) after unloading. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-010` | Bag Tare Deduction (*Bardana Katai*) & Final Net MT | §5 | Yard Supervisor | P0 | The system must deduct the weight of packaging bags from the gross commodity weight using the defined tare deduction factor (default 1.0 kg/gunny bag) to calculate true Net Payable MT. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-011` | Weighment Tolerance & Transit Shortage Verification | §5 | Yard Supervisor / Purchase Manager | P0 | The system must compare the Final Net Weighbridge MT against the Booked Sauda MT. If shortage exceeds $0.5\%$, the system must flag a `Transit Shortage Warning` and adjust the final payable amount to the actual net received weight. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-012` | Goods Receipt Note (GRN) Posting & Warehouse Stack Placement | §5 | Yard Supervisor | P0 | Upon weighment completion, the system must generate a formal GRN document, allocate the physical goods to a specific warehouse/godown and stack location, credit the warehouse stock book, and mint an inward Commodity Lot. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-013` | Mandatory Lot & Batch Identity Generation | §5 | Yard Supervisor / Quality Officer | P0 | The system must automatically generate a globally unique, immutable Lot ID (`LOT-YYYYMM-xxx`) for every inward consignment processed through a GRN. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-005` | +| `BRD-FR-014` | Inward Quality Inspection Parameter Recording | §5 | Quality Officer | P0 | The Quality Officer must log laboratory/physical test parameters for the lot: Moisture %, Foreign Matter / Dust %, Admixture (other grains) %, Damaged / Discolored %, and Weevil count. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-006` | +| `BRD-FR-015` | Quality Deduction / Rebate Calculation | §5 | Quality Officer / Accounts Executive | P1 | If moisture or foreign matter exceeds standard contract baselines (e.g., standard moisture baseline 10.0%), the system must automatically compute a quality price deduction (e.g., ₹10 deduction per quintal for each 0.5% moisture above baseline). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-006` | +| `BRD-FR-016` | Finite State Machine Enforcement for `QC Hold` vs. `Released` | §5 | Quality Officer | P0 | The system must enforce strict FSM transitions on the Lot record. If moisture $>12\%$ or foreign matter $>2\%$, the lot must be transitioned to `QC Hold`. A lot on `QC Hold` is programmatically blocked from sales order allocation and dispatch loading. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-006` | +| `BRD-FR-017` | Lot Splitting & Blending Traceability | §5 | Yard Supervisor / Quality Officer | P1 | The system must support splitting a parent lot into sub-lots (e.g., when dividing a consignment across two warehouses) or blending multiple lots, maintaining parent-child lineage in the traceability graph. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-006` | +| `BRD-FR-018` | Multi-Godown Dual-Unit Stock Ledger | §5 | Yard Supervisor / Management | P0 | The system must maintain a real-time, double-entry stock ledger tracking commodity positions across warehouses (WH-01 Neemuch Main Yard, WH-02 Neemuch North Godown, WH-03 Mandsaur Transit Godown, WH-04 Indore Buffer Depot). For each commodity, variety, and grade, it must maintain Opening Stock MT, Received MT, Dispatched MT, Closing Stock MT, and physical Bag counts. The system must support Periodic Physical Stock Audits: recording physical tally counts against book balances and generating supervisor-authorized Stock Adjustment Vouchers capturing natural storage loss/gain (*ghat / nami* due to moisture evaporation or seasonal humidity) or handling spillage with mandatory reason codes. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-007` | +| `BRD-FR-019` | Godown Capacity & Volume Utilization Tracking | §5 | Yard Supervisor / Partner | P0 | The system must track the physical storage capacity of each warehouse in Metric Tonnes and calculate real-time percentage utilization: | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-007` | +| `BRD-FR-020` | Godown-to-Godown Internal Stock Transfer | §5 | Yard Supervisor / Logistics Coordinator | P0 | The system must support recording stock transfers between godowns (e.g., from Mandsaur Transit Godown to Neemuch Main Yard), logging origin outward deduction, in-transit state, destination weighment, and destination inward credit. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-007` | +| `BRD-FR-021` | Customer Sales Contract Booking | §5 | Sales Manager / Sales Executive | P0 | The system must record customer sales orders/contracts specifying customer code, destination city, customer segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), commodity, variety, grade, contracted quantity in MT, contract rate in ₹/Qtl, and delivery timeline. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-008` | +| `BRD-FR-022` | Customer Credit Limit & Pre-Order Exposure Verification | §5 | Sales Manager / Accounts Executive | P0 | Prior to confirming a sales order, the system must evaluate the customer's current outstanding receivables plus the value of the new order against their sanctioned credit limit. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-008` | +| `BRD-FR-023` | Sales Order Inventory Allocation | §5 | Sales Manager / Yard Supervisor | P0 | The Sales Manager must allocate specific available inventory lot(s) from a warehouse to a confirmed sales order. The system must verify that selected lots are in `Released` state and have sufficient unreserved balance. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-008` | +| `BRD-FR-024` | Outbound Dispatch Board Console | §5 | Logistics Coordinator | P0 | The system must provide a visual dispatch management board displaying scheduled, loading, and in-transit consignments, matching confirmed sales orders to allocated warehouse lots and transport vehicles. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-009` | +| `BRD-FR-025` | Outbound Weighbridge & Dispatch Bilty/Manifest | §5 | Yard Supervisor / Logistics Coordinator | P0 | The system must capture outward weighbridge weights for loaded dispatch trucks (Tare truck before loading, Gross truck after loading), verify loaded weight against order MT, and generate a printable transport manifest / Bilty. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-009` | +| `BRD-FR-026` | In-Transit Tracking & Proof of Delivery (POD) | §5 | Logistics Coordinator | P0 | The system must track dispatch states from `In Transit` to `Delivered`. Upon consignee receipt, the Logistics Coordinator logs confirmation date, destination weighment, and uploads POD document reference. If destination weighment or quality parameters reveal a transit shortage or damage acknowledged by the buyer, the system must allow recording a Consignee Shortage Note and automatically generating a compensating Sales Credit Note against the customer ledger without altering the immutable outbound dispatch manifest. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-009` | +| `BRD-FR-027` | Transport Fleet Registry | §5 | Logistics Coordinator | P1 | The system must maintain a registry of transport trucks (owned and contract carriers) including registration number, vehicle model, gross payload capacity in MT, ownership type (`Own` vs `Contract`), insurance/fitness expiry dates, and operational status (`Available`, `On Route`, `Maintenance`). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-010` | +| `BRD-FR-028` | Customer Ledger & Aging Statement | §5 | Accounts Executive / Sales Manager | P0 | The system must maintain an immutable party sub-ledger for each customer, debiting finalized sales invoices, crediting payment receipts, and presenting a real-time outstanding balance and aging schedule (0–7 days, 8–15 days, 16–30 days, >30 days). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-011` | +| `BRD-FR-029` | Automated Customer Credit Exposure Watch & Threshold Alert | §5 | Accounts Executive / Partner | P0 | The system must continuously recompute the customer exposure ratio ($\text{Outstanding} / \text{Credit Limit}$). If exposure $>80\%$, the account must be automatically tagged with a visual `Watch` badge, and an operational warning alert generated on the Executive Dashboard. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-011` | +| `BRD-FR-030` | Credit Breach Dispatch Lock & Partner Override | §5 | Partner / Managing Director | P0 | If a customer's outstanding receivables exceed 100% of their sanctioned credit limit, all pending dispatches for that customer must be locked. Only a Partner user can record an explicit electronic approval override with mandatory justification notes to release the lock. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-011` | +| `BRD-FR-031` | Customer Payment Receipt Posting | §5 | Accounts Executive | P0 | The system must record customer payments capturing payment date, customer code, received amount in INR, payment instrument mode (`NEFT`, `RTGS`, `Cheque`, `Cash`, `UPI`), bank reference/UTR number, and payment status (`Pending Clearance`, `Cleared`, `Bounced`). The system must enforce automatic reversal upon Cheque/Instrument Bounce: if an instrument status transitions to `Bounced`, the system must immediately reverse the credit entry on the customer sub-ledger, restore the previous outstanding debt, recompute exposure ratio %, reinstate credit locks if exposure $>100\%$, and trigger an urgent financial alert. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-011` | +| `BRD-FR-032` | Supplier Payables Aging & Balance Snapshots | §5 | Accounts Executive / Partner | P0 | The system must track supplier payables arising from accepted GRNs, applying supplier credit days, generating aging schedules, and providing daily aggregate payables snapshots. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-012` | +| `BRD-FR-033` | Mandi Operating Expense Classification & Recording | §5 | Accounts Executive | P1 | The system must record operational expenses incurred in mandi and godown operations categorizing entries under: Labor / Hamali (loading/unloading), Freight / Cartage, Weighbridge Fees, Godown Rent, Mandi Cess, Pest Control/Fumigation, and Office Expenses. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-013` | +| `BRD-FR-034` | Real-Time Operational Alerts Engine | §5 | Partner / Operations Supervisor | P0 | The system must evaluate active business data and publish automated proactive alerts across four critical categories: | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-014` | +| `BRD-FR-035` | Executive Control Centre Dashboard | §5 | Partner / Managing Director | P0 | The system must provide a unified operational dashboard displaying real-time metrics: Total Stock on Hand (MT), Total Active Stock Lines, Intraday Purchase Value INR, Intraday Sales Revenue INR, Total Customer Receivables INR, Top 10 Stock Lines by Volume, Top Recent Sales, and Warehouse Utilization Barometers. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-015` | +| `BRD-FR-036` | 20-Day Consolidated Trading Trend Reporting | §5 | Partner / Managing Director | P0 | The system must compile daily management snapshots across a rolling 20-day trading window, tabulating: Date, Purchases MT, Sales MT, Closing Stock MT, Total Receivables INR, and Total Payables INR. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-015` | +| `BRD-FR-037` | Agricultural Commodity Master Data Management | §5 | System Administrator | P0 | Maintain authoritative master catalogs for: Commodities (Chana, Soybean, Mustard, Wheat, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Turmeric), Varieties per commodity (e.g., Lokwan, Pusa, Eagle/Badami), and Commercial Quality Grades (`FAQ`, `Premium`, `Below FAQ`). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-016` | +| `BRD-FR-038` | Trading Counterparty Masters (Suppliers, Customers & Godowns) | §5 | System Administrator / Accounts Executive | P0 | Maintain registries for: (1) Suppliers (Code, Name, City, Segment, Credit Days: 7/15/21), (2) Customers (Code, Name, City, Segment, Credit Limit INR, Contact), and (3) Godowns/Warehouses (Code, Name, City, Capacity MT). | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-016` | +| `BRD-FR-039` | Tenant Data Isolation | §5 | System Administrator | P0 | Each independent trading enterprise is a tenant; its branches and godowns operate within that tenant boundary. Users and transactions must be associated with the correct tenant, and access to one tenant’s business data must not expose another tenant’s data. The isolation implementation must conform to the active technology profile. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-017` | +| `BRD-FR-040` | Role-Based Access Control (RBAC) & Permission Scoping | §5 | System Administrator | P0 | Access to business records and actions must be governed by role-based permissions for the roles defined in this PRD: `Tenant Administrator`, `Mandi Buyer`, `Purchase Manager`, `Yard Supervisor`, `Quality Officer`, `Sales Executive`, `Sales Manager`, `Logistics Coordinator`, `Accounts Executive`, `Partner / MD`, and `System Administrator`. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-017` | +| `BRD-FR-041` | Immutable Transaction Audit Logging | §5 | System Administrator | P0 | Submitted business records (GRNs, Sales Orders, Dispatches, Payment Receipts) must preserve an auditable history. Corrections must not silently rewrite the business history. The system must record user ID, timestamp, and the changed values for governed mutations. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-017` | +| `BRD-FR-042` | Tenant Provisioning and Lifecycle Management | §5 | System Administrator | P0 | Public self-service tenant signup is out of scope for v1. An authorized platform administrator must create and configure each tenant, assign its initial Tenant Administrator, and activate, suspend, or close the tenant through a controlled lifecycle. Tenant lifecycle changes must not silently delete or expose business records. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-018` | +| `BRD-FR-043` | Tenant Membership and Role Administration | §5 | Tenant Administrator | P0 | A person may hold active memberships in multiple tenants. A Tenant Administrator must be able to add, deactivate, and assign approved business roles to users within their own tenant. A tenant administrator must not manage users or roles belonging to another tenant. Platform-level administrators and tenant-level administrators must have distinct permissions. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-019` | +| `BRD-FR-044` | Verified Tenant Context for Every Operation | §5 | All authenticated users | P0 | The service must derive the effective tenant context from the authenticated user’s verified tenant membership. A client-supplied tenant identifier alone must never grant or switch tenant access. A user associated with multiple tenants must explicitly select the active tenant after sign-in; the service verifies that membership and its role for every request before permitting action in that tenant. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-019` | +| `BRD-FR-045` | End-to-End Tenant Resource Isolation | §5 | All users; System Administrator for platform controls | P0 | Tenant isolation must apply to all tenant-owned records and derived resources, including database reads and writes, API lookups, search/report results, exports, uploaded files, cache entries, and queued/background work. Cross-tenant access attempts must fail closed and must not reveal whether another tenant’s resource exists. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-020` | +| `BRD-FR-046` | Controlled Privileged Support Access | §5 | System Administrator | P0 | Platform support must not imply routine unrestricted access to tenant business data. Support staff have no standing access to tenant business data. Ordinary exceptional access requires approval by that tenant’s Tenant Administrator for a specific support case and a limited duration. For an urgent incident, a designated platform security administrator may grant a break-glass access window of at most one hour, with a recorded reason, immediate audit alert, and notice to the tenant administrator within one business day. All access is recorded for tenant and platform security review. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-020` | +| `BRD-FR-047` | Personal Data Purpose, Notice & Consent Records | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | The service must allow each responsible Data Fiduciary to determine and approve the processing purpose, applicable lawful basis, and privacy notice for its processing, then document personal-data categories, purpose, basis, notice version, and accountable contact. Tenant firms own these decisions for trading data; the ATB operator records them separately for its own account, security, and service processing. Privacy controls cover every natural person whose personal data is processed in tenant or platform contexts, whether or not that person has an application account. Where consent is the applicable basis, the service must capture evidence of the notice and consent, support withdrawal, and record resulting processing restrictions. Tenant and platform processing contexts must remain distinguishable. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-021` | +| `BRD-FR-048` | Data Principal Rights & Grievance Case Management | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | The service must support receipt, identity verification, routing, tracking, response, and evidence retention for Data Principal requests and grievances concerning access to information, correction, erasure, consent withdrawal, grievance redressal, and nomination, as applicable, including for individuals who do not hold application accounts. Requests must be routed to the responsible Data Fiduciary and handled within the applicable statutory or approved contractual time limit. A request channel must be available without requiring a general customer or supplier portal account. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-022` | +| `BRD-FR-049` | Personal Data Breach Response Coordination | §5 | System Administrator; Tenant Administrator for tenant-scoped incidents | P0 | The service must support recording, triaging, investigation, impact assessment, remediation, and notification coordination for suspected or confirmed personal-data breaches. The platform operator must be able to identify affected tenants and notify the responsible tenant Data Fiduciary promptly when acting as its Data Processor. The workflow must support applicable notification content and deadlines to affected Data Principals and the Data Protection Board, including phased or subsequently amended statutory requirements. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-023` | +| `BRD-FR-050` | Purpose-Aware Retention, Erasure & Legal Hold | §5 | Tenant Administrator; System Administrator for platform-controlled processing | P0 | Use four internal sensitivity levels—Public, Internal, Confidential, and Restricted—with a separate personal-data flag and processing-purpose tag; these are product handling labels, not statutory DPDP classifications. The responsible Data Fiduciary must approve retention schedules by personal-data category and processing purpose after legal/accounting review (tenant firms for trading data; ATB operator for its own account, security, and service data). Authorized operators must be able to apply these schedules by tenant/platform responsibility and applicable legal obligation. The service must support correction, erasure or irreversible de-identification when required, legal holds and statutory retention exceptions, and deletion handling for derived copies and processors, including backups according to the approved schedule. Statutory processing-log retention requirements must be represented separately from general business-record retention. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-024` | +| `BRD-FR-051` | Data Processor & Subprocessor Governance | §5 | System Administrator | P0 | The platform operator must maintain an inventory of processors and subprocessors used for tenant personal data, their processing purpose and location, applicable safeguards and contractual obligations, and status of due diligence. The operator must support tenant Data Fiduciaries with information and operational assistance needed for security safeguards, Data Principal requests, breach response, retention, and erasure obligations. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-025` | +| `BRD-FR-052` | Tenant Operating Policy Configuration & Audit | §5 | Partner / Managing Director; authorized tenant functional managers | P0 | The service must provide tenant-scoped configuration for the provisional operating thresholds listed in §6.2, including market-price variance, weighment shortage, bag tare/packing, commodity quality grading/deductions, credit exposure, warehouse capacity/adjustments/transfers, dispatch tolerances, and alert timing. Policies must support commodity, grade, contract, or other applicable scope and effective dates where needed. Only roles authorized in the tenant permission model may change them; changes must record actor, timestamp, reason, prior value, and new value. Seed values remain provisional. Before each affected live workflow is enabled for a tenant, that tenant’s Partner/Managing Director or delegated authorized business owner must review and confirm or edit every applicable threshold. Missing or unreviewed thresholds block only the affected risk-sensitive workflow. Confirmed policies are versioned with an effective date and changes are audited. | Not assessed (Greenfield; Stage 1 is independent of reference mockup/legacy behavior) | `UC-026` | ## Extracted Non-Functional Requirements (`BRD-NFR-xxx`) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/functional-reqs.md new file mode 100644 index 0000000..551d3d9 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/functional-reqs.md @@ -0,0 +1,53 @@ +--- +id: UC-002-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-002 Record Daily Mandi Arrivals and Prices + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-002` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-MKT-001: Capture Daily Mandi Arrival Observations + +- **Requirement ID:** `FR-MKT-001` +- **Parent UC:** `UC-002` +- **Source Feature:** `BRD-FR-001` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Market Desk daily observation entry and list (route TBD in Stage 11) +- **Business Rules:** Observation date cannot be in the future; arrival quantity must be ≥ 0.0 MT; duplicate observations for the same market, commodity, variety, and date are blocked; when arrival data is unavailable due to a holiday or strike, the market can be flagged `Closed / Mandi Holiday`. + +### Statement + +The system shall allow an authorized Procurement Executive / Mandi Buyer to record a daily APMC mandi observation for a monitored market yard and commodity, including observation date, market yard, commodity, variety, grade, arrival quantity in MT, internal stock position in MT, observation source, and timestamp. The system shall reject future observation dates, negative arrival quantities, and duplicate observations with the same market, commodity, variety, and date. When arrival data is unavailable because of a holiday or strike, the system shall allow the actor to flag the market as `Closed / Mandi Holiday`. + +### Acceptance Criteria + +1. The saved observation contains all BRD-FR-001 data attributes: observation date, market yard, commodity, variety, grade, arrival quantity in MT, internal stock position in MT, observation source, and timestamp. +2. The system rejects an observation date later than the current date. +3. The system rejects arrival quantity below 0.0 MT and accepts 0.0 MT. +4. The system blocks a second observation with the same market, commodity, variety, and date. +5. The actor can record `Closed / Mandi Holiday` when arrival data is unavailable due to a holiday or strike, without supplying unavailable arrival data. + +## FR-MKT-002: Capture Daily Mandi Price Range and Modal Rate + +- **Requirement ID:** `FR-MKT-002` +- **Parent UC:** `UC-002` +- **Source Feature:** `BRD-FR-002` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Market Desk daily observation entry and list (route TBD in Stage 11) +- **Business Rules:** All rates must be > 0; `Min Rate ≤ Modal Rate ≤ Max Rate`. + +### Statement + +For each daily mandi arrival observation, the system shall capture the quoted minimum and maximum rates and official modal clearing rate in ₹/Qtl. The system shall reject a save if any rate is not greater than zero or if the modal rate falls outside the inclusive minimum-to-maximum range, and shall identify the arithmetic constraint in its validation response. + +### Acceptance Criteria + +1. The observation captures minimum, maximum, and modal rates in ₹/Qtl. +2. The system accepts rates only when all three values are greater than zero and `Min Rate ≤ Modal Rate ≤ Max Rate`. +3. If the modal rate is outside the inclusive minimum-to-maximum range, the system rejects the save and reports the arithmetic constraint error. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/use-case.md new file mode 100644 index 0000000..7fefef3 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-002-market-desk-observations/use-case.md @@ -0,0 +1,70 @@ +--- +id: UC-002 +version: 1.0.0 +status: Draft +--- + +# UC-002 — Record Daily Mandi Arrivals and Prices + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-002` | +| **Name** | Record Daily Mandi Arrivals and Prices | +| **Owning Domain** | Market Desk | +| **Primary Actor** | Procurement Executive / Mandi Buyer | +| **Supporting Actors** | Purchase Manager | +| **Source Features** | `BRD-FR-001`, `BRD-FR-002` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Record a daily mandi observation for a market, commodity, variety, and date, including arrival quantity and the quoted minimum, maximum, and modal prices, or record that the market is closed when arrival data is unavailable due to a holiday or strike. + +## Preconditions + +1. The actor is authenticated and authorized to record Market Desk observations for the active tenant. +2. The market yard and commodity are within the monitored scope in `BRD-FR-001`. + +## Trigger + +The Procurement Executive / Mandi Buyer records the day's mandi arrival and price information, or reports that the market is closed because of a holiday or strike. + +## Main Success Flow + +1. The actor starts a daily observation and selects the observation date, market yard, commodity, variety, and grade. +2. The actor enters arrival quantity in MT, internal stock position in MT, and observation source. +3. The actor enters the quoted minimum rate, maximum rate, and modal clearing rate in ₹/Qtl. +4. The system validates the observation date, arrival quantity, uniqueness key, and price constraints. +5. The system records the observation with its timestamp and makes it available as a daily Market Desk record. + +## Alternate Flows + +- **A1 — Market closed:** If arrival data is unavailable because of a holiday or strike, the actor flags the market as `Closed / Mandi Holiday`; the system records the closure instead of requiring unavailable arrival and price values. + +## Exception Flows + +- **E1 — Future observation date:** The system rejects the observation because the date cannot be in the future. +- **E2 — Negative arrival quantity:** The system rejects the observation because arrival quantity must be at least 0.0 MT. +- **E3 — Duplicate observation:** The system blocks a duplicate for the same market, commodity, variety, and date. +- **E4 — Invalid price range:** The system rejects the observation if any rate is not greater than zero or if `Min Rate ≤ Modal Rate ≤ Max Rate` is false, and reports the arithmetic constraint error. + +## Postconditions + +- On success, the daily observation is stored with its date, market, commodity, variety, grade, arrival quantity, internal stock position, observation source, timestamp, and price values. +- On the market-closed alternate flow, the market closure is recorded for the observation date. +- On a rejected flow, no invalid or duplicate observation is saved. + +## Referenced Screens / Routes + +- Market Desk daily observation entry and list — route to be specified during Stage 11 screen design. + +## Business Rules Invoked + +- `BRD-FR-001`: observation date is not in the future; arrival quantity is ≥ 0.0 MT; uniqueness by market, commodity, variety, and date; allow `Closed / Mandi Holiday` when data is unavailable due to holiday/strike. +- `BRD-FR-002`: all rates are > 0 and `Min Rate ≤ Modal Rate ≤ Max Rate`. + +## Child Functional Requirements + +- [FR-MKT-001 — Capture Daily Mandi Arrival Observations](functional-reqs.md#fr-mkt-001) +- [FR-MKT-002 — Capture Daily Mandi Price Range and Modal Rate](functional-reqs.md#fr-mkt-002) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/functional-reqs.md new file mode 100644 index 0000000..ad38a3b --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-003-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-003 Mandi Price Trend Analytics + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-003` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-MARKETTRENDANALYTICS-001: Intraday Price Trend Analysis & 20-Day Benchmark Analytics + +- **Requirement ID:** `FR-MARKETTRENDANALYTICS-001` +- **Parent UC:** `UC-003` +- **Source Feature:** `BRD-FR-003` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Market Desk workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Calculations must dynamically update upon new observation save. Execution time $\le 500\text{ms}$. + +### Statement + +The system must provide interactive visual charts and trend tables comparing the 20-day historical modal rate trend per commodity across markets, computing 20-day moving averages, 20-day highs/lows, and price velocity. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Historical Date Range, Commodity Filter, Market Filter, 20-Day SMA (Simple Moving Average), Price Spread. +2. The system enforces the source-defined validation rules: Calculations must dynamically update upon new observation save. Execution time $\le 500\text{ms}$. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/use-case.md new file mode 100644 index 0000000..83862eb --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-003-market-trend-analytics/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-003 +version: 1.0.0 +status: Draft +--- + +# UC-003 — Mandi Price Trend Analytics + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-003` | +| **Name** | Mandi Price Trend Analytics | +| **Owning Domain** | Market Desk | +| **Primary Actor(s)** | Purchase Manager / Partner | +| **Supporting Actor(s)** | Purchase Manager, Partner | +| **Source Features** | `BRD-FR-003` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review the historical modal-price movement for a selected commodity across markets. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: intraday price trend analysis & 20-day benchmark analytics. + +## Main Success Flow + +1. The actor initiates **Intraday Price Trend Analysis & 20-Day Benchmark Analytics**. The system performs the source-defined behavior: The system must provide interactive visual charts and trend tables comparing the 20-day historical modal rate trend per commodity across markets, computing 20-day moving averages, 20-day highs/lows, and price velocity. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-003:** Reject or prevent the operation when its stated validation rules are not met: Calculations must dynamically update upon new observation save. Execution time $\le 500\text{ms}$. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Market Desk workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-MARKETTRENDANALYTICS-001: Intraday Price Trend Analysis & 20-Day Benchmark Analytics](functional-reqs.md#fr-markettrendanalytics-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/functional-reqs.md new file mode 100644 index 0000000..012bed3 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/functional-reqs.md @@ -0,0 +1,94 @@ +--- +id: UC-004-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-004 Purchase Sauda and Supplier Payables Setup + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-004` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-PROCUREMENTCONTRACTS-001: Procurement Price Variance Alert vs. Modal Rate + +- **Requirement ID:** `FR-PROCUREMENTCONTRACTS-001` +- **Parent UC:** `UC-004` +- **Source Feature:** `BRD-FR-004` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Market Desk & Procurement workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Informational alert only; does not hard-block procurement unless configured in company policy. + +--- + +### Statement + +When booking a purchase sauda, the system must compare the offered trade rate against the latest modal clearing rate for that commodity/mandi. If the offered rate exceeds the modal rate by $>5\%$, the system must display an inline warning and require confirmation. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Offered Rate, Benchmark Modal Rate, Variance \%. +2. The system enforces the source-defined validation rules: Informational alert only; does not hard-block procurement unless configured in company policy. + +--- + +## FR-PROCUREMENTCONTRACTS-002: Mandi Auction & Direct Purchase Sauda Booking + +- **Requirement ID:** `FR-PROCUREMENTCONTRACTS-002` +- **Parent UC:** `UC-004` +- **Source Feature:** `BRD-FR-005` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Market Desk & Procurement workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Supplier must be an active master record. Booked MT must be $> 0$. Trade rate must be $> 0$. Gross value must equal $\text{Booked MT} \times 10 \times \text{Rate}$. Status remains `Partially Received` until cumulative received MT reaches booked MT (within tolerance) or explicitly closed by Purchase Manager. + +### Statement + +The system must record purchase contracts (*saudas*) negotiated in mandi auctions or directly with suppliers. Each sauda must capture supplier code, sourcing market, commodity, variety, trade rate (₹/Qtl), estimated bag count, and booked quantity in MT. The system must support multi-truck partial delivery: a sauda may be fulfilled across multiple trucks/GRNs over consecutive delivery days, tracking cumulative received MT and remaining balance MT until fully fulfilled. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Sauda ID (`PUR-YYYYMM-xxx`), Sauda Date, Supplier ID, Sourcing Mandi, Commodity, Variety, Booked Qty MT, Estimated Bags, Trade Rate (₹/Qtl), Gross Value INR, Cumulative Received MT, Remaining Balance MT, Status. +2. The system enforces the source-defined validation rules: Supplier must be an active master record. Booked MT must be $> 0$. Trade rate must be $> 0$. Gross value must equal $\text{Booked MT} \times 10 \times \text{Rate}$. Status remains `Partially Received` until cumulative received MT reaches booked MT (within tolerance) or explicitly closed by Purchase Manager. +3. The system handles the source-defined failure condition as follows: If supplier is deactivated or blacklisted, booking must be blocked. + +## FR-PROCUREMENTCONTRACTS-003: Supplier Credit Terms & Due Date Computation + +- **Requirement ID:** `FR-PROCUREMENTCONTRACTS-003` +- **Parent UC:** `UC-004` +- **Source Feature:** `BRD-FR-006` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Market Desk & Procurement workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Default credit days inherited from Supplier master; editable only by Purchase Manager. + +### Statement + +The system must automatically compute the supplier payment due date by adding the supplier's contractual credit days (e.g., 7, 15, or 21 days) to the sauda or GRN receipt date. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Supplier Credit Days, Transaction Date, Computed Due Date, Payment Status (`Pending`, `Paid`). +2. The system enforces the source-defined validation rules: Default credit days inherited from Supplier master; editable only by Purchase Manager. + +## FR-PROCUREMENTCONTRACTS-004: Mandi Cess & Statutory Levies Apportioning + +- **Requirement ID:** `FR-PROCUREMENTCONTRACTS-004` +- **Parent UC:** `UC-004` +- **Source Feature:** `BRD-FR-007` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Market Desk & Procurement workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Configurable per commodity and market jurisdiction. + +--- + +### Statement + +The system must calculate statutory mandi cess (e.g., 1.5% APMC market fee + 0.2% Nirashrit fee) based on the gross sauda value and append it to the total procurement cost. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Mandi Cess Rate %, Cess Amount INR, Total Landed Procurement Cost INR. +2. The system enforces the source-defined validation rules: Configurable per commodity and market jurisdiction. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/use-case.md new file mode 100644 index 0000000..ad6dfd6 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-004-procurement-contracts/use-case.md @@ -0,0 +1,69 @@ +--- +id: UC-004 +version: 1.0.0 +status: Draft +--- + +# UC-004 — Purchase Sauda and Supplier Payables Setup + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-004` | +| **Name** | Purchase Sauda and Supplier Payables Setup | +| **Owning Domain** | Market Desk & Procurement | +| **Primary Actor(s)** | Procurement Executive / Purchase Manager / Accounts Executive | +| **Supporting Actor(s)** | Purchase Manager, Procurement Executive, Accounts Executive | +| **Source Features** | `BRD-FR-004`, `BRD-FR-005`, `BRD-FR-006`, `BRD-FR-007` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Record and manage mandi or direct purchase commitments, including benchmark comparison and the related supplier due-date and levy calculations. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 4 business operations covered by this use case: procurement price variance alert vs. modal rate; mandi auction & direct purchase sauda booking; supplier credit terms & due date computation; mandi cess & statutory levies apportioning. + +## Main Success Flow + +1. The actor initiates **Procurement Price Variance Alert vs. Modal Rate**. The system performs the source-defined behavior: When booking a purchase sauda, the system must compare the offered trade rate against the latest modal clearing rate for that commodity/mandi. If the offered rate exceeds the modal rate by $>5\%$, the system must display an inline warning and require confirmation. +2. The actor initiates **Mandi Auction & Direct Purchase Sauda Booking**. The system performs the source-defined behavior: The system must record purchase contracts (*saudas*) negotiated in mandi auctions or directly with suppliers. Each sauda must capture supplier code, sourcing market, commodity, variety, trade rate (₹/Qtl), estimated bag count, and booked quantity in MT. The system must support multi-truck partial delivery: a sauda may be fulfilled across multiple trucks/GRNs over consecutive delivery days, tracking cumulative received MT and remaining balance MT until fully fulfilled. +3. The actor initiates **Supplier Credit Terms & Due Date Computation**. The system performs the source-defined behavior: The system must automatically compute the supplier payment due date by adding the supplier's contractual credit days (e.g., 7, 15, or 21 days) to the sauda or GRN receipt date. +4. The actor initiates **Mandi Cess & Statutory Levies Apportioning**. The system performs the source-defined behavior: The system must calculate statutory mandi cess (e.g., 1.5% APMC market fee + 0.2% Nirashrit fee) based on the gross sauda value and append it to the total procurement cost. + +## Alternate Flows + +- **BRD-FR-005 — Mandi Auction & Direct Purchase Sauda Booking:** If supplier is deactivated or blacklisted, booking must be blocked. + +## Exception Flows + +- **BRD-FR-004:** Reject or prevent the operation when its stated validation rules are not met: Informational alert only; does not hard-block procurement unless configured in company policy. + +--- +- **BRD-FR-005:** Reject or prevent the operation when its stated validation rules are not met: Supplier must be an active master record. Booked MT must be $> 0$. Trade rate must be $> 0$. Gross value must equal $\text{Booked MT} \times 10 \times \text{Rate}$. Status remains `Partially Received` until cumulative received MT reaches booked MT (within tolerance) or explicitly closed by Purchase Manager. +- **BRD-FR-006:** Reject or prevent the operation when its stated validation rules are not met: Default credit days inherited from Supplier master; editable only by Purchase Manager. +- **BRD-FR-007:** Reject or prevent the operation when its stated validation rules are not met: Configurable per commodity and market jurisdiction. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Market Desk & Procurement workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-PROCUREMENTCONTRACTS-001: Procurement Price Variance Alert vs. Modal Rate](functional-reqs.md#fr-procurementcontracts-001) +- [FR-PROCUREMENTCONTRACTS-002: Mandi Auction & Direct Purchase Sauda Booking](functional-reqs.md#fr-procurementcontracts-002) +- [FR-PROCUREMENTCONTRACTS-003: Supplier Credit Terms & Due Date Computation](functional-reqs.md#fr-procurementcontracts-003) +- [FR-PROCUREMENTCONTRACTS-004: Mandi Cess & Statutory Levies Apportioning](functional-reqs.md#fr-procurementcontracts-004) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/functional-reqs.md new file mode 100644 index 0000000..4e17398 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/functional-reqs.md @@ -0,0 +1,126 @@ +--- +id: UC-005-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-005 Inward Vehicle Receiving and Goods Receipt + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-005` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-INWARDRECEIVING-001: Inward Vehicle Gate Entry & Verification + +- **Requirement ID:** `FR-INWARDRECEIVING-001` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-008` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Linked sauda must be in state `Booked`. + +### Statement + +Upon vehicle arrival at the godown, the Yard Supervisor must log gate entry linking the vehicle registration number and driver details to an active booked sauda. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Gate Entry ID, Inward Date/Time, Vehicle Reg No, Driver Name, Contact No, Linked Sauda ID, Supplier Name, Gate Pass No. +2. The system enforces the source-defined validation rules: Linked sauda must be in state `Booked`. + +## FR-INWARDRECEIVING-002: Weighbridge Gross & Tare Weighment Logging + +- **Requirement ID:** `FR-INWARDRECEIVING-002` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-009` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** $\text{Gross Weight} > \text{Tare Weight} > 0$. Weighbridge slip number mandatory. + +### Statement + +The system must record dual-phase weighbridge measurements for incoming trucks: (1) Gross Weighment (truck + commodity) upon arrival, and (2) Tare Weighment (empty truck) after unloading. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Gross Weight kg, Gross Timestamp, Tare Weight kg, Tare Timestamp, Gross Net Weight kg ($Gross - Tare$), Weighbridge Slip No. +2. The system enforces the source-defined validation rules: $\text{Gross Weight} > \text{Tare Weight} > 0$. Weighbridge slip number mandatory. +3. The system handles the source-defined failure condition as follows: If Tare Weight $\ge$ Gross Weight, system must hard-block submission with an error. + +## FR-INWARDRECEIVING-003: Bag Tare Deduction (*Bardana Katai*) & Final Net MT + +- **Requirement ID:** `FR-INWARDRECEIVING-003` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-010` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Formula: $\text{Net MT} = (\text{Gross kg} - \text{Tare kg} - (\text{Bags} \times \text{Bag Tare Rate})) / 1000$. Net MT must be $> 0$. + +### Statement + +The system must deduct the weight of packaging bags from the gross commodity weight using the defined tare deduction factor (default 1.0 kg/gunny bag) to calculate true Net Payable MT. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Physical Bag Count, Packaging Type (`Gunny/Jute`, `HDPE/Plastic`), Bag Tare Deduction Rate kg/bag, Total Bag Tare kg, Final Net Weight MT. +2. The system enforces the source-defined validation rules: Formula: $\text{Net MT} = (\text{Gross kg} - \text{Tare kg} - (\text{Bags} \times \text{Bag Tare Rate})) / 1000$. Net MT must be $> 0$. + +## FR-INWARDRECEIVING-004: Weighment Tolerance & Transit Shortage Verification + +- **Requirement ID:** `FR-INWARDRECEIVING-004` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-011` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** If shortage exceeds $2.0\%$, the GRN requires mandatory Purchase Manager approval before stock posting. + +### Statement + +The system must compare the Final Net Weighbridge MT against the Booked Sauda MT. If shortage exceeds $0.5\%$, the system must flag a `Transit Shortage Warning` and adjust the final payable amount to the actual net received weight. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Shortage MT, Shortage Value INR, Variance \%, Shortage Status (`Normal`, `Disputed`). +2. The system enforces the source-defined validation rules: If shortage exceeds $2.0\%$, the GRN requires mandatory Purchase Manager approval before stock posting. + +## FR-INWARDRECEIVING-005: Goods Receipt Note (GRN) Posting & Warehouse Stack Placement + +- **Requirement ID:** `FR-INWARDRECEIVING-005` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-012` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** GRN submission atomically updates inventory and creates Lot record in state `Under QC`. + +--- + +### Statement + +Upon weighment completion, the system must generate a formal GRN document, allocate the physical goods to a specific warehouse/godown and stack location, credit the warehouse stock book, and mint an inward Commodity Lot. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: GRN ID (`GRN-YYYYMM-xxx`), Receiving Warehouse ID, Stack/Chamber No, Accepted Bags, Accepted Net MT. +2. The system enforces the source-defined validation rules: GRN submission atomically updates inventory and creates Lot record in state `Under QC`. + +--- + +## FR-INWARDRECEIVING-006: Mandatory Lot & Batch Identity Generation + +- **Requirement ID:** `FR-INWARDRECEIVING-006` +- **Parent UC:** `UC-005` +- **Source Feature:** `BRD-FR-013` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Initial status must be `Under QC`. Lot ID must be permanent and traceable through all sales and dispatches. + +### Statement + +The system must automatically generate a globally unique, immutable Lot ID (`LOT-YYYYMM-xxx`) for every inward consignment processed through a GRN. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Lot ID, Inward Date, Origin Market, Supplier ID, Commodity, Variety, Receiving Warehouse, Net MT, Bag Count, Quality Status. +2. The system enforces the source-defined validation rules: Initial status must be `Under QC`. Lot ID must be permanent and traceable through all sales and dispatches. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/use-case.md new file mode 100644 index 0000000..0f7b1bb --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-005-inward-receiving/use-case.md @@ -0,0 +1,73 @@ +--- +id: UC-005 +version: 1.0.0 +status: Draft +--- + +# UC-005 — Inward Vehicle Receiving and Goods Receipt + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-005` | +| **Name** | Inward Vehicle Receiving and Goods Receipt | +| **Owning Domain** | Goods Receipt | +| **Primary Actor(s)** | Yard Supervisor / Purchase Manager | +| **Supporting Actor(s)** | Yard Supervisor, Purchase Manager, Quality Officer | +| **Source Features** | `BRD-FR-008`, `BRD-FR-009`, `BRD-FR-010`, `BRD-FR-011`, `BRD-FR-012`, `BRD-FR-013` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Receive a truck against a booked sauda, capture weighment, calculate accepted quantity, post the GRN, and establish the inward lot. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 6 business operations covered by this use case: inward vehicle gate entry & verification; weighbridge gross & tare weighment logging; bag tare deduction (*bardana katai*) & final net mt; weighment tolerance & transit shortage verification; goods receipt note (grn) posting & warehouse stack placement; mandatory lot & batch identity generation. + +## Main Success Flow + +1. The actor initiates **Inward Vehicle Gate Entry & Verification**. The system performs the source-defined behavior: Upon vehicle arrival at the godown, the Yard Supervisor must log gate entry linking the vehicle registration number and driver details to an active booked sauda. +2. The actor initiates **Weighbridge Gross & Tare Weighment Logging**. The system performs the source-defined behavior: The system must record dual-phase weighbridge measurements for incoming trucks: (1) Gross Weighment (truck + commodity) upon arrival, and (2) Tare Weighment (empty truck) after unloading. +3. The actor initiates **Bag Tare Deduction (*Bardana Katai*) & Final Net MT**. The system performs the source-defined behavior: The system must deduct the weight of packaging bags from the gross commodity weight using the defined tare deduction factor (default 1.0 kg/gunny bag) to calculate true Net Payable MT. +4. The actor initiates **Weighment Tolerance & Transit Shortage Verification**. The system performs the source-defined behavior: The system must compare the Final Net Weighbridge MT against the Booked Sauda MT. If shortage exceeds $0.5\%$, the system must flag a `Transit Shortage Warning` and adjust the final payable amount to the actual net received weight. +5. The actor initiates **Goods Receipt Note (GRN) Posting & Warehouse Stack Placement**. The system performs the source-defined behavior: Upon weighment completion, the system must generate a formal GRN document, allocate the physical goods to a specific warehouse/godown and stack location, credit the warehouse stock book, and mint an inward Commodity Lot. +6. The actor initiates **Mandatory Lot & Batch Identity Generation**. The system performs the source-defined behavior: The system must automatically generate a globally unique, immutable Lot ID (`LOT-YYYYMM-xxx`) for every inward consignment processed through a GRN. + +## Alternate Flows + +- **BRD-FR-009 — Weighbridge Gross & Tare Weighment Logging:** If Tare Weight $\ge$ Gross Weight, system must hard-block submission with an error. + +## Exception Flows + +- **BRD-FR-008:** Reject or prevent the operation when its stated validation rules are not met: Linked sauda must be in state `Booked`. +- **BRD-FR-009:** Reject or prevent the operation when its stated validation rules are not met: $\text{Gross Weight} > \text{Tare Weight} > 0$. Weighbridge slip number mandatory. +- **BRD-FR-010:** Reject or prevent the operation when its stated validation rules are not met: Formula: $\text{Net MT} = (\text{Gross kg} - \text{Tare kg} - (\text{Bags} \times \text{Bag Tare Rate})) / 1000$. Net MT must be $> 0$. +- **BRD-FR-011:** Reject or prevent the operation when its stated validation rules are not met: If shortage exceeds $2.0\%$, the GRN requires mandatory Purchase Manager approval before stock posting. +- **BRD-FR-012:** Reject or prevent the operation when its stated validation rules are not met: GRN submission atomically updates inventory and creates Lot record in state `Under QC`. + +--- +- **BRD-FR-013:** Reject or prevent the operation when its stated validation rules are not met: Initial status must be `Under QC`. Lot ID must be permanent and traceable through all sales and dispatches. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Goods Receipt workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-INWARDRECEIVING-001: Inward Vehicle Gate Entry & Verification](functional-reqs.md#fr-inwardreceiving-001) +- [FR-INWARDRECEIVING-002: Weighbridge Gross & Tare Weighment Logging](functional-reqs.md#fr-inwardreceiving-002) +- [FR-INWARDRECEIVING-003: Bag Tare Deduction (*Bardana Katai*) & Final Net MT](functional-reqs.md#fr-inwardreceiving-003) +- [FR-INWARDRECEIVING-004: Weighment Tolerance & Transit Shortage Verification](functional-reqs.md#fr-inwardreceiving-004) +- [FR-INWARDRECEIVING-005: Goods Receipt Note (GRN) Posting & Warehouse Stack Placement](functional-reqs.md#fr-inwardreceiving-005) +- [FR-INWARDRECEIVING-006: Mandatory Lot & Batch Identity Generation](functional-reqs.md#fr-inwardreceiving-006) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/functional-reqs.md new file mode 100644 index 0000000..636d1dd --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/functional-reqs.md @@ -0,0 +1,89 @@ +--- +id: UC-006-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-006 Inward Quality Inspection and Lot Control + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-006` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-QUALITYANDLOTCONTROL-001: Inward Quality Inspection Parameter Recording + +- **Requirement ID:** `FR-QUALITYANDLOTCONTROL-001` +- **Parent UC:** `UC-006` +- **Source Feature:** `BRD-FR-014` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Quality Control workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Percentage values must be between $0.00\%$ and $100.00\%$. + +### Statement + +The Quality Officer must log laboratory/physical test parameters for the lot: Moisture %, Foreign Matter / Dust %, Admixture (other grains) %, Damaged / Discolored %, and Weevil count. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Inspection Date, Quality Officer ID, Moisture %, Foreign Matter %, Admixture %, Damaged %, Weevil Infestation (`None`, `Mild`, `Severe`), Assigned Commercial Grade (`FAQ`, `Premium`, `Below FAQ`). +2. The system enforces the source-defined validation rules: Percentage values must be between $0.00\%$ and $100.00\%$. + +## FR-QUALITYANDLOTCONTROL-002: Quality Deduction / Rebate Calculation + +- **Requirement ID:** `FR-QUALITYANDLOTCONTROL-002` +- **Parent UC:** `UC-006` +- **Source Feature:** `BRD-FR-015` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Quality Control workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Deductions cannot reduce rate below 50% of base rate without partner authorization. + +### Statement + +If moisture or foreign matter exceeds standard contract baselines (e.g., standard moisture baseline 10.0%), the system must automatically compute a quality price deduction (e.g., ₹10 deduction per quintal for each 0.5% moisture above baseline). + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Base Contract Rate ₹/Qtl, Quality Penalty Rate ₹/Qtl, Adjusted Final Rate ₹/Qtl, Net Purchase Adjustment INR. +2. The system enforces the source-defined validation rules: Deductions cannot reduce rate below 50% of base rate without partner authorization. + +## FR-QUALITYANDLOTCONTROL-003: Finite State Machine Enforcement for `QC Hold` vs. `Released` + +- **Requirement ID:** `FR-QUALITYANDLOTCONTROL-003` +- **Parent UC:** `UC-006` +- **Source Feature:** `BRD-FR-016` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Quality Control workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Only users with `Quality Officer` or `Partner` roles can transition a lot from `QC Hold` to `Released`. System must hard-block dispatch of unreleased lots. + +### Statement + +The system must enforce strict FSM transitions on the Lot record. If moisture $>12\%$ or foreign matter $>2\%$, the lot must be transitioned to `QC Hold`. A lot on `QC Hold` is programmatically blocked from sales order allocation and dispatch loading. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Previous Status, New Status (`QC Hold`, `Released`), Hold Reason, Action Plan (`Drying`, `Cleaning`, `Re-testing`), Release Timestamp. +2. The system enforces the source-defined validation rules: Only users with `Quality Officer` or `Partner` roles can transition a lot from `QC Hold` to `Released`. System must hard-block dispatch of unreleased lots. + +## FR-QUALITYANDLOTCONTROL-004: Lot Splitting & Blending Traceability + +- **Requirement ID:** `FR-QUALITYANDLOTCONTROL-004` +- **Parent UC:** `UC-006` +- **Source Feature:** `BRD-FR-017` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Quality Control workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Sum of child lot quantities must exactly equal parent quantity deducted. + +--- + +### Statement + +The system must support splitting a parent lot into sub-lots (e.g., when dividing a consignment across two warehouses) or blending multiple lots, maintaining parent-child lineage in the traceability graph. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Parent Lot ID, Child Lot ID(s), Split Qty MT, Split Bag Count, Linage Tree. +2. The system enforces the source-defined validation rules: Sum of child lot quantities must exactly equal parent quantity deducted. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/use-case.md new file mode 100644 index 0000000..5b030c9 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-006-quality-and-lot-control/use-case.md @@ -0,0 +1,67 @@ +--- +id: UC-006 +version: 1.0.0 +status: Draft +--- + +# UC-006 — Inward Quality Inspection and Lot Control + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-006` | +| **Name** | Inward Quality Inspection and Lot Control | +| **Owning Domain** | Quality Control | +| **Primary Actor(s)** | Quality Officer / Yard Supervisor / Accounts Executive | +| **Supporting Actor(s)** | Quality Officer, Accounts Executive, Yard Supervisor | +| **Source Features** | `BRD-FR-014`, `BRD-FR-015`, `BRD-FR-016`, `BRD-FR-017` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Inspect an inward lot, apply contract quality treatment, control its release state, and retain lot lineage through approved splitting or blending. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 4 business operations covered by this use case: inward quality inspection parameter recording; quality deduction / rebate calculation; finite state machine enforcement for `qc hold` vs. `released`; lot splitting & blending traceability. + +## Main Success Flow + +1. The actor initiates **Inward Quality Inspection Parameter Recording**. The system performs the source-defined behavior: The Quality Officer must log laboratory/physical test parameters for the lot: Moisture %, Foreign Matter / Dust %, Admixture (other grains) %, Damaged / Discolored %, and Weevil count. +2. The actor initiates **Quality Deduction / Rebate Calculation**. The system performs the source-defined behavior: If moisture or foreign matter exceeds standard contract baselines (e.g., standard moisture baseline 10.0%), the system must automatically compute a quality price deduction (e.g., ₹10 deduction per quintal for each 0.5% moisture above baseline). +3. The actor initiates **Finite State Machine Enforcement for `QC Hold` vs. `Released`**. The system performs the source-defined behavior: The system must enforce strict FSM transitions on the Lot record. If moisture $>12\%$ or foreign matter $>2\%$, the lot must be transitioned to `QC Hold`. A lot on `QC Hold` is programmatically blocked from sales order allocation and dispatch loading. +4. The actor initiates **Lot Splitting & Blending Traceability**. The system performs the source-defined behavior: The system must support splitting a parent lot into sub-lots (e.g., when dividing a consignment across two warehouses) or blending multiple lots, maintaining parent-child lineage in the traceability graph. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-014:** Reject or prevent the operation when its stated validation rules are not met: Percentage values must be between $0.00\%$ and $100.00\%$. +- **BRD-FR-015:** Reject or prevent the operation when its stated validation rules are not met: Deductions cannot reduce rate below 50% of base rate without partner authorization. +- **BRD-FR-016:** Reject or prevent the operation when its stated validation rules are not met: Only users with `Quality Officer` or `Partner` roles can transition a lot from `QC Hold` to `Released`. System must hard-block dispatch of unreleased lots. +- **BRD-FR-017:** Reject or prevent the operation when its stated validation rules are not met: Sum of child lot quantities must exactly equal parent quantity deducted. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Quality Control workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-QUALITYANDLOTCONTROL-001: Inward Quality Inspection Parameter Recording](functional-reqs.md#fr-qualityandlotcontrol-001) +- [FR-QUALITYANDLOTCONTROL-002: Quality Deduction / Rebate Calculation](functional-reqs.md#fr-qualityandlotcontrol-002) +- [FR-QUALITYANDLOTCONTROL-003: Finite State Machine Enforcement for `QC Hold` vs. `Released`](functional-reqs.md#fr-qualityandlotcontrol-003) +- [FR-QUALITYANDLOTCONTROL-004: Lot Splitting & Blending Traceability](functional-reqs.md#fr-qualityandlotcontrol-004) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md new file mode 100644 index 0000000..a1729a3 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md @@ -0,0 +1,72 @@ +--- +id: UC-007-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-007 Warehouse Stock, Audit, Capacity and Transfer + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-007` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-WAREHOUSEINVENTORY-001: Multi-Godown Dual-Unit Stock Ledger + +- **Requirement ID:** `FR-WAREHOUSEINVENTORY-001` +- **Parent UC:** `UC-007` +- **Source Feature:** `BRD-FR-018` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Inventory workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Closing stock MT and bags must never be negative ($\ge 0$). Adjustments exceeding $\pm 1.0\%$ of godown balance require mandatory Partner electronic sign-off. + +### Statement + +The system must maintain a real-time, double-entry stock ledger tracking commodity positions across warehouses (WH-01 Neemuch Main Yard, WH-02 Neemuch North Godown, WH-03 Mandsaur Transit Godown, WH-04 Indore Buffer Depot). For each commodity, variety, and grade, it must maintain Opening Stock MT, Received MT, Dispatched MT, Closing Stock MT, and physical Bag counts. The system must support Periodic Physical Stock Audits: recording physical tally counts against book balances and generating supervisor-authorized Stock Adjustment Vouchers capturing natural storage loss/gain (*ghat / nami* due to moisture evaporation or seasonal humidity) or handling spillage with mandatory reason codes. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Stock Entry ID, Date, Warehouse ID, Commodity, Variety, Grade, Opening MT, Inward MT, Outward MT, Closing MT, Bag Delta, Closing Bags, Physical Count MT, Adjustment Variance MT, Variance Reason Code (`Moisture Loss / Ghat`, `Handling Spillage`, `Bag Burst`, `Seasonal Humidity Gain`). +2. The system enforces the source-defined validation rules: Closing stock MT and bags must never be negative ($\ge 0$). Adjustments exceeding $\pm 1.0\%$ of godown balance require mandatory Partner electronic sign-off. + +## FR-WAREHOUSEINVENTORY-002: Godown Capacity & Volume Utilization Tracking + +- **Requirement ID:** `FR-WAREHOUSEINVENTORY-002` +- **Parent UC:** `UC-007` +- **Source Feature:** `BRD-FR-019` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Inventory workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Warning status triggered when Utilisation exceeds 85%. + +### Statement + +The system must track the physical storage capacity of each warehouse in Metric Tonnes and calculate real-time percentage utilization: + $$\text{Utilisation \%} = \frac{\text{Current Closing Stock (MT)}}{\text{Storage Capacity (MT)}} \times 100$$ + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Warehouse ID, Name, City, Capacity MT, Current Stock MT, Utilisation \%. +2. The system enforces the source-defined validation rules: Warning status triggered when Utilisation exceeds 85%. + +## FR-WAREHOUSEINVENTORY-003: Godown-to-Godown Internal Stock Transfer + +- **Requirement ID:** `FR-WAREHOUSEINVENTORY-003` +- **Parent UC:** `UC-007` +- **Source Feature:** `BRD-FR-020` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Inventory workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Outward and inward entries must reconcile within $\pm 0.2\%$ transfer tolerance. + +--- + +### Statement + +The system must support recording stock transfers between godowns (e.g., from Mandsaur Transit Godown to Neemuch Main Yard), logging origin outward deduction, in-transit state, destination weighment, and destination inward credit. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Transfer ID, Origin Warehouse, Destination Warehouse, Commodity, Lot ID, Transfer Qty MT, Transfer Bags, Vehicle Reg No, Transit Status. +2. The system enforces the source-defined validation rules: Outward and inward entries must reconcile within $\pm 0.2\%$ transfer tolerance. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md new file mode 100644 index 0000000..b7ce297 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md @@ -0,0 +1,65 @@ +--- +id: UC-007 +version: 1.0.0 +status: Draft +--- + +# UC-007 — Warehouse Stock, Audit, Capacity and Transfer + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-007` | +| **Name** | Warehouse Stock, Audit, Capacity and Transfer | +| **Owning Domain** | Inventory | +| **Primary Actor(s)** | Yard Supervisor / Logistics Coordinator / Partner | +| **Supporting Actor(s)** | Yard Supervisor, Management, Partner, Logistics Coordinator | +| **Source Features** | `BRD-FR-018`, `BRD-FR-019`, `BRD-FR-020` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Maintain warehouse stock positions, reconcile physical counts, monitor capacity, and record inter-godown transfers. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 3 business operations covered by this use case: multi-godown dual-unit stock ledger; godown capacity & volume utilization tracking; godown-to-godown internal stock transfer. + +## Main Success Flow + +1. The actor initiates **Multi-Godown Dual-Unit Stock Ledger**. The system performs the source-defined behavior: The system must maintain a real-time, double-entry stock ledger tracking commodity positions across warehouses (WH-01 Neemuch Main Yard, WH-02 Neemuch North Godown, WH-03 Mandsaur Transit Godown, WH-04 Indore Buffer Depot). For each commodity, variety, and grade, it must maintain Opening Stock MT, Received MT, Dispatched MT, Closing Stock MT, and physical Bag counts. The system must support Periodic Physical Stock Audits: recording physical tally counts against book balances and generating supervisor-authorized Stock Adjustment Vouchers capturing natural storage loss/gain (*ghat / nami* due to moisture evaporation or seasonal humidity) or handling spillage with mandatory reason codes. +2. The actor initiates **Godown Capacity & Volume Utilization Tracking**. The system performs the source-defined behavior: The system must track the physical storage capacity of each warehouse in Metric Tonnes and calculate real-time percentage utilization: + $$\text{Utilisation \%} = \frac{\text{Current Closing Stock (MT)}}{\text{Storage Capacity (MT)}} \times 100$$ +3. The actor initiates **Godown-to-Godown Internal Stock Transfer**. The system performs the source-defined behavior: The system must support recording stock transfers between godowns (e.g., from Mandsaur Transit Godown to Neemuch Main Yard), logging origin outward deduction, in-transit state, destination weighment, and destination inward credit. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-018:** Reject or prevent the operation when its stated validation rules are not met: Closing stock MT and bags must never be negative ($\ge 0$). Adjustments exceeding $\pm 1.0\%$ of godown balance require mandatory Partner electronic sign-off. +- **BRD-FR-019:** Reject or prevent the operation when its stated validation rules are not met: Warning status triggered when Utilisation exceeds 85%. +- **BRD-FR-020:** Reject or prevent the operation when its stated validation rules are not met: Outward and inward entries must reconcile within $\pm 0.2\%$ transfer tolerance. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Inventory workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-WAREHOUSEINVENTORY-001: Multi-Godown Dual-Unit Stock Ledger](functional-reqs.md#fr-warehouseinventory-001) +- [FR-WAREHOUSEINVENTORY-002: Godown Capacity & Volume Utilization Tracking](functional-reqs.md#fr-warehouseinventory-002) +- [FR-WAREHOUSEINVENTORY-003: Godown-to-Godown Internal Stock Transfer](functional-reqs.md#fr-warehouseinventory-003) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md new file mode 100644 index 0000000..0d4b5ca --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md @@ -0,0 +1,71 @@ +--- +id: UC-008-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-008 Customer Sales Contract, Credit Check and Allocation + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-008` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-SALESCONTRACTS-001: Customer Sales Contract Booking + +- **Requirement ID:** `FR-SALESCONTRACTS-001` +- **Parent UC:** `UC-008` +- **Source Feature:** `BRD-FR-021` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Sales workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Total Sales Value must equal $\text{Contract Qty MT} \times 10 \times \text{Rate ₹/Qtl}$. + +### Statement + +The system must record customer sales orders/contracts specifying customer code, destination city, customer segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), commodity, variety, grade, contracted quantity in MT, contract rate in ₹/Qtl, and delivery timeline. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Sales Order ID (`SAL-YYYYMM-xxx`), Order Date, Customer ID, Destination City, Commodity, Variety, Grade, Contract Qty MT, Contract Rate ₹/Qtl, Total Sales Value INR, Payment Terms, Status. +2. The system enforces the source-defined validation rules: Total Sales Value must equal $\text{Contract Qty MT} \times 10 \times \text{Rate ₹/Qtl}$. + +## FR-SALESCONTRACTS-002: Customer Credit Limit & Pre-Order Exposure Verification + +- **Requirement ID:** `FR-SALESCONTRACTS-002` +- **Parent UC:** `UC-008` +- **Source Feature:** `BRD-FR-022` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Sales workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** If Projected Exposure Ratio $>80\%$, display inline warning. If Projected Exposure Ratio $>100\%$, system must prevent order confirmation unless authorized by Partner. + +### Statement + +Prior to confirming a sales order, the system must evaluate the customer's current outstanding receivables plus the value of the new order against their sanctioned credit limit. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Sanctioned Credit Limit INR, Current Outstanding INR, New Order Value INR, Projected Exposure INR, Projected Exposure Ratio \%. +2. The system enforces the source-defined validation rules: If Projected Exposure Ratio $>80\%$, display inline warning. If Projected Exposure Ratio $>100\%$, system must prevent order confirmation unless authorized by Partner. + +## FR-SALESCONTRACTS-003: Sales Order Inventory Allocation + +- **Requirement ID:** `FR-SALESCONTRACTS-003` +- **Parent UC:** `UC-008` +- **Source Feature:** `BRD-FR-023` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Sales workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Allocation fails if Lot status is `QC Hold` or `Under QC`, or if available lot unreserved MT $<$ allocated MT. + +--- + +### Statement + +The Sales Manager must allocate specific available inventory lot(s) from a warehouse to a confirmed sales order. The system must verify that selected lots are in `Released` state and have sufficient unreserved balance. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Sales Order ID, Allocated Lot ID, Allocated Qty MT, Allocated Bags, Warehouse ID. +2. The system enforces the source-defined validation rules: Allocation fails if Lot status is `QC Hold` or `Under QC`, or if available lot unreserved MT $<$ allocated MT. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md new file mode 100644 index 0000000..5c1a556 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md @@ -0,0 +1,64 @@ +--- +id: UC-008 +version: 1.0.0 +status: Draft +--- + +# UC-008 — Customer Sales Contract, Credit Check and Allocation + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-008` | +| **Name** | Customer Sales Contract, Credit Check and Allocation | +| **Owning Domain** | Sales | +| **Primary Actor(s)** | Sales Manager / Sales Executive / Accounts Executive / Yard Supervisor | +| **Supporting Actor(s)** | Sales Manager, Sales Executive, Accounts Executive, Yard Supervisor | +| **Source Features** | `BRD-FR-021`, `BRD-FR-022`, `BRD-FR-023` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Record a customer sales contract, evaluate exposure before confirmation, and allocate eligible available lots. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 3 business operations covered by this use case: customer sales contract booking; customer credit limit & pre-order exposure verification; sales order inventory allocation. + +## Main Success Flow + +1. The actor initiates **Customer Sales Contract Booking**. The system performs the source-defined behavior: The system must record customer sales orders/contracts specifying customer code, destination city, customer segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), commodity, variety, grade, contracted quantity in MT, contract rate in ₹/Qtl, and delivery timeline. +2. The actor initiates **Customer Credit Limit & Pre-Order Exposure Verification**. The system performs the source-defined behavior: Prior to confirming a sales order, the system must evaluate the customer's current outstanding receivables plus the value of the new order against their sanctioned credit limit. +3. The actor initiates **Sales Order Inventory Allocation**. The system performs the source-defined behavior: The Sales Manager must allocate specific available inventory lot(s) from a warehouse to a confirmed sales order. The system must verify that selected lots are in `Released` state and have sufficient unreserved balance. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-021:** Reject or prevent the operation when its stated validation rules are not met: Total Sales Value must equal $\text{Contract Qty MT} \times 10 \times \text{Rate ₹/Qtl}$. +- **BRD-FR-022:** Reject or prevent the operation when its stated validation rules are not met: If Projected Exposure Ratio $>80\%$, display inline warning. If Projected Exposure Ratio $>100\%$, system must prevent order confirmation unless authorized by Partner. +- **BRD-FR-023:** Reject or prevent the operation when its stated validation rules are not met: Allocation fails if Lot status is `QC Hold` or `Under QC`, or if available lot unreserved MT $<$ allocated MT. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Sales workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-SALESCONTRACTS-001: Customer Sales Contract Booking](functional-reqs.md#fr-salescontracts-001) +- [FR-SALESCONTRACTS-002: Customer Credit Limit & Pre-Order Exposure Verification](functional-reqs.md#fr-salescontracts-002) +- [FR-SALESCONTRACTS-003: Sales Order Inventory Allocation](functional-reqs.md#fr-salescontracts-003) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md new file mode 100644 index 0000000..6cf5986 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md @@ -0,0 +1,71 @@ +--- +id: UC-009-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-009 Outbound Dispatch and Delivery + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-009` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-DISPATCHDELIVERY-001: Outbound Dispatch Board Console + +- **Requirement ID:** `FR-DISPATCHDELIVERY-001` +- **Parent UC:** `UC-009` +- **Source Feature:** `BRD-FR-024` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Logistics workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Dispatch cannot be created without an approved sales order and assigned vehicle. + +### Statement + +The system must provide a visual dispatch management board displaying scheduled, loading, and in-transit consignments, matching confirmed sales orders to allocated warehouse lots and transport vehicles. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Dispatch ID (`DISP-YYYYMM-xxx`), Dispatch Date, Linked Sales Order ID, Customer Name, Destination City, Commodity, Dispatch Qty MT, Assigned Vehicle Reg No, Driver Details, Status (`Scheduled`, `Loading`, `In Transit`, `Delivered`). +2. The system enforces the source-defined validation rules: Dispatch cannot be created without an approved sales order and assigned vehicle. + +## FR-DISPATCHDELIVERY-002: Outbound Weighbridge & Dispatch Bilty/Manifest + +- **Requirement ID:** `FR-DISPATCHDELIVERY-002` +- **Parent UC:** `UC-009` +- **Source Feature:** `BRD-FR-025` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Logistics workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Net loaded MT must match allocated order MT within $\pm 1.0\%$ loading tolerance. + +### Statement + +The system must capture outward weighbridge weights for loaded dispatch trucks (Tare truck before loading, Gross truck after loading), verify loaded weight against order MT, and generate a printable transport manifest / Bilty. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Dispatch ID, Outward Tare kg, Outward Gross kg, Net Loaded MT, Loaded Bag Count, Transporter Bilty No, e-Way Bill No. +2. The system enforces the source-defined validation rules: Net loaded MT must match allocated order MT within $\pm 1.0\%$ loading tolerance. + +## FR-DISPATCHDELIVERY-003: In-Transit Tracking & Proof of Delivery (POD) + +- **Requirement ID:** `FR-DISPATCHDELIVERY-003` +- **Parent UC:** `UC-009` +- **Source Feature:** `BRD-FR-026` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Logistics workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Setting status to `Delivered` triggers automatic generation of finalized Sales Invoice. Consignee shortage deductions exceeding 2.0% require mandatory Sales Manager approval before issuing Credit Note. + +--- + +### Statement + +The system must track dispatch states from `In Transit` to `Delivered`. Upon consignee receipt, the Logistics Coordinator logs confirmation date, destination weighment, and uploads POD document reference. If destination weighment or quality parameters reveal a transit shortage or damage acknowledged by the buyer, the system must allow recording a Consignee Shortage Note and automatically generating a compensating Sales Credit Note against the customer ledger without altering the immutable outbound dispatch manifest. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Transit Status, Departure Date/Time, Expected Delivery Date, Actual Delivery Date, Destination Weighbridge Net MT, Transit Loss MT, Consignee Acknowledgement Note, POD Ref, Credit Note ID (if applicable). +2. The system enforces the source-defined validation rules: Setting status to `Delivered` triggers automatic generation of finalized Sales Invoice. Consignee shortage deductions exceeding 2.0% require mandatory Sales Manager approval before issuing Credit Note. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md new file mode 100644 index 0000000..a703234 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md @@ -0,0 +1,64 @@ +--- +id: UC-009 +version: 1.0.0 +status: Draft +--- + +# UC-009 — Outbound Dispatch and Delivery + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-009` | +| **Name** | Outbound Dispatch and Delivery | +| **Owning Domain** | Logistics | +| **Primary Actor(s)** | Logistics Coordinator / Yard Supervisor | +| **Supporting Actor(s)** | Logistics Coordinator, Yard Supervisor | +| **Source Features** | `BRD-FR-024`, `BRD-FR-025`, `BRD-FR-026` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Schedule an approved sales order for dispatch, record outward weighment and transport documents, and complete delivery with consignee evidence. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 3 business operations covered by this use case: outbound dispatch board console; outbound weighbridge & dispatch bilty/manifest; in-transit tracking & proof of delivery (pod). + +## Main Success Flow + +1. The actor initiates **Outbound Dispatch Board Console**. The system performs the source-defined behavior: The system must provide a visual dispatch management board displaying scheduled, loading, and in-transit consignments, matching confirmed sales orders to allocated warehouse lots and transport vehicles. +2. The actor initiates **Outbound Weighbridge & Dispatch Bilty/Manifest**. The system performs the source-defined behavior: The system must capture outward weighbridge weights for loaded dispatch trucks (Tare truck before loading, Gross truck after loading), verify loaded weight against order MT, and generate a printable transport manifest / Bilty. +3. The actor initiates **In-Transit Tracking & Proof of Delivery (POD)**. The system performs the source-defined behavior: The system must track dispatch states from `In Transit` to `Delivered`. Upon consignee receipt, the Logistics Coordinator logs confirmation date, destination weighment, and uploads POD document reference. If destination weighment or quality parameters reveal a transit shortage or damage acknowledged by the buyer, the system must allow recording a Consignee Shortage Note and automatically generating a compensating Sales Credit Note against the customer ledger without altering the immutable outbound dispatch manifest. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-024:** Reject or prevent the operation when its stated validation rules are not met: Dispatch cannot be created without an approved sales order and assigned vehicle. +- **BRD-FR-025:** Reject or prevent the operation when its stated validation rules are not met: Net loaded MT must match allocated order MT within $\pm 1.0\%$ loading tolerance. +- **BRD-FR-026:** Reject or prevent the operation when its stated validation rules are not met: Setting status to `Delivered` triggers automatic generation of finalized Sales Invoice. Consignee shortage deductions exceeding 2.0% require mandatory Sales Manager approval before issuing Credit Note. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Logistics workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-DISPATCHDELIVERY-001: Outbound Dispatch Board Console](functional-reqs.md#fr-dispatchdelivery-001) +- [FR-DISPATCHDELIVERY-002: Outbound Weighbridge & Dispatch Bilty/Manifest](functional-reqs.md#fr-dispatchdelivery-002) +- [FR-DISPATCHDELIVERY-003: In-Transit Tracking & Proof of Delivery (POD)](functional-reqs.md#fr-dispatchdelivery-003) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/functional-reqs.md new file mode 100644 index 0000000..a02fc51 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/functional-reqs.md @@ -0,0 +1,35 @@ +--- +id: UC-010-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-010 Transport Fleet Registry + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-010` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-FLEETREGISTRY-001: Transport Fleet Registry + +- **Requirement ID:** `FR-FLEETREGISTRY-001` +- **Parent UC:** `UC-010` +- **Source Feature:** `BRD-FR-027` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Logistics & Fleet workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Vehicles with status `Maintenance` cannot be assigned to dispatches. + +--- + +### Statement + +The system must maintain a registry of transport trucks (owned and contract carriers) including registration number, vehicle model, gross payload capacity in MT, ownership type (`Own` vs `Contract`), insurance/fitness expiry dates, and operational status (`Available`, `On Route`, `Maintenance`). + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Vehicle Reg No, Make/Model, Payload Capacity MT, Ownership Type, Transporter Name, Status, Fitness Expiry Date. +2. The system enforces the source-defined validation rules: Vehicles with status `Maintenance` cannot be assigned to dispatches. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md new file mode 100644 index 0000000..9dee5b8 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md @@ -0,0 +1,58 @@ +--- +id: UC-010 +version: 1.0.0 +status: Draft +--- + +# UC-010 — Transport Fleet Registry + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-010` | +| **Name** | Transport Fleet Registry | +| **Owning Domain** | Logistics & Fleet | +| **Primary Actor(s)** | Logistics Coordinator | +| **Supporting Actor(s)** | None stated | +| **Source Features** | `BRD-FR-027` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Maintain the fleet records required to assign transport vehicles to dispatches. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: transport fleet registry. + +## Main Success Flow + +1. The actor initiates **Transport Fleet Registry**. The system performs the source-defined behavior: The system must maintain a registry of transport trucks (owned and contract carriers) including registration number, vehicle model, gross payload capacity in MT, ownership type (`Own` vs `Contract`), insurance/fitness expiry dates, and operational status (`Available`, `On Route`, `Maintenance`). + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-027:** Reject or prevent the operation when its stated validation rules are not met: Vehicles with status `Maintenance` cannot be assigned to dispatches. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Logistics & Fleet workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-FLEETREGISTRY-001: Transport Fleet Registry](functional-reqs.md#fr-fleetregistry-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/functional-reqs.md new file mode 100644 index 0000000..98b7d63 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/functional-reqs.md @@ -0,0 +1,89 @@ +--- +id: UC-011-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-011 Customer Receivables and Credit Controls + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-011` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-CUSTOMERRECEIVABLES-001: Customer Ledger & Aging Statement + +- **Requirement ID:** `FR-CUSTOMERRECEIVABLES-001` +- **Parent UC:** `UC-011` +- **Source Feature:** `BRD-FR-028` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Sub-ledger entries are immutable; corrections require credit/debit adjustment vouchers. + +### Statement + +The system must maintain an immutable party sub-ledger for each customer, debiting finalized sales invoices, crediting payment receipts, and presenting a real-time outstanding balance and aging schedule (0–7 days, 8–15 days, 16–30 days, >30 days). + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Customer ID, Posting Date, Voucher Type (`Sales Invoice`, `Payment Receipt`), Voucher No, Debit Amount INR, Credit Amount INR, Running Outstanding INR. +2. The system enforces the source-defined validation rules: Sub-ledger entries are immutable; corrections require credit/debit adjustment vouchers. + +## FR-CUSTOMERRECEIVABLES-002: Automated Customer Credit Exposure Watch & Threshold Alert + +- **Requirement ID:** `FR-CUSTOMERRECEIVABLES-002` +- **Parent UC:** `UC-011` +- **Source Feature:** `BRD-FR-029` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Evaluated in real time upon every sales invoice post and payment receipt post. + +### Statement + +The system must continuously recompute the customer exposure ratio ($\text{Outstanding} / \text{Credit Limit}$). If exposure $>80\%$, the account must be automatically tagged with a visual `Watch` badge, and an operational warning alert generated on the Executive Dashboard. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Customer Code, Customer Name, Sanctioned Credit Limit INR, Outstanding INR, Exposure %, Risk Flag (`Normal`, `Watch`, `Critical`). +2. The system enforces the source-defined validation rules: Evaluated in real time upon every sales invoice post and payment receipt post. + +## FR-CUSTOMERRECEIVABLES-003: Credit Breach Dispatch Lock & Partner Override + +- **Requirement ID:** `FR-CUSTOMERRECEIVABLES-003` +- **Parent UC:** `UC-011` +- **Source Feature:** `BRD-FR-030` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Override action permanently logged in audit trail. + +--- + +### Statement + +If a customer's outstanding receivables exceed 100% of their sanctioned credit limit, all pending dispatches for that customer must be locked. Only a Partner user can record an explicit electronic approval override with mandatory justification notes to release the lock. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Lock Status (`Active`, `Overridden`), Override Approved By, Override Reason, Timestamp. +2. The system enforces the source-defined validation rules: Override action permanently logged in audit trail. + +--- + +## FR-CUSTOMERRECEIVABLES-004: Customer Payment Receipt Posting + +- **Requirement ID:** `FR-CUSTOMERRECEIVABLES-004` +- **Parent UC:** `UC-011` +- **Source Feature:** `BRD-FR-031` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Amount must be $> 0$. Credit applied to customer ledger immediately upon `Cleared` status. Reversal action generates immutable audit trail entry and notifies Accounts Executive and Sales Manager. + +### Statement + +The system must record customer payments capturing payment date, customer code, received amount in INR, payment instrument mode (`NEFT`, `RTGS`, `Cheque`, `Cash`, `UPI`), bank reference/UTR number, and payment status (`Pending Clearance`, `Cleared`, `Bounced`). The system must enforce automatic reversal upon Cheque/Instrument Bounce: if an instrument status transitions to `Bounced`, the system must immediately reverse the credit entry on the customer sub-ledger, restore the previous outstanding debt, recompute exposure ratio %, reinstate credit locks if exposure $>100\%$, and trigger an urgent financial alert. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Receipt ID (`PAY-YYYYMM-xxx`), Date, Customer ID, Amount INR, Payment Mode, UTR/Cheque No, Bank Name, Clearance Status, Bounce Reason, Reversal Voucher ID. +2. The system enforces the source-defined validation rules: Amount must be $> 0$. Credit applied to customer ledger immediately upon `Cleared` status. Reversal action generates immutable audit trail entry and notifies Accounts Executive and Sales Manager. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/use-case.md new file mode 100644 index 0000000..336ece6 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-011-customer-receivables/use-case.md @@ -0,0 +1,67 @@ +--- +id: UC-011 +version: 1.0.0 +status: Draft +--- + +# UC-011 — Customer Receivables and Credit Controls + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-011` | +| **Name** | Customer Receivables and Credit Controls | +| **Owning Domain** | Finance | +| **Primary Actor(s)** | Accounts Executive / Partner / Sales Manager | +| **Supporting Actor(s)** | Accounts Executive, Sales Manager, Partner, Managing Director | +| **Source Features** | `BRD-FR-028`, `BRD-FR-029`, `BRD-FR-030`, `BRD-FR-031` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review customer balances and exposure, record payments, and enforce authorized controls when exposure breaches the approved limit. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 4 business operations covered by this use case: customer ledger & aging statement; automated customer credit exposure watch & threshold alert; credit breach dispatch lock & partner override; customer payment receipt posting. + +## Main Success Flow + +1. The actor initiates **Customer Ledger & Aging Statement**. The system performs the source-defined behavior: The system must maintain an immutable party sub-ledger for each customer, debiting finalized sales invoices, crediting payment receipts, and presenting a real-time outstanding balance and aging schedule (0–7 days, 8–15 days, 16–30 days, >30 days). +2. The actor initiates **Automated Customer Credit Exposure Watch & Threshold Alert**. The system performs the source-defined behavior: The system must continuously recompute the customer exposure ratio ($\text{Outstanding} / \text{Credit Limit}$). If exposure $>80\%$, the account must be automatically tagged with a visual `Watch` badge, and an operational warning alert generated on the Executive Dashboard. +3. The actor initiates **Credit Breach Dispatch Lock & Partner Override**. The system performs the source-defined behavior: If a customer's outstanding receivables exceed 100% of their sanctioned credit limit, all pending dispatches for that customer must be locked. Only a Partner user can record an explicit electronic approval override with mandatory justification notes to release the lock. +4. The actor initiates **Customer Payment Receipt Posting**. The system performs the source-defined behavior: The system must record customer payments capturing payment date, customer code, received amount in INR, payment instrument mode (`NEFT`, `RTGS`, `Cheque`, `Cash`, `UPI`), bank reference/UTR number, and payment status (`Pending Clearance`, `Cleared`, `Bounced`). The system must enforce automatic reversal upon Cheque/Instrument Bounce: if an instrument status transitions to `Bounced`, the system must immediately reverse the credit entry on the customer sub-ledger, restore the previous outstanding debt, recompute exposure ratio %, reinstate credit locks if exposure $>100\%$, and trigger an urgent financial alert. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-028:** Reject or prevent the operation when its stated validation rules are not met: Sub-ledger entries are immutable; corrections require credit/debit adjustment vouchers. +- **BRD-FR-029:** Reject or prevent the operation when its stated validation rules are not met: Evaluated in real time upon every sales invoice post and payment receipt post. +- **BRD-FR-030:** Reject or prevent the operation when its stated validation rules are not met: Override action permanently logged in audit trail. + +--- +- **BRD-FR-031:** Reject or prevent the operation when its stated validation rules are not met: Amount must be $> 0$. Credit applied to customer ledger immediately upon `Cleared` status. Reversal action generates immutable audit trail entry and notifies Accounts Executive and Sales Manager. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-CUSTOMERRECEIVABLES-001: Customer Ledger & Aging Statement](functional-reqs.md#fr-customerreceivables-001) +- [FR-CUSTOMERRECEIVABLES-002: Automated Customer Credit Exposure Watch & Threshold Alert](functional-reqs.md#fr-customerreceivables-002) +- [FR-CUSTOMERRECEIVABLES-003: Credit Breach Dispatch Lock & Partner Override](functional-reqs.md#fr-customerreceivables-003) +- [FR-CUSTOMERRECEIVABLES-004: Customer Payment Receipt Posting](functional-reqs.md#fr-customerreceivables-004) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/functional-reqs.md new file mode 100644 index 0000000..87f8d07 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-012-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-012 Supplier Payables and Aging + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-012` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-SUPPLIERPAYABLES-001: Supplier Payables Aging & Balance Snapshots + +- **Requirement ID:** `FR-SUPPLIERPAYABLES-001` +- **Parent UC:** `UC-012` +- **Source Feature:** `BRD-FR-032` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Automated calculation of due date based on GRN date + credit days. + +### Statement + +The system must track supplier payables arising from accepted GRNs, applying supplier credit days, generating aging schedules, and providing daily aggregate payables snapshots. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Supplier ID, GRN No, Invoice Amount INR, Due Date, Days Overdue, Payment Status (`Unpaid`, `Partially Paid`, `Paid`). +2. The system enforces the source-defined validation rules: Automated calculation of due date based on GRN date + credit days. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/use-case.md new file mode 100644 index 0000000..97c6dd5 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-012-supplier-payables/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-012 +version: 1.0.0 +status: Draft +--- + +# UC-012 — Supplier Payables and Aging + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-012` | +| **Name** | Supplier Payables and Aging | +| **Owning Domain** | Finance | +| **Primary Actor(s)** | Accounts Executive | +| **Supporting Actor(s)** | Partner | +| **Source Features** | `BRD-FR-032` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review supplier payable balances and aging snapshots. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: supplier payables aging & balance snapshots. + +## Main Success Flow + +1. The actor initiates **Supplier Payables Aging & Balance Snapshots**. The system performs the source-defined behavior: The system must track supplier payables arising from accepted GRNs, applying supplier credit days, generating aging schedules, and providing daily aggregate payables snapshots. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-032:** Reject or prevent the operation when its stated validation rules are not met: Automated calculation of due date based on GRN date + credit days. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-SUPPLIERPAYABLES-001: Supplier Payables Aging & Balance Snapshots](functional-reqs.md#fr-supplierpayables-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/functional-reqs.md new file mode 100644 index 0000000..e0feaac --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/functional-reqs.md @@ -0,0 +1,35 @@ +--- +id: UC-013-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-013 Mandi Operating Expense Recording + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-013` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-OPERATINGEXPENSES-001: Mandi Operating Expense Classification & Recording + +- **Requirement ID:** `FR-OPERATINGEXPENSES-001` +- **Parent UC:** `UC-013` +- **Source Feature:** `BRD-FR-033` +- **Priority:** Should (P1) +- **Referenced Screen / Route:** Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Expense vouchers must balance against cash/bank ledger accounts. + +--- + +### Statement + +The system must record operational expenses incurred in mandi and godown operations categorizing entries under: Labor / Hamali (loading/unloading), Freight / Cartage, Weighbridge Fees, Godown Rent, Mandi Cess, Pest Control/Fumigation, and Office Expenses. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Expense ID (`EXP-YYYYMM-xxx`), Date, Category, Amount INR, Payee / Vendor, Linked Consignment / Sauda (if applicable), Payment Mode, Status. +2. The system enforces the source-defined validation rules: Expense vouchers must balance against cash/bank ledger accounts. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/use-case.md new file mode 100644 index 0000000..3c4043a --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-013-operating-expenses/use-case.md @@ -0,0 +1,58 @@ +--- +id: UC-013 +version: 1.0.0 +status: Draft +--- + +# UC-013 — Mandi Operating Expense Recording + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-013` | +| **Name** | Mandi Operating Expense Recording | +| **Owning Domain** | Finance | +| **Primary Actor(s)** | Accounts Executive | +| **Supporting Actor(s)** | None stated | +| **Source Features** | `BRD-FR-033` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Record and classify a mandi or godown operating expense and reconcile its voucher against the cash or bank ledger. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: mandi operating expense classification & recording. + +## Main Success Flow + +1. The actor initiates **Mandi Operating Expense Classification & Recording**. The system performs the source-defined behavior: The system must record operational expenses incurred in mandi and godown operations categorizing entries under: Labor / Hamali (loading/unloading), Freight / Cartage, Weighbridge Fees, Godown Rent, Mandi Cess, Pest Control/Fumigation, and Office Expenses. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-033:** Reject or prevent the operation when its stated validation rules are not met: Expense vouchers must balance against cash/bank ledger accounts. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Finance workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-OPERATINGEXPENSES-001: Mandi Operating Expense Classification & Recording](functional-reqs.md#fr-operatingexpenses-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/functional-reqs.md new file mode 100644 index 0000000..589d47e --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/functional-reqs.md @@ -0,0 +1,35 @@ +--- +id: UC-014-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-014 Operational Alert Review + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-014` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-OPERATIONALALERTS-001: Real-Time Operational Alerts Engine + +- **Requirement ID:** `FR-OPERATIONALALERTS-001` +- **Parent UC:** `UC-014` +- **Source Feature:** `BRD-FR-034` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Management & Alerts workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Evaluated synchronously upon transaction mutations and refreshed periodically. + +### Statement + +The system must evaluate active business data and publish automated proactive alerts across four critical categories: + 1. **QC Pending Alert:** Lots in state `Under QC` for $>24$ hours or currently on `QC Hold`. + 2. **Warehouse Capacity Alert:** Godowns exceeding 85% storage capacity utilization. + 3. **Credit Risk Alert:** Customer accounts exceeding 80% or 100% of sanctioned credit limit. + 4. **Active Procurement Window Alert:** Mandis with open buying orders during active trading hours. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Alert ID, Severity (`Info`, `Warning`, `Critical`), Category, Title, Detail Text, Timestamp, Dismissed Status. +2. The system enforces the source-defined validation rules: Evaluated synchronously upon transaction mutations and refreshed periodically. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/use-case.md new file mode 100644 index 0000000..e21a764 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-014-operational-alerts/use-case.md @@ -0,0 +1,60 @@ +--- +id: UC-014 +version: 1.0.0 +status: Draft +--- + +# UC-014 — Operational Alert Review + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-014` | +| **Name** | Operational Alert Review | +| **Owning Domain** | Management & Alerts | +| **Primary Actor(s)** | Partner / Operations Supervisor | +| **Supporting Actor(s)** | Partner, Operations Supervisor | +| **Source Features** | `BRD-FR-034` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review proactive alerts for QC, warehouse capacity, customer credit risk, and active procurement windows. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: real-time operational alerts engine. + +## Main Success Flow + +1. The actor initiates **Real-Time Operational Alerts Engine**. The system performs the source-defined behavior: The system must evaluate active business data and publish automated proactive alerts across four critical categories: + 1. **QC Pending Alert:** Lots in state `Under QC` for $>24$ hours or currently on `QC Hold`. + 2. **Warehouse Capacity Alert:** Godowns exceeding 85% storage capacity utilization. + 3. **Credit Risk Alert:** Customer accounts exceeding 80% or 100% of sanctioned credit limit. + 4. **Active Procurement Window Alert:** Mandis with open buying orders during active trading hours. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-034:** Reject or prevent the operation when its stated validation rules are not met: Evaluated synchronously upon transaction mutations and refreshed periodically. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Management & Alerts workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-OPERATIONALALERTS-001: Real-Time Operational Alerts Engine](functional-reqs.md#fr-operationalalerts-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/functional-reqs.md new file mode 100644 index 0000000..3e3bb01 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/functional-reqs.md @@ -0,0 +1,53 @@ +--- +id: UC-015-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-015 Executive Dashboard and Trading Snapshots + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-015` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-EXECUTIVEREPORTING-001: Executive Control Centre Dashboard + +- **Requirement ID:** `FR-EXECUTIVEREPORTING-001` +- **Parent UC:** `UC-015` +- **Source Feature:** `BRD-FR-035` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Management workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Dashboard must load within $\le 1.5\text{s}$. + +### Statement + +The system must provide a unified operational dashboard displaying real-time metrics: Total Stock on Hand (MT), Total Active Stock Lines, Intraday Purchase Value INR, Intraday Sales Revenue INR, Total Customer Receivables INR, Top 10 Stock Lines by Volume, Top Recent Sales, and Warehouse Utilization Barometers. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: KPI Metric Cards, Warehouse Position Table, Top Stock Grid, Recent Sales Feed, Active Alerts Feed. +2. The system enforces the source-defined validation rules: Dashboard must load within $\le 1.5\text{s}$. + +## FR-EXECUTIVEREPORTING-002: 20-Day Consolidated Trading Trend Reporting + +- **Requirement ID:** `FR-EXECUTIVEREPORTING-002` +- **Parent UC:** `UC-015` +- **Source Feature:** `BRD-FR-036` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Management workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Dynamically calculated from transaction ledgers; sub-second query performance. + +--- + +### Statement + +The system must compile daily management snapshots across a rolling 20-day trading window, tabulating: Date, Purchases MT, Sales MT, Closing Stock MT, Total Receivables INR, and Total Payables INR. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Daily Snapshot Array (Date, Purchases MT, Sales MT, Stock MT, Receivables INR, Payables INR). +2. The system enforces the source-defined validation rules: Dynamically calculated from transaction ledgers; sub-second query performance. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/use-case.md new file mode 100644 index 0000000..3a7f532 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-015-executive-reporting/use-case.md @@ -0,0 +1,61 @@ +--- +id: UC-015 +version: 1.0.0 +status: Draft +--- + +# UC-015 — Executive Dashboard and Trading Snapshots + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-015` | +| **Name** | Executive Dashboard and Trading Snapshots | +| **Owning Domain** | Management | +| **Primary Actor(s)** | Partner / Managing Director | +| **Supporting Actor(s)** | Partner, Managing Director | +| **Source Features** | `BRD-FR-035`, `BRD-FR-036` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review current operational indicators and rolling 20-day purchase, sales, stock, receivable, and payable snapshots. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 2 business operations covered by this use case: executive control centre dashboard; 20-day consolidated trading trend reporting. + +## Main Success Flow + +1. The actor initiates **Executive Control Centre Dashboard**. The system performs the source-defined behavior: The system must provide a unified operational dashboard displaying real-time metrics: Total Stock on Hand (MT), Total Active Stock Lines, Intraday Purchase Value INR, Intraday Sales Revenue INR, Total Customer Receivables INR, Top 10 Stock Lines by Volume, Top Recent Sales, and Warehouse Utilization Barometers. +2. The actor initiates **20-Day Consolidated Trading Trend Reporting**. The system performs the source-defined behavior: The system must compile daily management snapshots across a rolling 20-day trading window, tabulating: Date, Purchases MT, Sales MT, Closing Stock MT, Total Receivables INR, and Total Payables INR. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-035:** Reject or prevent the operation when its stated validation rules are not met: Dashboard must load within $\le 1.5\text{s}$. +- **BRD-FR-036:** Reject or prevent the operation when its stated validation rules are not met: Dynamically calculated from transaction ledgers; sub-second query performance. + +--- + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Management workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-EXECUTIVEREPORTING-001: Executive Control Centre Dashboard](functional-reqs.md#fr-executivereporting-001) +- [FR-EXECUTIVEREPORTING-002: 20-Day Consolidated Trading Trend Reporting](functional-reqs.md#fr-executivereporting-002) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/functional-reqs.md new file mode 100644 index 0000000..cf03797 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/functional-reqs.md @@ -0,0 +1,49 @@ +--- +id: UC-016-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-016 Commodity and Trading Counterparty Master Data + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-016` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-MASTERDATA-001: Agricultural Commodity Master Data Management + +- **Requirement ID:** `FR-MASTERDATA-001` +- **Parent UC:** `UC-016` +- **Source Feature:** `BRD-FR-037` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Master Data workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Commodity code must be unique; cannot delete commodities with active stock ledger entries. + +### Statement + +Maintain authoritative master catalogs for: Commodities (Chana, Soybean, Mustard, Wheat, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Turmeric), Varieties per commodity (e.g., Lokwan, Pusa, Eagle/Badami), and Commercial Quality Grades (`FAQ`, `Premium`, `Below FAQ`). + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Commodity Code, Commodity Name, Category (`Grains`, `Pulses`, `Oilseeds`, `Spices`), Varieties List, Standard Bag Weight kg. +2. The system enforces the source-defined validation rules: Commodity code must be unique; cannot delete commodities with active stock ledger entries. + +## FR-MASTERDATA-002: Trading Counterparty Masters (Suppliers, Customers & Godowns) + +- **Requirement ID:** `FR-MASTERDATA-002` +- **Parent UC:** `UC-016` +- **Source Feature:** `BRD-FR-038` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Master Data workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Tax IDs validated where applicable. + +### Statement + +Maintain registries for: (1) Suppliers (Code, Name, City, Segment, Credit Days: 7/15/21), (2) Customers (Code, Name, City, Segment, Credit Limit INR, Contact), and (3) Godowns/Warehouses (Code, Name, City, Capacity MT). + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Entity Code, Name, Address, GSTIN/PAN, Bank Details, Status (`Active`, `Inactive`). +2. The system enforces the source-defined validation rules: Tax IDs validated where applicable. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/use-case.md new file mode 100644 index 0000000..b837c4d --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-016-master-data/use-case.md @@ -0,0 +1,59 @@ +--- +id: UC-016 +version: 1.0.0 +status: Draft +--- + +# UC-016 — Commodity and Trading Counterparty Master Data + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-016` | +| **Name** | Commodity and Trading Counterparty Master Data | +| **Owning Domain** | Master Data | +| **Primary Actor(s)** | System Administrator / Accounts Executive | +| **Supporting Actor(s)** | System Administrator, Accounts Executive | +| **Source Features** | `BRD-FR-037`, `BRD-FR-038` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Maintain the commodity catalogs and trading-party/warehouse registries used by business workflows. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 2 business operations covered by this use case: agricultural commodity master data management; trading counterparty masters (suppliers, customers & godowns). + +## Main Success Flow + +1. The actor initiates **Agricultural Commodity Master Data Management**. The system performs the source-defined behavior: Maintain authoritative master catalogs for: Commodities (Chana, Soybean, Mustard, Wheat, Coriander, Cumin, Fenugreek, Groundnut, Isabgol, Jaggery, Maize, Turmeric), Varieties per commodity (e.g., Lokwan, Pusa, Eagle/Badami), and Commercial Quality Grades (`FAQ`, `Premium`, `Below FAQ`). +2. The actor initiates **Trading Counterparty Masters (Suppliers, Customers & Godowns)**. The system performs the source-defined behavior: Maintain registries for: (1) Suppliers (Code, Name, City, Segment, Credit Days: 7/15/21), (2) Customers (Code, Name, City, Segment, Credit Limit INR, Contact), and (3) Godowns/Warehouses (Code, Name, City, Capacity MT). + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-037:** Reject or prevent the operation when its stated validation rules are not met: Commodity code must be unique; cannot delete commodities with active stock ledger entries. +- **BRD-FR-038:** Reject or prevent the operation when its stated validation rules are not met: Tax IDs validated where applicable. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Master Data workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-MASTERDATA-001: Agricultural Commodity Master Data Management](functional-reqs.md#fr-masterdata-001) +- [FR-MASTERDATA-002: Trading Counterparty Masters (Suppliers, Customers & Godowns)](functional-reqs.md#fr-masterdata-002) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/functional-reqs.md new file mode 100644 index 0000000..45d34a7 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/functional-reqs.md @@ -0,0 +1,67 @@ +--- +id: UC-017-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-017 Tenant Isolation, Business Permissions and Audit + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-017` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-TENANTSECURITYAUDIT-001: Tenant Data Isolation + +- **Requirement ID:** `FR-TENANTSECURITYAUDIT-001` +- **Parent UC:** `UC-017` +- **Source Feature:** `BRD-FR-039` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Architecture & Security workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Tenant context must be enforced on every applicable business operation and verified for cross-tenant data access. + +### Statement + +Each independent trading enterprise is a tenant; its branches and godowns operate within that tenant boundary. Users and transactions must be associated with the correct tenant, and access to one tenant’s business data must not expose another tenant’s data. The isolation implementation must conform to the active technology profile. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Tenant ID, Tenant Name, Tenant Status, Tenant Administrator, Branch and Godown IDs. +2. The system enforces the source-defined validation rules: Tenant context must be enforced on every applicable business operation and verified for cross-tenant data access. + +## FR-TENANTSECURITYAUDIT-002: Role-Based Access Control (RBAC) & Permission Scoping + +- **Requirement ID:** `FR-TENANTSECURITYAUDIT-002` +- **Parent UC:** `UC-017` +- **Source Feature:** `BRD-FR-040` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Architecture & Security workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Segregation of duties enforced: Quality Officers cannot edit prices; Yard Supervisors cannot confirm sales; Sales Executives cannot override credit locks. + +### Statement + +Access to business records and actions must be governed by role-based permissions for the roles defined in this PRD: `Tenant Administrator`, `Mandi Buyer`, `Purchase Manager`, `Yard Supervisor`, `Quality Officer`, `Sales Executive`, `Sales Manager`, `Logistics Coordinator`, `Accounts Executive`, `Partner / MD`, and `System Administrator`. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Role Name, Resource/Action Permission Matrix (`Read`, `Write`, `Create`, `Delete`, `Submit`, `Cancel`, `Amend`). +2. The system enforces the source-defined validation rules: Segregation of duties enforced: Quality Officers cannot edit prices; Yard Supervisors cannot confirm sales; Sales Executives cannot override credit locks. + +## FR-TENANTSECURITYAUDIT-003: Immutable Transaction Audit Logging + +- **Requirement ID:** `FR-TENANTSECURITYAUDIT-003` +- **Parent UC:** `UC-017` +- **Source Feature:** `BRD-FR-041` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Architecture & Security workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** Audit history cannot be deleted or modified through normal application operations. + +### Statement + +Submitted business records (GRNs, Sales Orders, Dispatches, Payment Receipts) must preserve an auditable history. Corrections must not silently rewrite the business history. The system must record user ID, timestamp, and the changed values for governed mutations. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Audit Trail Log ID, Document Type, Document Name, Modified By, Modified Timestamp, Field Diff JSON. +2. The system enforces the source-defined validation rules: Audit history cannot be deleted or modified through normal application operations. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/use-case.md new file mode 100644 index 0000000..3cf7678 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-017-tenant-security-audit/use-case.md @@ -0,0 +1,62 @@ +--- +id: UC-017 +version: 1.0.0 +status: Draft +--- + +# UC-017 — Tenant Isolation, Business Permissions and Audit + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-017` | +| **Name** | Tenant Isolation, Business Permissions and Audit | +| **Owning Domain** | Architecture & Security | +| **Primary Actor(s)** | System Administrator | +| **Supporting Actor(s)** | None stated | +| **Source Features** | `BRD-FR-039`, `BRD-FR-040`, `BRD-FR-041` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Enforce tenant data boundaries and business-role permissions while preserving immutable histories of governed transactions. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 3 business operations covered by this use case: tenant data isolation; role-based access control (rbac) & permission scoping; immutable transaction audit logging. + +## Main Success Flow + +1. The actor initiates **Tenant Data Isolation**. The system performs the source-defined behavior: Each independent trading enterprise is a tenant; its branches and godowns operate within that tenant boundary. Users and transactions must be associated with the correct tenant, and access to one tenant’s business data must not expose another tenant’s data. The isolation implementation must conform to the active technology profile. +2. The actor initiates **Role-Based Access Control (RBAC) & Permission Scoping**. The system performs the source-defined behavior: Access to business records and actions must be governed by role-based permissions for the roles defined in this PRD: `Tenant Administrator`, `Mandi Buyer`, `Purchase Manager`, `Yard Supervisor`, `Quality Officer`, `Sales Executive`, `Sales Manager`, `Logistics Coordinator`, `Accounts Executive`, `Partner / MD`, and `System Administrator`. +3. The actor initiates **Immutable Transaction Audit Logging**. The system performs the source-defined behavior: Submitted business records (GRNs, Sales Orders, Dispatches, Payment Receipts) must preserve an auditable history. Corrections must not silently rewrite the business history. The system must record user ID, timestamp, and the changed values for governed mutations. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- **BRD-FR-039:** Reject or prevent the operation when its stated validation rules are not met: Tenant context must be enforced on every applicable business operation and verified for cross-tenant data access. +- **BRD-FR-040:** Reject or prevent the operation when its stated validation rules are not met: Segregation of duties enforced: Quality Officers cannot edit prices; Yard Supervisors cannot confirm sales; Sales Executives cannot override credit locks. +- **BRD-FR-041:** Reject or prevent the operation when its stated validation rules are not met: Audit history cannot be deleted or modified through normal application operations. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Architecture & Security workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-TENANTSECURITYAUDIT-001: Tenant Data Isolation](functional-reqs.md#fr-tenantsecurityaudit-001) +- [FR-TENANTSECURITYAUDIT-002: Role-Based Access Control (RBAC) & Permission Scoping](functional-reqs.md#fr-tenantsecurityaudit-002) +- [FR-TENANTSECURITYAUDIT-003: Immutable Transaction Audit Logging](functional-reqs.md#fr-tenantsecurityaudit-003) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/functional-reqs.md new file mode 100644 index 0000000..2bdf772 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-018-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-018 Tenant Provisioning and Lifecycle + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-018` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-TENANTLIFECYCLE-001: Tenant Provisioning and Lifecycle Management + +- **Requirement ID:** `FR-TENANTLIFECYCLE-001` +- **Parent UC:** `UC-018` +- **Source Feature:** `BRD-FR-042` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Platform Administration workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +Public self-service tenant signup is out of scope for v1. An authorized platform administrator must create and configure each tenant, assign its initial Tenant Administrator, and activate, suspend, or close the tenant through a controlled lifecycle. Tenant lifecycle changes must not silently delete or expose business records. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Tenant ID, Tenant Name, Lifecycle Status, Created/Updated Timestamps, Tenant Administrator, Lifecycle Actor and Reason. +2. The outcome satisfies the source-defined acceptance intent: Each lifecycle transition is authorized, recorded, and reflected consistently across application access, API requests, and scheduled work. Closed/suspended tenant data handling follows the retention and deletion policy approved for the service. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/use-case.md new file mode 100644 index 0000000..8d6be5e --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-018-tenant-lifecycle/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-018 +version: 1.0.0 +status: Draft +--- + +# UC-018 — Tenant Provisioning and Lifecycle + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-018` | +| **Name** | Tenant Provisioning and Lifecycle | +| **Owning Domain** | Platform Administration | +| **Primary Actor(s)** | System Administrator | +| **Supporting Actor(s)** | None stated | +| **Source Features** | `BRD-FR-042` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Create, configure, activate, suspend, or close a tenant through an authorized and recorded lifecycle. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: tenant provisioning and lifecycle management. + +## Main Success Flow + +1. The actor initiates **Tenant Provisioning and Lifecycle Management**. The system performs the source-defined behavior: Public self-service tenant signup is out of scope for v1. An authorized platform administrator must create and configure each tenant, assign its initial Tenant Administrator, and activate, suspend, or close the tenant through a controlled lifecycle. Tenant lifecycle changes must not silently delete or expose business records. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Platform Administration workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-TENANTLIFECYCLE-001: Tenant Provisioning and Lifecycle Management](functional-reqs.md#fr-tenantlifecycle-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/functional-reqs.md new file mode 100644 index 0000000..e39e312 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/functional-reqs.md @@ -0,0 +1,49 @@ +--- +id: UC-019-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-019 Tenant Membership and Verified Context + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-019` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-TENANTMEMBERSHIPCONTEXT-001: Tenant Membership and Role Administration + +- **Requirement ID:** `FR-TENANTMEMBERSHIPCONTEXT-001` +- **Parent UC:** `UC-019` +- **Source Feature:** `BRD-FR-043` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Identity & Access Management workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +A person may hold active memberships in multiple tenants. A Tenant Administrator must be able to add, deactivate, and assign approved business roles to users within their own tenant. A tenant administrator must not manage users or roles belonging to another tenant. Platform-level administrators and tenant-level administrators must have distinct permissions. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: User ID, Tenant ID, Membership Status, Role Assignments, Changed By, Changed At. +2. The outcome satisfies the source-defined acceptance intent: Users receive no tenant access without an active membership and role assignment; membership changes take effect on subsequent authorized operations and are auditable. + +## FR-TENANTMEMBERSHIPCONTEXT-002: Verified Tenant Context for Every Operation + +- **Requirement ID:** `FR-TENANTMEMBERSHIPCONTEXT-002` +- **Parent UC:** `UC-019` +- **Source Feature:** `BRD-FR-044` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Identity & Access Management workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The service must derive the effective tenant context from the authenticated user’s verified tenant membership. A client-supplied tenant identifier alone must never grant or switch tenant access. A user associated with multiple tenants must explicitly select the active tenant after sign-in; the service verifies that membership and its role for every request before permitting action in that tenant. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Authenticated Subject, Effective Tenant ID, Membership, Role Claims, Request/Correlation ID. +2. The outcome satisfies the source-defined acceptance intent: Missing, invalid, or unauthorized tenant context is denied by default; the same checks apply to REST APIs and non-interactive operations. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/use-case.md new file mode 100644 index 0000000..7b3b8c4 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-019-tenant-membership-context/use-case.md @@ -0,0 +1,58 @@ +--- +id: UC-019 +version: 1.0.0 +status: Draft +--- + +# UC-019 — Tenant Membership and Verified Context + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-019` | +| **Name** | Tenant Membership and Verified Context | +| **Owning Domain** | Identity & Access Management | +| **Primary Actor(s)** | Tenant Administrator / authenticated users | +| **Supporting Actor(s)** | Tenant Administrator, All authenticated users | +| **Source Features** | `BRD-FR-043`, `BRD-FR-044` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Administer tenant-scoped memberships and roles, then verify active tenant membership and role for each operation. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 2 business operations covered by this use case: tenant membership and role administration; verified tenant context for every operation. + +## Main Success Flow + +1. The actor initiates **Tenant Membership and Role Administration**. The system performs the source-defined behavior: A person may hold active memberships in multiple tenants. A Tenant Administrator must be able to add, deactivate, and assign approved business roles to users within their own tenant. A tenant administrator must not manage users or roles belonging to another tenant. Platform-level administrators and tenant-level administrators must have distinct permissions. +2. The actor initiates **Verified Tenant Context for Every Operation**. The system performs the source-defined behavior: The service must derive the effective tenant context from the authenticated user’s verified tenant membership. A client-supplied tenant identifier alone must never grant or switch tenant access. A user associated with multiple tenants must explicitly select the active tenant after sign-in; the service verifies that membership and its role for every request before permitting action in that tenant. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Identity & Access Management workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-TENANTMEMBERSHIPCONTEXT-001: Tenant Membership and Role Administration](functional-reqs.md#fr-tenantmembershipcontext-001) +- [FR-TENANTMEMBERSHIPCONTEXT-002: Verified Tenant Context for Every Operation](functional-reqs.md#fr-tenantmembershipcontext-002) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/functional-reqs.md new file mode 100644 index 0000000..5bdef49 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/functional-reqs.md @@ -0,0 +1,49 @@ +--- +id: UC-020-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-020 Tenant Resource Isolation and Privileged Support + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-020` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-TENANTSUPPORTSECURITY-001: End-to-End Tenant Resource Isolation + +- **Requirement ID:** `FR-TENANTSUPPORTSECURITY-001` +- **Parent UC:** `UC-020` +- **Source Feature:** `BRD-FR-045` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Platform Security workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +Tenant isolation must apply to all tenant-owned records and derived resources, including database reads and writes, API lookups, search/report results, exports, uploaded files, cache entries, and queued/background work. Cross-tenant access attempts must fail closed and must not reveal whether another tenant’s resource exists. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Tenant ID on tenant-owned resources; resource owner; access decision; actor; timestamp; correlation ID. +2. The outcome satisfies the source-defined acceptance intent: Automated negative tests demonstrate that users, crafted identifiers, concurrent requests, reused database connections, and background jobs cannot read or mutate another tenant’s resources. Database roles and policies must not allow normal application paths to bypass the configured row-level security controls. + +## FR-TENANTSUPPORTSECURITY-002: Controlled Privileged Support Access + +- **Requirement ID:** `FR-TENANTSUPPORTSECURITY-002` +- **Parent UC:** `UC-020` +- **Source Feature:** `BRD-FR-046` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Platform Security workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +Platform support must not imply routine unrestricted access to tenant business data. Support staff have no standing access to tenant business data. Ordinary exceptional access requires approval by that tenant’s Tenant Administrator for a specific support case and a limited duration. For an urgent incident, a designated platform security administrator may grant a break-glass access window of at most one hour, with a recorded reason, immediate audit alert, and notice to the tenant administrator within one business day. All access is recorded for tenant and platform security review. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Support Actor, Tenant ID, Reason/Case Reference, Approval, Start/End Time, Resources Accessed, Audit Event. +2. The outcome satisfies the source-defined acceptance intent: Privileged access can be granted and revoked through a controlled workflow; all such access is attributable and reviewable. Ordinary access requires tenant-admin approval; emergency break-glass access follows the one-hour limit and notification controls above. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/use-case.md new file mode 100644 index 0000000..b02badb --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-020-tenant-support-security/use-case.md @@ -0,0 +1,58 @@ +--- +id: UC-020 +version: 1.0.0 +status: Draft +--- + +# UC-020 — Tenant Resource Isolation and Privileged Support + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-020` | +| **Name** | Tenant Resource Isolation and Privileged Support | +| **Owning Domain** | Platform Security | +| **Primary Actor(s)** | System Administrator / Tenant Administrator / users | +| **Supporting Actor(s)** | All users; System Administrator for platform controls, System Administrator | +| **Source Features** | `BRD-FR-045`, `BRD-FR-046` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Protect tenant resources across application and asynchronous paths, and govern exceptional support access. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 2 business operations covered by this use case: end-to-end tenant resource isolation; controlled privileged support access. + +## Main Success Flow + +1. The actor initiates **End-to-End Tenant Resource Isolation**. The system performs the source-defined behavior: Tenant isolation must apply to all tenant-owned records and derived resources, including database reads and writes, API lookups, search/report results, exports, uploaded files, cache entries, and queued/background work. Cross-tenant access attempts must fail closed and must not reveal whether another tenant’s resource exists. +2. The actor initiates **Controlled Privileged Support Access**. The system performs the source-defined behavior: Platform support must not imply routine unrestricted access to tenant business data. Support staff have no standing access to tenant business data. Ordinary exceptional access requires approval by that tenant’s Tenant Administrator for a specific support case and a limited duration. For an urgent incident, a designated platform security administrator may grant a break-glass access window of at most one hour, with a recorded reason, immediate audit alert, and notice to the tenant administrator within one business day. All access is recorded for tenant and platform security review. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Platform Security workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-TENANTSUPPORTSECURITY-001: End-to-End Tenant Resource Isolation](functional-reqs.md#fr-tenantsupportsecurity-001) +- [FR-TENANTSUPPORTSECURITY-002: Controlled Privileged Support Access](functional-reqs.md#fr-tenantsupportsecurity-002) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/functional-reqs.md new file mode 100644 index 0000000..d6ecd35 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-021-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-021 Personal Data Purpose, Notice and Consent + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-021` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-PRIVACYPURPOSECONSENT-001: Personal Data Purpose, Notice & Consent Records + +- **Requirement ID:** `FR-PRIVACYPURPOSECONSENT-001` +- **Parent UC:** `UC-021` +- **Source Feature:** `BRD-FR-047` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Privacy Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The service must allow each responsible Data Fiduciary to determine and approve the processing purpose, applicable lawful basis, and privacy notice for its processing, then document personal-data categories, purpose, basis, notice version, and accountable contact. Tenant firms own these decisions for trading data; the ATB operator records them separately for its own account, security, and service processing. Privacy controls cover every natural person whose personal data is processed in tenant or platform contexts, whether or not that person has an application account. Where consent is the applicable basis, the service must capture evidence of the notice and consent, support withdrawal, and record resulting processing restrictions. Tenant and platform processing contexts must remain distinguishable. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Processing Purpose ID, Data Category, Responsible Entity/Role, Processing Basis, Notice Version, Consent Status and Timestamp, Withdrawal Timestamp, Contact. +2. The outcome satisfies the source-defined acceptance intent: Personal data processing purposes and notices are attributable to the responsible Data Fiduciary; consent-dependent processing can be stopped or adjusted following a verified withdrawal, subject to applicable lawful retention or other legal obligations. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/use-case.md new file mode 100644 index 0000000..c782230 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-021-privacy-purpose-consent/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-021 +version: 1.0.0 +status: Draft +--- + +# UC-021 — Personal Data Purpose, Notice and Consent + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-021` | +| **Name** | Personal Data Purpose, Notice and Consent | +| **Owning Domain** | Privacy Operations | +| **Primary Actor(s)** | Tenant Administrator / System Administrator | +| **Supporting Actor(s)** | Tenant Administrator; System Administrator for platform-controlled processing | +| **Source Features** | `BRD-FR-047` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Record each responsible Data Fiduciary’s processing purpose, lawful basis, notice, accountable contact, and any applicable consent and withdrawal evidence. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: personal data purpose, notice & consent records. + +## Main Success Flow + +1. The actor initiates **Personal Data Purpose, Notice & Consent Records**. The system performs the source-defined behavior: The service must allow each responsible Data Fiduciary to determine and approve the processing purpose, applicable lawful basis, and privacy notice for its processing, then document personal-data categories, purpose, basis, notice version, and accountable contact. Tenant firms own these decisions for trading data; the ATB operator records them separately for its own account, security, and service processing. Privacy controls cover every natural person whose personal data is processed in tenant or platform contexts, whether or not that person has an application account. Where consent is the applicable basis, the service must capture evidence of the notice and consent, support withdrawal, and record resulting processing restrictions. Tenant and platform processing contexts must remain distinguishable. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Privacy Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-PRIVACYPURPOSECONSENT-001: Personal Data Purpose, Notice & Consent Records](functional-reqs.md#fr-privacypurposeconsent-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/functional-reqs.md new file mode 100644 index 0000000..4ce0051 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-022-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-022 Data Principal Rights and Grievance Requests + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-022` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-DATAPRINCIPALRIGHTS-001: Data Principal Rights & Grievance Case Management + +- **Requirement ID:** `FR-DATAPRINCIPALRIGHTS-001` +- **Parent UC:** `UC-022` +- **Source Feature:** `BRD-FR-048` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Privacy Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The service must support receipt, identity verification, routing, tracking, response, and evidence retention for Data Principal requests and grievances concerning access to information, correction, erasure, consent withdrawal, grievance redressal, and nomination, as applicable, including for individuals who do not hold application accounts. Requests must be routed to the responsible Data Fiduciary and handled within the applicable statutory or approved contractual time limit. A request channel must be available without requiring a general customer or supplier portal account. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Request ID, Data Principal Identifier, Tenant/Platform Scope, Request Type, Verification Evidence, Responsible Fiduciary, Received/Due/Resolved Timestamps, Disposition, Response Evidence. +2. The outcome satisfies the source-defined acceptance intent: Requests are not silently lost or fulfilled against the wrong tenant; authorized operators can track deadlines, exceptions, approvals, and completion evidence while preserving tenant isolation. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/use-case.md new file mode 100644 index 0000000..8cdc4fb --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-022-data-principal-rights/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-022 +version: 1.0.0 +status: Draft +--- + +# UC-022 — Data Principal Rights and Grievance Requests + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-022` | +| **Name** | Data Principal Rights and Grievance Requests | +| **Owning Domain** | Privacy Operations | +| **Primary Actor(s)** | Tenant Administrator / System Administrator | +| **Supporting Actor(s)** | Tenant Administrator; System Administrator for platform-controlled processing | +| **Source Features** | `BRD-FR-048` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Receive, verify, route, track, and respond to Data Principal requests and grievances, including requests from people without application accounts. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: data principal rights & grievance case management. + +## Main Success Flow + +1. The actor initiates **Data Principal Rights & Grievance Case Management**. The system performs the source-defined behavior: The service must support receipt, identity verification, routing, tracking, response, and evidence retention for Data Principal requests and grievances concerning access to information, correction, erasure, consent withdrawal, grievance redressal, and nomination, as applicable, including for individuals who do not hold application accounts. Requests must be routed to the responsible Data Fiduciary and handled within the applicable statutory or approved contractual time limit. A request channel must be available without requiring a general customer or supplier portal account. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Privacy Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-DATAPRINCIPALRIGHTS-001: Data Principal Rights & Grievance Case Management](functional-reqs.md#fr-dataprincipalrights-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/functional-reqs.md new file mode 100644 index 0000000..56bb316 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-023-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-023 Personal Data Breach Response Coordination + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-023` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-PRIVACYBREACHRESPONSE-001: Personal Data Breach Response Coordination + +- **Requirement ID:** `FR-PRIVACYBREACHRESPONSE-001` +- **Parent UC:** `UC-023` +- **Source Feature:** `BRD-FR-049` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Privacy Operations & Security Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The service must support recording, triaging, investigation, impact assessment, remediation, and notification coordination for suspected or confirmed personal-data breaches. The platform operator must be able to identify affected tenants and notify the responsible tenant Data Fiduciary promptly when acting as its Data Processor. The workflow must support applicable notification content and deadlines to affected Data Principals and the Data Protection Board, including phased or subsequently amended statutory requirements. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Incident ID, Detection Time, Affected Data/Tenants/Principals, Processor/Fiduciary Roles, Severity, Timeline, Evidence, Mitigation, Notifications and Delivery Status. +2. The outcome satisfies the source-defined acceptance intent: Each incident has an accountable owner and audit trail; the responsible Data Fiduciary can assemble required facts and evidence for notifications and demonstrate completion within applicable deadlines. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/use-case.md new file mode 100644 index 0000000..804f609 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-023-privacy-breach-response/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-023 +version: 1.0.0 +status: Draft +--- + +# UC-023 — Personal Data Breach Response Coordination + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-023` | +| **Name** | Personal Data Breach Response Coordination | +| **Owning Domain** | Privacy Operations & Security Operations | +| **Primary Actor(s)** | System Administrator / Tenant Administrator | +| **Supporting Actor(s)** | System Administrator; Tenant Administrator for tenant-scoped incidents | +| **Source Features** | `BRD-FR-049` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Coordinate assessment, remediation, and notification work for suspected or confirmed personal-data breaches. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: personal data breach response coordination. + +## Main Success Flow + +1. The actor initiates **Personal Data Breach Response Coordination**. The system performs the source-defined behavior: The service must support recording, triaging, investigation, impact assessment, remediation, and notification coordination for suspected or confirmed personal-data breaches. The platform operator must be able to identify affected tenants and notify the responsible tenant Data Fiduciary promptly when acting as its Data Processor. The workflow must support applicable notification content and deadlines to affected Data Principals and the Data Protection Board, including phased or subsequently amended statutory requirements. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Privacy Operations & Security Operations workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-PRIVACYBREACHRESPONSE-001: Personal Data Breach Response Coordination](functional-reqs.md#fr-privacybreachresponse-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/functional-reqs.md new file mode 100644 index 0000000..f37e180 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-024-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-024 Purpose-Aware Retention, Erasure and Legal Holds + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-024` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-RETENTIONERASURE-001: Purpose-Aware Retention, Erasure & Legal Hold + +- **Requirement ID:** `FR-RETENTIONERASURE-001` +- **Parent UC:** `UC-024` +- **Source Feature:** `BRD-FR-050` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Privacy Operations & Data Governance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +Use four internal sensitivity levels—Public, Internal, Confidential, and Restricted—with a separate personal-data flag and processing-purpose tag; these are product handling labels, not statutory DPDP classifications. The responsible Data Fiduciary must approve retention schedules by personal-data category and processing purpose after legal/accounting review (tenant firms for trading data; ATB operator for its own account, security, and service data). Authorized operators must be able to apply these schedules by tenant/platform responsibility and applicable legal obligation. The service must support correction, erasure or irreversible de-identification when required, legal holds and statutory retention exceptions, and deletion handling for derived copies and processors, including backups according to the approved schedule. Statutory processing-log retention requirements must be represented separately from general business-record retention. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Data Category, Purpose, Responsible Fiduciary, Retention Rule, Trigger Date, Legal Basis/Exception, Hold Status, Erasure/De-identification Evidence, Processor Completion. +2. The outcome satisfies the source-defined acceptance intent: Data is not erased while an applicable hold or mandatory retention obligation applies; once all approved purposes and legal exceptions expire, erasure is trackable across applicable system copies and contracted processors. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/use-case.md new file mode 100644 index 0000000..86b272f --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-024-retention-erasure/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-024 +version: 1.0.0 +status: Draft +--- + +# UC-024 — Purpose-Aware Retention, Erasure and Legal Holds + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-024` | +| **Name** | Purpose-Aware Retention, Erasure and Legal Holds | +| **Owning Domain** | Privacy Operations & Data Governance | +| **Primary Actor(s)** | Tenant Administrator / System Administrator | +| **Supporting Actor(s)** | Tenant Administrator; System Administrator for platform-controlled processing | +| **Source Features** | `BRD-FR-050` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Apply approved retention schedules and manage correction, erasure, de-identification, legal holds, exceptions, and deletion evidence. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: purpose-aware retention, erasure & legal hold. + +## Main Success Flow + +1. The actor initiates **Purpose-Aware Retention, Erasure & Legal Hold**. The system performs the source-defined behavior: Use four internal sensitivity levels—Public, Internal, Confidential, and Restricted—with a separate personal-data flag and processing-purpose tag; these are product handling labels, not statutory DPDP classifications. The responsible Data Fiduciary must approve retention schedules by personal-data category and processing purpose after legal/accounting review (tenant firms for trading data; ATB operator for its own account, security, and service data). Authorized operators must be able to apply these schedules by tenant/platform responsibility and applicable legal obligation. The service must support correction, erasure or irreversible de-identification when required, legal holds and statutory retention exceptions, and deletion handling for derived copies and processors, including backups according to the approved schedule. Statutory processing-log retention requirements must be represented separately from general business-record retention. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Privacy Operations & Data Governance workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-RETENTIONERASURE-001: Purpose-Aware Retention, Erasure & Legal Hold](functional-reqs.md#fr-retentionerasure-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/functional-reqs.md new file mode 100644 index 0000000..104e559 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/functional-reqs.md @@ -0,0 +1,31 @@ +--- +id: UC-025-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-025 Processor and Subprocessor Governance + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-025` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-PROCESSORGOVERNANCE-001: Data Processor & Subprocessor Governance + +- **Requirement ID:** `FR-PROCESSORGOVERNANCE-001` +- **Parent UC:** `UC-025` +- **Source Feature:** `BRD-FR-051` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Platform Governance workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The platform operator must maintain an inventory of processors and subprocessors used for tenant personal data, their processing purpose and location, applicable safeguards and contractual obligations, and status of due diligence. The operator must support tenant Data Fiduciaries with information and operational assistance needed for security safeguards, Data Principal requests, breach response, retention, and erasure obligations. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Processor/Subprocessor, Processing Purpose, Data Categories, Processing Location, Contract/Safeguard Reference, Due-Diligence Status, Incident/Request Assistance Record. +2. The outcome satisfies the source-defined acceptance intent: Processor and subprocessor relationships are identifiable and reviewable; support actions are attributable and consistent with documented tenant instructions and applicable contractual safeguards. diff --git a/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/use-case.md new file mode 100644 index 0000000..0a52ccc --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-025-processor-governance/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-025 +version: 1.0.0 +status: Draft +--- + +# UC-025 — Processor and Subprocessor Governance + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-025` | +| **Name** | Processor and Subprocessor Governance | +| **Owning Domain** | Platform Governance | +| **Primary Actor(s)** | System Administrator | +| **Supporting Actor(s)** | None stated | +| **Source Features** | `BRD-FR-051` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Maintain processor and subprocessor records and provide accountable operational assistance to tenant Data Fiduciaries. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: data processor & subprocessor governance. + +## Main Success Flow + +1. The actor initiates **Data Processor & Subprocessor Governance**. The system performs the source-defined behavior: The platform operator must maintain an inventory of processors and subprocessors used for tenant personal data, their processing purpose and location, applicable safeguards and contractual obligations, and status of due diligence. The operator must support tenant Data Fiduciaries with information and operational assistance needed for security safeguards, Data Principal requests, breach response, retention, and erasure obligations. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Platform Governance workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-PROCESSORGOVERNANCE-001: Data Processor & Subprocessor Governance](functional-reqs.md#fr-processorgovernance-001) diff --git a/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/functional-reqs.md b/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/functional-reqs.md new file mode 100644 index 0000000..15f5e11 --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/functional-reqs.md @@ -0,0 +1,33 @@ +--- +id: UC-026-FR +version: 1.0.0 +status: Draft +--- + +# Functional Requirements — UC-026 Tenant Operating Policy Configuration + +| Field | Value | +|---|---| +| **Parent Use Case** | `UC-026` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## FR-TENANTOPERATINGPOLICIES-001: Tenant Operating Policy Configuration & Audit + +- **Requirement ID:** `FR-TENANTOPERATINGPOLICIES-001` +- **Parent UC:** `UC-026` +- **Source Feature:** `BRD-FR-052` +- **Priority:** Must (P0) +- **Referenced Screen / Route:** Tenant Business Administration workflow screen(s) — route(s) to be specified during Stage 11 screen design +- **Business Rules:** None stated in the source feature. + +### Statement + +The service must provide tenant-scoped configuration for the provisional operating thresholds listed in §6.2, including market-price variance, weighment shortage, bag tare/packing, commodity quality grading/deductions, credit exposure, warehouse capacity/adjustments/transfers, dispatch tolerances, and alert timing. Policies must support commodity, grade, contract, or other applicable scope and effective dates where needed. Only roles authorized in the tenant permission model may change them; changes must record actor, timestamp, reason, prior value, and new value. Seed values remain provisional. Before each affected live workflow is enabled for a tenant, that tenant’s Partner/Managing Director or delegated authorized business owner must review and confirm or edit every applicable threshold. Missing or unreviewed thresholds block only the affected risk-sensitive workflow. Confirmed policies are versioned with an effective date and changes are audited. + +### Acceptance Criteria + +1. The requirement records, computes, or presents the source-defined data attributes: Tenant ID, Policy Type, Scope (Commodity/Grade/Contract), Value, Unit, Effective From/To, Changed By/At, Reason, Prior Value. +2. The outcome satisfies the source-defined acceptance intent: One tenant’s policy never changes another tenant’s behavior. Applicable policy versions can be identified for every governed transaction; unauthorized or unaudited changes are rejected. Candidate values are never silently treated as universally validated rules; the affected workflow remains disabled for a tenant until its authorized business owner confirms or edits the applicable values. + +--- diff --git a/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/use-case.md b/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/use-case.md new file mode 100644 index 0000000..250cefa --- /dev/null +++ b/04_generated_documentation/03_requirements/use_cases/uc-026-tenant-operating-policies/use-case.md @@ -0,0 +1,56 @@ +--- +id: UC-026 +version: 1.0.0 +status: Draft +--- + +# UC-026 — Tenant Operating Policy Configuration + +| Field | Value | +|---|---| +| **Use Case ID** | `UC-026` | +| **Name** | Tenant Operating Policy Configuration | +| **Owning Domain** | Tenant Business Administration | +| **Primary Actor(s)** | Partner / Managing Director / authorized tenant functional managers | +| **Supporting Actor(s)** | Partner, Managing Director; authorized tenant functional managers | +| **Source Features** | `BRD-FR-052` | +| **Status** | Draft | +| **Version** | 1.0.0 | + +## Goal + +Review, configure, approve, and audit tenant-scoped operating thresholds before affected workflows are enabled. + +## Preconditions + +1. The actor is authenticated and has the role and tenant scope required by the source feature(s). +2. Any source records or master data explicitly required by the selected feature are available and in the required state. + +## Trigger + +The actor initiates one of the 1 business operations covered by this use case: tenant operating policy configuration & audit. + +## Main Success Flow + +1. The actor initiates **Tenant Operating Policy Configuration & Audit**. The system performs the source-defined behavior: The service must provide tenant-scoped configuration for the provisional operating thresholds listed in §6.2, including market-price variance, weighment shortage, bag tare/packing, commodity quality grading/deductions, credit exposure, warehouse capacity/adjustments/transfers, dispatch tolerances, and alert timing. Policies must support commodity, grade, contract, or other applicable scope and effective dates where needed. Only roles authorized in the tenant permission model may change them; changes must record actor, timestamp, reason, prior value, and new value. Seed values remain provisional. Before each affected live workflow is enabled for a tenant, that tenant’s Partner/Managing Director or delegated authorized business owner must review and confirm or edit every applicable threshold. Missing or unreviewed thresholds block only the affected risk-sensitive workflow. Confirmed policies are versioned with an effective date and changes are audited. + +## Alternate Flows + +- No alternate business flow is specified by the source features. + +## Exception Flows + +- Any exceptions remain as specified in the source feature; no additional behavior is inferred. + +## Postconditions + +- Successful operations create or update only the business records and outcomes stated in the linked BRD features. +- Rejected operations do not bypass the validations and controls stated by those features. + +## Referenced Screens / Routes + +- Tenant Business Administration workflow screen(s) — route(s) to be specified during Stage 11 screen design + +## Child Functional Requirements + +- [FR-TENANTOPERATINGPOLICIES-001: Tenant Operating Policy Configuration & Audit](functional-reqs.md#fr-tenantoperatingpolicies-001) diff --git a/prompts/20261011T074829Z-session-greenfield-bootstrap.md b/prompts/20261011T074829Z-session-greenfield-bootstrap.md index ad8f45d..89789b4 100644 --- a/prompts/20261011T074829Z-session-greenfield-bootstrap.md +++ b/prompts/20261011T074829Z-session-greenfield-bootstrap.md @@ -291,3 +291,27 @@ The first extraction attempt stopped on a heading-parser mismatch after the PRD ## 2026-10-11T09:46:12Z — Assistant — Action summary Completed Stage 1 extraction. Updated the master context to reflect the bounded Stage 1 baseline and corrected `AMB-006` to make qualified review a production-release gate. `brd_inventory.md` contains all 52 PRD functional requirements with source section, actor, priority, statement, Greenfield legacy-comparison status, and downstream mapping status, plus all 14 NFRs. Created `CKPT-007`. Verification: pending. + +## 2026-10-11T09:53:40Z — User + +Asked: “As per the process, which is next action” + +## 2026-10-11T09:53:40Z — Assistant — Action summary + +Checked UP-AI guidance, active technology profile, current checkpoint, and master context. The current checkpoint is `CKPT-007` (Stage 1 complete). Next: review `04_generated_documentation/01_source_inventories/brd_inventory.md` for completeness and consistency, then proceed to Stage 5 by authoring use cases with `/up-use-case-author`. Carry `ASM-001`–`ASM-003` forward; keep `AMB-001`, `AMB-006`, and `AMB-008` open as evidence/release gates. No artifacts other than this transcript were changed; no tests or gates run. + +## 2026-10-11T09:56:00Z — User + +Invoked `/up-use-case-author` and supplied its canonical skill procedure. + +## 2026-10-11T09:56:00Z — Assistant — Action summary + +Authored `UC-002` (Record Daily Mandi Arrivals and Prices) with child requirements `FR-MKT-001` and `FR-MKT-002`, sourced to `BRD-FR-001` and `BRD-FR-002`. Ran Gate 5.1: zero Critical and zero validator Major findings; `git diff --check` passed. Semantic review found the existing `UC-001` authentication FRs cite `BRD-FR-001`–`003`, which are Market Desk requirements in the baselined PRD. Recorded this as a Major follow-up in the traceability graph; a CR disposition is required before altering that baseline mapping. No tests run. + +## 2026-10-11T10:14:08Z — User + +Requested: “proceed with the remaining use cases authoring”. + +## 2026-10-11T10:14:08Z — Assistant — Action summary + +Authored UC-002–UC-026 and 52 child FRs to cover all BRD-FR-001–052 across 26 total use cases. Updated the BRD inventory downstream mappings, traceability graph, and checkpoint index; saved CKPT-008. Refined the decomposition to keep independent platform/privacy workflows in separate use cases. Gate 5.1 passed for 26 use cases and 55 total child FRs with zero validator findings; all 52 BRD features are mapped; new artifact frontmatter checks passed; `git diff --check` passed. Gate 9.1 is marked not run for the expanded scope. The pre-existing UC-001 authentication source mapping remains a semantic Major requiring CR analysis/disposition before editing that baseline. No tests run.