Removed ambiguity in Journey 3

This commit is contained in:
Prashant Shendre 2026-10-17 17:30:02 +05:30
parent f69d8e0f40
commit 90f2624ff9
2 changed files with 48 additions and 12 deletions

View File

@ -156,14 +156,20 @@ flowchart TD
> *"Here is where mandi trading firms lose the most money: Quality disputes. A farmer brings grain with 12% moisture when the FAQ limit is 10%. Traditionally, the trader and farmer haggle over a subjective discount. In ATB, laboratory science meets automated commercial deductions."* > *"Here is where mandi trading firms lose the most money: Quality disputes. A farmer brings grain with 12% moisture when the FAQ limit is 10%. Traditionally, the trader and farmer haggle over a subjective discount. In ATB, laboratory science meets automated commercial deductions."*
#### Click-by-Click Steps: #### Click-by-Click Steps:
1. **Switch Role:** Switch to `qc@malwa-agri.demo`. 1. **Switch Role:** In the top header role switcher, select `qc@malwa-agri.demo` (`Quality Officer`).
2. **Quality Lab Queue (`/quality/inspections`):** 2. **Navigate to Quality Lab Assay (`/quality`):**
- Select pending inspection for Gate Entry `GP-2026-001` (Sauda `SDA-2026-001`). - In the left sidebar navigation under **OPERATIONS**, click **Quality Lab Assay**.
- Notice the status is `QUALITY_HOLD`. The system blocks this grain from being sold or dispatched until QC clears it. - *Presenter Note / Status Clarification:* Point out the segregation of entity lifecycles:
- The physical vehicle at the weighbridge (`SCREEN-INW-001`) remains at status **`WEIGHED_GROSS`** (truck weighed, grain sampled on the ramp).
- The commodity lot in the Quality Lab (`SCREEN-QC-001`) is placed in mandatory **`QUALITY_HOLD`** (shown as `HOLD` in the *Inventory Lots & FSM Gating* tab).
- The system strictly blocks this grain from being allocated or sold until QC assay clearance.
3. **Enter Lab Assay Results:** 3. **Enter Lab Assay Results:**
- Click **+ Record Lab Assay** (or click **FSM Action** on lot `LOT-SOY-2026-001` in the *Inventory Lots & FSM Gating* tab).
- Verify Lot ID: `LOT-SOY-2026-001` (Sample Code: `SMP-0892` or `SMP-2026-001`).
- **Moisture Content:** Enter `11.50 %` (Standard FAQ benchmark is `10.00 %`). - **Moisture Content:** Enter `11.50 %` (Standard FAQ benchmark is `10.00 %`).
- **Foreign Matter (Admixture):** Enter `2.20 %` (Standard FAQ benchmark is `1.50 %`). - **Foreign Matter (Admixture):** Enter `2.20 %` (Standard FAQ benchmark is `1.50 %`).
- **Damaged / Discolored Grains:** Enter `1.80 %` (Within FAQ limit of 2.0%). - **Damaged / Discolored Grains:** Enter `1.80 %` (Within FAQ limit of 2.0%).
- **Oil Content:** Enter `18.50 %`.
4. **Review Automated Commercial Deduction:** 4. **Review Automated Commercial Deduction:**
- Show the prospect the calculated deductions: - Show the prospect the calculated deductions:
- **Excess Moisture:** $+1.50\% \rightarrow$ Physical weight deduction of **0.375 MT** ($25.000 \times 1.50\%$). - **Excess Moisture:** $+1.50\% \rightarrow$ Physical weight deduction of **0.375 MT** ($25.000 \times 1.50\%$).
@ -171,9 +177,10 @@ flowchart TD
- **Net Billable Weight:** $25.000 - 0.375 = \mathbf{24.625}$ **MT** (246.25 Quintals). - **Net Billable Weight:** $25.000 - 0.375 = \mathbf{24.625}$ **MT** (246.25 Quintals).
- **Total Quality Rebate Deduction:** **₹ 23,358.75** directly shaved off supplier payout. - **Total Quality Rebate Deduction:** **₹ 23,358.75** directly shaved off supplier payout.
5. **Approve Lot:** 5. **Approve Lot:**
- Select Decision: **APPROVED - FAQ GRADE A**. - Select Decision: **RELEASED** (Approved - FAQ Grade A).
- Click **Issue Quality Certificate**. - Enter Remarks: `Commercial specification verified with standard moisture deduction`.
- Lot status transitions from `QUALITY_HOLD` to `RELEASED`. Lot ID `LOT-SOY-2026-001` is assigned. - Click **Save Assay & Commit Decision**.
- Lot status transitions from `QUALITY_HOLD` (`HOLD`) to `RELEASED`. Lot `LOT-SOY-2026-001` is now cleared for godown stack placement and sales order allocation.
#### "Aha!" / Wow Moments: #### "Aha!" / Wow Moments:
- **No subjective arguments:** Moisture and admixture percentages translate to cold, hard mathematical deductions in accordance with AGMARK / Mandi Samiti rules. - **No subjective arguments:** Moisture and admixture percentages translate to cold, hard mathematical deductions in accordance with AGMARK / Mandi Samiti rules.
@ -192,22 +199,25 @@ flowchart TD
> *"The truck has been unloaded into Stack A1 in Central Godown Indore. The empty truck returns to the weighbridge to record its tare weight. Let's see how ATB seals the intake and creates the inventory asset."* > *"The truck has been unloaded into Stack A1 in Central Godown Indore. The empty truck returns to the weighbridge to record its tare weight. Let's see how ATB seals the intake and creates the inventory asset."*
#### Click-by-Click Steps: #### Click-by-Click Steps:
1. **Tare Weighment (`/inward/weighbridge`):** 1. **Switch Role & Screen:**
- Open Gate Pass `GP-2026-001`. - Switch to `yard@malwa-agri.demo` (or `whmgr@malwa-agri.demo`).
- Click **Capture Tare Weighment**. - In the left sidebar navigation under **OPERATIONS**, click **Gate & Receiving** (route `/receiving`).
2. **Tare Weighment:**
- On the Gate Passes Registry table, locate Gate Pass `GP-2026-001` (or your newly registered pass `GP-26-00002` at status `WEIGHED_GROSS`).
- Click **Tare Scale** (or **Tare Weighment**).
- Emulate tare reading: `10,000` kg. - Emulate tare reading: `10,000` kg.
- System calculates: - System calculates:
- **Gross Weight:** 35,000 kg. - **Gross Weight:** 35,000 kg.
- **Tare Weight:** 10,000 kg. - **Tare Weight:** 10,000 kg.
- **Net Received Weight:** 25,000 kg = **25.000 MT** (500 Bags). - **Net Received Weight:** 25,000 kg = **25.000 MT** (500 Bags).
- **Weight Shortage:** 0.000 MT (100% matched with supplier declared dispatch). - **Weight Shortage:** 0.000 MT (100% matched with supplier declared dispatch).
2. **Issue GRN & Stack Allocation:** 3. **Issue GRN & Stack Allocation:**
- Click **Generate Goods Receipt Note (GRN)**. - Click **Generate Goods Receipt Note (GRN)**.
- System assigns GRN number: `GRN-2026-001`. - System assigns GRN number: `GRN-2026-001`.
- Select Target Godown: `Central Godown Indore` $\rightarrow$ Stack: `Stack A1`. - Select Target Godown: `Central Godown Indore` $\rightarrow$ Stack: `Stack A1`.
- Click **Commit to Stock Ledger**. - Click **Commit to Stock Ledger**.
- Status updates to `GRN_ISSUED` and vehicle transitions to `GATE_OUT`. - Status updates to `GRN_ISSUED` and vehicle transitions to `GATE_OUT`.
3. **Inspect Warehouse Stock Ledger (`/inventory/stock-ledger`):** 4. **Inspect Warehouse Stock Ledger (`/inventory/stock-ledger`):**
- Click **Warehouse Inventory** $\rightarrow$ **Stock Ledger**. - Click **Warehouse Inventory** $\rightarrow$ **Stock Ledger**.
- Show the newly created inventory row: - Show the newly created inventory row:
- Commodity: `Soyabean FAQ` - Commodity: `Soyabean FAQ`

View File

@ -306,6 +306,32 @@ Formulated 4 architectural and process guardrails for future AI code generation:
- **TypeScript Compiler Check:** `./project_code/frontend/node_modules/.bin/tsc -p project_code/frontend/tsconfig.json --noEmit` exited cleanly with 0 type errors. - **TypeScript Compiler Check:** `./project_code/frontend/node_modules/.bin/tsc -p project_code/frontend/tsconfig.json --noEmit` exited cleanly with 0 type errors.
- **Traceability Gate 14.1:** Verified `scripts/verify_traceability_gates.py --gate 14.1 --iteration iteration-03` passed with 0 critical issues. - **Traceability Gate 14.1:** Verified `scripts/verify_traceability_gates.py --gate 14.1 --iteration iteration-03` passed with 0 critical issues.
---
## Turn 10: 2026-10-17T11:55:00Z — Journey 2 vs Journey 3 FSM & Entity Status Clarification (WEIGHED_GROSS vs QUALITY_HOLD)
### User Query
> As per the `01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md`, after 'Record Gross Weight' in Journey 2, in Journey 3, the status of 'Gate Entry' should have been 'QUALITY_HOLD' but in the enclosed screenshot it can be seen - 'WEIGHED_GROSS'. Are we missing any step in the FSM as well as scenario guidance and associated data in the user journeys (or for that matter in the Use Cases/BRD/FR)?
### Findings & Architecture Clarification
1. **Entity Separation:**
- The user was viewing `/receiving` (`SCREEN-INW-001`), the Gate & Receiving Console.
- The displayed table is the Gate Passes Registry (`inward_gate_entries`).
- For a Gate Entry, `WEIGHED_GROSS` is the accurate and intended FSM status after gross weighment (`GATE_IN` -> `WEIGHED_GROSS` -> `UNLOADED` -> `WEIGHED_TARE` -> `GRN_ISSUED` -> `GATE_OUT`).
- `QUALITY_HOLD` is NOT an `InwardGateEntry` status; it is the mandatory initial state of the Commodity Lot (`InventoryLot`) under `UC-006` / `BRD-FR-016` (`QUALITY_HOLD` -> `RELEASED` / `REJECTED`).
2. **Navigation Guidance in Playbook:**
- In `01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md`, Journey 3 Step 2 previously referred to *"pending inspection for Gate Entry GP-2026-001"* without explicitly instructing the presenter to click **Quality Lab Assay** (`/quality`) in the left navigation sidebar.
- This led the user to remain on `/receiving` and expect the Gate Entry row itself to show `QUALITY_HOLD`.
3. **Physical Mandi Reality vs Demo Storyboard:**
- In real-world physical mandi operations, sampling occurs on the yard ramp right after gross weighment (before unloading & tare).
- To allow demonstrating the Quality Lab Assay (Journey 3) before Tare & GRN (Journey 4), `LOT-SOY-2026-001` is pre-seeded in the Quality Lab Queue.
### Modifications Made
1. **Sales Demo Playbook Updated (`01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md`):**
- Clarified Journey 3 click-by-click steps to explicitly guide clicking **Quality Lab Assay** in the sidebar.
- Added explicit presenter note distinguishing the Gate Entry status (`WEIGHED_GROSS`) from the Lot QC status (`QUALITY_HOLD`).
- Clarified Journey 4 steps with precise sidebar navigation back to **Gate & Receiving** for Tare Weighment and GRN generation.
### Verification
- **Automated Test Suite:** Ran `python3 project_code/tests/run_all_tests.py` — 212/212 tests PASSED with 98.3% statement coverage.
- **Traceability & Container Check:** Confirmed containers `atb-local-frontend-1` and `atb-local-backend-1` healthy.