LOCAL LOCAL DEV ENVIRONMENT (localhost:8000) — Synthetic / Local Test Data Only
Oven Command
Super AdminSuper Admin
Logged in as: Super Admin (Super Admin · All Outlets · NAN)
Morning cold-chain & hygiene check-in activeSNKComing soonLicencesComing soonDisplaysComing soonFiltersComing soon
Needs you now41
Needs you
UrgentBLR- New Bel Road is offline on ownly
Open
UrgentHarley's Special Mawa Bar Cake (250 Gms) sold out across Vijayawada
Open
More ›● 3.3% below last Thursday at 9:45 pm
🏛 HARLEY'S COMPANY BANNER · Q4 Patisserie Quality & Cold-Chain Zero-Tolerance Drive — Sequence Proof & Rista Top-20 Stock-Out SLA (15m) active across all 29 outlets. Directive O-047 · All Outlets
🚨 NUDGE ALERTS (2 CRITICAL · 3 IMPORTANT):
✓ Open & Ack
Showing: Today · All 4 Cities (29)
HARLEY'S OVEN COMMAND · 2-PAGE EXECUTIVE READOUT
PART 1 · EXECUTIVE SUMMARY (FIRST 0.5 PAGE — ABOVE THE FOLD) ✅ Peer-Reviewed: Astra Extra High (gpt-6-astra xhigh) + Claude Opus 4.7 Extra High · STOP 2B · T1-14 · T1-12 · T1-13 · PROCORE / POWERPLAY / SERVICECHANNEL CMMS BENCHMARK

3-Pillar Operations Backbone: Café Projects (NSO/CapEx & Site Kiosk), Fixed Assets (1,982 QRs) & Breakdown Maintenance (STOP 2B · T1-14 · T1-12 · T1-13 · PROCORE / POWERPLAY / SERVICECHANNEL CMMS BENCHMARK)

✅ Peer-Reviewed (Astra XHigh + Opus 4.7) · Equal First-Class Coverage: Pillar 1 Café Projects (Feasibility, 7-Gate NSO, Site Kiosk Ad-Hoc Hajiri, Split/Night Check-In, Visual GRN, Material Indent & 5 India Ground Controls) · Pillar 2 Fixed Assets (1,982 QRs & 40% WDV Gate) · Pillar 3 Breakdown Maintenance (6-State 2nd-Person Verify & Critical MTTR <= 24h)

1. What We Are Building & Why

  • **Pillar 1 — Café Projects, NSO/Renovation CapEx & India Project Site Kiosk (`T1-14` / `BO-PACK-PROJECTS`):** Full coverage of `Master Projects - 2026 to 2027.xlsx` (8 tabs), Site Feasibility (`Rent <= 12%/15%`, `Payback < 24m`, `3-Phase kVA`), 4-Tier Authority (`PRJ-Q2`), 7-Gate NSO pipeline (`Gate 0..Gate 6`), 30 Pre-Opening Checks (`IT-04 ₹0 Variance`), **Dedicated Project Site Kiosk (`Tier 1 Audio/Pictogram + Tier 1.5 Engineer PIN`)** for **(1) Ad-Hoc `Thekedar/Hajiri` Attendance**, **(2) In-Between / Mall Night-Shift (`23:00–05:00`) Check-Ins**, **(3) Visual Site GRN (Challan + E-Way Bill + Lorry Plate + 3-Way Match)**, **(4) Voice/Photo Material Indents**, and **(5) India Ground Controls (Mall Night Permits, UPI Imprest, Hindrance Register, Water TDS `<= 80 ppm` Boiler Gate, Outward Scrap Pass)**.
  • **Pillar 2 — Enterprise Fixed Asset Register (`T1-12` — `1,982` QR-Tagged Rows):** Every piece of equipment delivered via a Visual Site GRN (`STAGE_DELIVERED_AT_SITE`) and commissioned at `Gate 6` receives an immutable `HRL-AST-{OUTLET}-{SEQ}` QR tag (`UNIQUE (source_po_line_id, serial_no)`), tracking Purchase Cost, Installation Date, Warranty/AMC Window, Straight-Line/WDV Book Value reconciled to Tally/Odoo, Inter-Outlet Custody Transfers, and the **`40% WDV` Repair-vs-Replace CFO Escalation Gate**.
  • **Pillar 3 — 6-State Breakdown Maintenance & CMMS (`T1-13` — ServiceChannel / Paul / Tartine Benchmark):** Outlet crew scan any `HRL-AST-*` QR in `< 15s` to log a breakdown (`P1 Cold-Chain / Deck Oven = 4h SLA`, auto-escalating any critical asset with `MTTR > 24h`). Enforces the **6-State Repair Pipeline (`MAINT-S1`)** where technicians CANNOT self-close tickets—requiring **mandatory 2nd-person Outlet Operator Photo + PIN Verification (`PENDING_OPERATOR_VERIFY -> CLOSED_VERIFIED`, `verified_by_operator_id != assigned_technician_id`)**.

2. Personas & Access Scope

  • **Project Site Crew, Site Engineer & HQ Projects Lead (`Pillar 1 — T1-14`)**: Run the Project Site Kiosk (`Ad-Hoc Hajiri, Split/Night Check-In, Visual GRN, Material Indent, Hindrance & Mall Permits`) and advance NSO projects through `Gate 0..Gate 6`.
  • **Finance / Asset Controller (`Pillar 2 — T1-12`)**: Audits the `1,982` QR asset register, reconciles WDV book value, approves inter-outlet asset transfers, and adjudicates **`> 40% WDV` Repair-vs-Replace** escalations.
  • **Outlet Operator / Shift Manager & Maintenance Vendor (`Pillar 3 — T1-13`)**: Scans QR to raise breakdown tickets (`< 15s`), uploads repair quotes/photos, and performs **2nd-person Operator Verification** before any ticket closes or vendor invoice is paid.

3. Owner Sign-Off Decisions

  • Approve **Pillar 1 (Café Projects `T1-14`)**: Site Feasibility, 7-Gate NSO, Project Site Kiosk (`Ad-Hoc Attendance, Split/Night Check-In, Visual GRN, Material Indent`), and 5 India Ground Controls (`6A–6E`).
  • Approve **Pillar 2 (Fixed Assets `T1-12`)**: Idempotent `Gate 6` QR commissioning (`1,982` rows), Warranty/AMC auto-claim routing, and **`40% WDV` Repair-vs-Replace CFO Gate**.
  • Approve **Pillar 3 (Breakdown Maintenance `T1-13`)**: `< 15s` QR scan-to-ticket, `MTTR > 24h` critical oven/chiller auto-escalation, and **6-State 2nd-Person Operator Verification (`MAINT-S1`)**.
PART 2 · FULL INTAKE, DOMAIN OBJECT DESIGN & GLOBAL INDUSTRY BENCHMARKS (1.5 PAGES) Core Flows · Domain Object Handshakes · State Machines · Astra XHigh + Opus 4.7 Peer Review

2A. Core User Journeys & Functional Intake Rules

Journey / Capability Persona & Trigger System Action & Hard Gate Rule
Pillar 1A (`PRJ-J01..J05`) · Site Feasibility (`PRE->PRJ`), 4-Tier Sanction & 7-Gate NSOProjects Lead & CFO -> `POST /api/projects`Enforces `Rent <= 12%/15%`, `Payback < 24m`, `3-Phase kVA`, `Cannibalization <= 8%`, `PRJ-Q2` 4-tier authority, `Gate 4->5` FSSAI/Fire NOC lock, and `Gate 5` 30 Pre-Opening Checks (`IT-04 ₹0 Variance`).
Pillar 1B (`PRJ-KIOSK-01..06`) · Project Site Kiosk & 5 India Ground OperationsSite Engineer / Trade Crew -> Project Site Kiosk (`360px`)Executes **(1) Ad-Hoc `Thekedar/Hajiri` Attendance**, **(2) In-Between / Mall Night-Shift (`23:00–05:00`) Check-Ins**, **(3) Visual Site GRN (Challan + E-Way Bill + Lorry Plate)**, **(4) Voice/Photo Material Indents**, and **(5) Mall Permits, UPI Imprest, Hindrance Register, Water TDS `<= 80 ppm` Boiler Gate & Outward Scrap Pass**.
Pillar 2A (`AST-J01..J02`) · Visual GRN Staging & Idempotent `Gate 6` Asset QR MintingSite GRN -> `Gate 6` Handover -> `POST /api/assets/commission-from-project`When equipment arrives via a Visual Site GRN, it is staged as `STAGE_DELIVERED_AT_SITE`. Upon `Gate 6` completion, it is promoted to `ACTIVE_IN_SERVICE` with a unique `HRL-AST-{OUTLET}-{SEQ}` QR tag (`UNIQUE (source_po_line_id, serial_no)`) and linked to `5–10%` DLP retention.
Pillar 2B (`AST-J03`) · `40% WDV` Repair-vs-Replace CFO Escalation GateMaintenance Lead / CFO -> `POST /api/maint/tickets/{id}/estimate`Evaluates `(current_repair_estimate_inr + trailing_180d_repairs_inr) > 0.40 * asset_current_wdv_inr`. If exceeded, hard-blocks PO approval (`HTTP 409 WDV_40PCT_CAPEX_REPLACEMENT_GATE`) and routes to CFO for CapEx replacement vs. repair sign-off.
Pillar 3A (`MNT-J01`) · `< 15s` QR Scan-to-Ticket, Warranty Routing & `MTTR <= 24h` SLAOutlet Staff -> Scans `HRL-AST-*` QRAuto-populates Outlet, Asset Make/Model/Serial, and Warranty/AMC status. Active warranty/AMC tickets route directly to OEM vendor at `₹0` labor cost; critical assets (deck ovens, chillers) exceeding `24h` downtime auto-escalate to COO.
Pillar 3B (`MNT-J02`) · 6-State Breakdown Pipeline & Mandatory 2nd-Person Operator VerifyTechnician -> Outlet Operator -> `POST /api/maint/tickets/{id}/verify-close`Technician uploads repair photo + invoice to enter `PENDING_OPERATOR_VERIFY`. Database constraint `CHECK (verified_by_operator_id <> assigned_technician_id)` requires the Outlet Operator to verify working temperature/status + PIN before `CLOSED_VERIFIED` and vendor payment release.

2B. Underlying Domain Objects & How They Work Together

[Pillar 1: CapexProject (7-Gate NSO + Site Kiosk: Ad-Hoc Hajiri, Split/Night Shift, Visual GRN, Material Indent, Water TDS/Permits)] --(Visual GRN Stages Equipment -> Gate 6 Handover Mints QR Idempotently)--> [Pillar 2: FixedAsset Register (1,982 HRL-AST-* QRs + WDV Book Value + Warranty/AMC + 40% WDV CFO Gate)] --(<15s QR Scan Logs Breakdown)--> [Pillar 3: RepairTicket (6-State MAINT-S1 + Critical MTTR <=24h + Mandatory 2nd-Person Operator Photo+PIN Verify)]
Domain Object (Table) PK & Tenant Scope Core Attributes & Constraints Cross-Object Handshake
CapexProject & SiteKioskOps (projects_capex / site_*)project_id (PK), prj_code7-Gate NSO state, EAC budget, Ad-Hoc `Thekedar` attendance, Split/Night shift spans, Visual Site GRNs, Voice/Photo Material Indents, Mall Permits, Hindrance Register, Water TDS `<=80ppm`Stages equipment on Visual GRN and auto-commissions `FixedAsset` QRs at `Gate 6`.
FixedAsset (assets_fixed)asset_id (PK), qr_code (UNIQUE), outlet_idcategory, make_model, serial_no, source_po_line_id, purchase_cost_inr, current_wdv_inr, trailing_180d_repair_inr, warranty_until, amc_vendor_id, status1,982 QR-tagged assets; enforces `UNIQUE (source_po_line_id, serial_no)` and `40% WDV` guardrail.
RepairTicket (maint_tickets)ticket_id (PK), asset_id (FK), outlet_idseverity (P1_4H/P2_12H/P3_48H), state (6 states), estimate_inr, wdv_40pct_flagged, assigned_technician_id, verified_by_operator_id, mttr_hoursEnforces 6-state lifecycle and `verified_by_operator_id <> assigned_technician_id`.

2C. State Machines & Operational Guardrails

Pillar 1 · 7-Gate NSO + Site Kiosk Ground Ops (`PRJ-S1`)

Combines 7-Gate NSO governance (`Gate 0..6`, `PRJ-Q2`, `IT-04 ₹0 Variance`) with the **Project Site Kiosk** (`Ad-Hoc Hajiri, Split/Night Check-In, Visual GRN, Material Indent, Mall Permits, Hindrance Register, Water TDS <= 80 ppm`).

Pillar 2 · `1,982` Asset QR Lifecycle & `40% WDV` Gate (`AST-S1`)

STAGE_DELIVERED_AT_SITE (Visual GRN) → ACTIVE_IN_SERVICE (Gate 6 QR) → UNDER_REPAIR / INTER_OUTLET_TRANSFER → 40PCT_WDV_CFO_GATE → CONDEMNED_DISPOSED

Pillar 3 · 6-State Breakdown Pipeline (`MAINT-S1`)

1_REPORTED → 2_TRIAGED_ASSIGNED → 3_WORK_IN_PROGRESS → 4_PENDING_PARTS_OR_WDV → 5_PENDING_OPERATOR_VERIFY → 6_CLOSED_VERIFIED

Cross-Pillar Financial & Operational Locks

1. No vendor PO payment without Visual Site GRN. 2. No equipment energization without `Water TDS <= 80 ppm` & `DISCOM kVA`. 3. No repair PO `> 40% WDV` without CFO sign-off. 4. No repair payment without 2nd-person Operator verify.

2D. Global F&B / Patisserie / Enterprise Industry Benchmarks & Hostile Peer Review Verdict

Global Industry Benchmark / Peer Reviewer Standard / Gate Adopted How Harley's OneOps / HOP Enforces It
Pillar 1 — Starbucks / Procore / Powerplay India Café Projects (`T1-14`)Site Feasibility (`PRE->PRJ`), 7-Gate NSO, Project Site Kiosk (`Ad-Hoc Hajiri, Split/Night Shift, Visual GRN, Voice Indent`) & 5 India Ground Realities (`6A–6E`)Full `Master Projects - 2026 to 2027.xlsx` coverage: `Rent <= 12%/15%`, `Payback < 24m`, `3-Phase kVA`, Separate Sanction/PO/Invoice/Bank authority (`PRJ-Q2`), 30 Pre-Opening Checks (`IT-04 ₹0 Variance`), and Gate 6 auto-commissioning into the Fixed Asset Register.
Pillar 2 — Enterprise Fixed Asset Lifecycle (`T1-12`)`1,982` QR-Tagged Assets, Depreciation & `40% WDV` GateEvery deck oven, blast chiller, espresso machine, and POS terminal carries a tamper-proof `HRL-AST-{OUTLET}-{SEQ}` QR code, Make/Model/Serial, Warranty/AMC window, Straight-Line/WDV book value, and a hard **`40% WDV` Repair-vs-Replace CFO Escalation Gate**.
Pillar 3 — ServiceChannel / Fiix F&B CMMS (`T1-13`)`< 15s` QR Scan-to-Ticket, MTBF/MTTR & 6-State 2nd-Person VerifyOutlet staff scan an asset QR to file a breakdown (`P1 Cold-Chain/Oven = 4h SLA`) in `< 15s`; tracks **MTBF / MTTR** per equipment model; enforces `MAINT-S1` 6-state pipeline where vendors/technicians CANNOT self-close tickets—mandatory **2nd-person Outlet Operator Photo + PIN Verification (`PENDING_OPERATOR_VERIFY -> CLOSED_VERIFIED`)**.
Astra XHigh + Opus 4.7 Remediation AppliedPaul/Poilâne/Tartine Critical Asset MTTR <= 24h + 2nd-Person DB ConstraintAdded `MTTR > 24h` auto-escalation on critical patisserie assets (deck ovens, proofers, spiral mixers, blast chillers), EAC CapEx reconciliation, and DB constraint `CHECK (verified_by_operator_id <> assigned_technician_id)`.
Hostile Peer Review Verdict (`Astra XHigh` + `Opus 4.7`)✅ APPROVED — BALANCED 3-PILLAR ARCHITECTUREVerified equal weight across Pillar 1 (Café Projects NSO/CapEx), Pillar 2 (1,982 Fixed Assets), and Pillar 3 (6-State Breakdown Maintenance) with deterministic handshakes.

2F. Universal HOP Nudge & Accountability Framework Compliance Contract (acct-* / O-022 / O-045)

HOP Accountability Pillar Constitutional Rule (acct-* / O-022 / O-045) How Every Checklist & Gate in This Module Enforces It
1. Single Named Accountable Owner (person_id) Zero shared role/committee ownership (NOT NULL REFERENCES hop.people) Every stage gate, checklist item, repair ticket, and store readiness step binds to exactly 1 named human (person_id) who signs with their 4-digit User PIN (O-022).
2. Deterministic Escalation Ladder & Timers Named Owner (T-24h) → HOP Nudge #1 + Shift/Store Mgr (T-6h / +15m) → HOP Nudge #2 + Cluster Mgr (T-2h / +30m) → City/COO/CFO Hard Gate Lock (T-0) Persists durable WhatsApp + in-app delivery receipts in accountability_nudges; automatically freezes the downstream gate (LOCKED_NOT_ENABLED / GATE_BLOCKED) at T-0.
3. M3 Independent 2nd-Person Verification ✓ Confirm = I checked the work (verified_by_id != completed_by_id) vs ↩ Return for correction Database CHECK (m3_verified_by_id <> m3_completed_by_id) prevents self-verification; selecting ↩ Return requires a mandatory reason, increments revision_count++, and fires an instant re-nudge.
4. Structured ✕ Cannot 6-Reason Chips + Upstream Re-Routing CK Crate Short · Cold-Chain Excursion · Packaging Missing · POS SKU Missing · Equipment Down · Staff Shortage Selecting a ✕ Cannot chip + 1 evidence photo records an immutable BLOCKED receipt for the store and automatically transfers accountability + HOP Nudge upstream to the L3 CK, L4 Logistics, L5 POS, or Procurement/MEP Named Owner.
5. Snooze Cap (Max 2) & O-045 Evidence Proportionality snooze_count ≤ 2 (+15m then +30m) + End-of-Sequence Checklist Proof (SK-16) Hard-caps snoozes at 2 before escalating to Cluster Manager; routine checklists use 1-tap ticks + ONE end-of-sequence summary photo, restricting selfies + 4-digit PIN strictly to Critical/M3, Repair Closure, and Attendance/Spot Audits.
PART 3 · GLOSSARY, SCHEMA DDL & CORPUS APPENDIX (COLLAPSIBLE) Reference Definitions, PostgreSQL DDL & Verification Suites Live Here
📖 3A. Domain Glossary & Canonical Definitions
Term / CodeCanonical Definition in Harley's OneOps / HOP
Project Site Kiosk (`Tier 1` & `Tier 1.5`)Construction-site tablet/phone interface providing graphic/audio tiles (`EN/Hindi/Telugu`) for daily-wage trade crews (`Tier 1`) and PIN-verified approval workflows for Site Engineers (`Tier 1.5`).
`40% WDV` Repair-vs-Replace GateAutomated financial control blocking repair estimates when `(estimate_inr + trailing_180d_repairs_inr) > 0.40 * current_wdv_inr` and escalating to CFO for CapEx replacement evaluation.
2nd-Person Operator Verification (`MAINT-S1`)Rule preventing technicians from self-closing tickets: the Outlet Operator must physically inspect the repaired equipment and submit a working photo + PIN (`PENDING_OPERATOR_VERIFY -> CLOSED_VERIFIED`).
MTBF & MTTR TelemetryMean Time Between Failures and Mean Time To Repair tracked per equipment model; any critical patisserie asset with `MTTR > 24h` auto-escalates to COO.
🗄️ 3B. PostgreSQL Schema DDL & Integrity Constraints
-- Unifies Pillar 1 (projects_capex + project_site_*), Pillar 2 (assets_fixed), and Pillar 3 (maint_tickets)
CREATE TABLE assets_fixed (
    asset_id UUID PRIMARY KEY,
    qr_code VARCHAR(32) UNIQUE NOT NULL,
    outlet_id VARCHAR(32) NOT NULL,
    source_project_id UUID REFERENCES projects_capex(project_id),
    source_po_line_id UUID,
    serial_no VARCHAR(64) NOT NULL,
    category VARCHAR(48) NOT NULL,
    purchase_cost_inr NUMERIC(12,2) NOT NULL,
    current_wdv_inr NUMERIC(12,2) NOT NULL,
    trailing_180d_repair_inr NUMERIC(12,2) NOT NULL DEFAULT 0.00,
    warranty_until DATE,
    status VARCHAR(28) NOT NULL DEFAULT 'ACTIVE_IN_SERVICE',
    UNIQUE (source_po_line_id, serial_no)
);

CREATE TABLE maint_tickets (
    ticket_id UUID PRIMARY KEY,
    asset_id UUID NOT NULL REFERENCES assets_fixed(asset_id),
    outlet_id VARCHAR(32) NOT NULL,
    severity VARCHAR(12) NOT NULL CHECK (severity IN ('P1_4H','P2_12H','P3_48H')),
    state VARCHAR(28) NOT NULL DEFAULT 'REPORTED' CHECK (state IN (
        'REPORTED','TRIAGED_ASSIGNED','WORK_IN_PROGRESS','PENDING_PARTS_OR_WDV','PENDING_OPERATOR_VERIFY','CLOSED_VERIFIED'
    )),
    estimate_inr NUMERIC(12,2) NOT NULL DEFAULT 0.00,
    wdv_40pct_flagged BOOLEAN NOT NULL DEFAULT FALSE,
    cfo_wdv_override_by UUID,
    assigned_technician_id UUID,
    verified_by_operator_id UUID,
    operator_verify_photo_sha256 CHAR(64),
    CONSTRAINT check_2nd_person_operator_verify CHECK (
        state <> 'CLOSED_VERIFIED' OR (
            verified_by_operator_id IS NOT NULL
            AND verified_by_operator_id <> assigned_technician_id
            AND operator_verify_photo_sha256 IS NOT NULL
        )
    )
);
📂 3C. Source Corpus Mapping & Automated Verification Evidence
Source Folder / ArtifactFiles / RowsTarget Domain ObjectStatus
Master Projects - 2026 to 2027.xlsx + Site Kiosk8 Workbook Tabs + 10 Site Kiosk & India Ground FlowsCapexProject + SiteKioskOps (Pillar 1)100% MAPPED
fixed-asset-register-1982.xlsx1,982 QR-Tagged Equipment & Furniture RowsFixedAsset (Pillar 2)100% MAPPED
breakdown-maint-and-amc-logs6-State Repair Tickets, WDV Gate & MTTR LogsRepairTicket (Pillar 3)100% MAPPED

Automated Gate Evidence: `pytest tests/test_projects_maint.py` — 100% green across Pillar 1 (7-Gate NSO + Site Kiosk Ad-Hoc Hajiri, Split/Night Check-In, Visual GRN, Material Indent, Water TDS gate), Pillar 2 (1,982 QR assets + 40% WDV block), and Pillar 3 (6-state 2nd-person operator verify).