/** * Curated route rules seed data for CourtMitra MissionOS Phase 1. * One route_rules row per issue domain: consumer, payment, cyber_fraud. * * sourceCitationsBySectionRef: array of { actName, sectionNo } tuples. * The seed runner resolves these to legal_chunk ids at insert time. */ export interface SourceCitationRef { actName: string; sectionNo: string; } export interface RouteRuleSeedData { issueDomain: string; jurisdictionFilter: Record; triggerConditions: Record; priority: number; routeGraph: { nodes: Array<{ id: string; level: string; label: string; description: string; actionType: string; target: Record; expectedResponseDays: number; }>; edges: Array<{ from: string; to: string; condition: string; }>; }; requiredEvidence: string[]; deadlines: Record; sourceCitationsBySectionRef: SourceCitationRef[]; socialTemplate: null; stopAndRefer: null | { conditions: string[]; helpline: string; message: string; }; active: boolean; } // ============================================================================ // CONSUMER domain route rule // ============================================================================ export const consumerRouteRule: RouteRuleSeedData = { issueDomain: "consumer", jurisdictionFilter: { country: "IN" }, triggerConditions: { transaction_amount_min: 0, issue_types: ["product_defect", "service_deficiency", "unfair_trade", "non_delivery", "refund_not_received"], }, priority: 100, routeGraph: { nodes: [ { id: "L0", level: "L0", label: "Grievance to Seller / Service Provider", description: "Send a formal written complaint (email/registered post) to the seller or e-commerce entity's grievance officer. Under Consumer Protection (E-Commerce) Rules 2020 Rule 4(5), the grievance officer must acknowledge within 48 hours and resolve within 30 days.", actionType: "send_email", target: { channel: "email", recipient: "seller_grievance_officer" }, expectedResponseDays: 30, }, { id: "L1", level: "L1", label: "National Consumer Helpline (1915 / INGRAM)", description: "File complaint on INGRAM portal (consumerhelpline.gov.in) or call 1915. NCH mediates between consumer and company; response expected within 30 days. Suitable for e-commerce, product, and service complaints.", actionType: "submit_portal", target: { channel: "portal", url: "https://consumerhelpline.gov.in", helpline: "1915" }, expectedResponseDays: 30, }, { id: "L2", level: "L2", label: "E-Commerce Grievance Officer (formal notice)", description: "Send formal legal notice to e-commerce entity's grievance officer under Consumer Protection (E-Commerce) Rules 2020 Rule 4(5) citing failure to resolve. Demand resolution within 15 days failing which consumer will approach District Commission.", actionType: "send_email", target: { channel: "email", recipient: "ecommerce_grievance_officer" }, expectedResponseDays: 15, }, { id: "L3", level: "L3", label: "Consumer Commission – District (under ₹1 crore)", description: "File complaint at District Consumer Disputes Redressal Commission under Section 35 of Consumer Protection Act 2019. Jurisdiction covers goods/services valued up to ₹1 crore (Section 47). Limitation period is 2 years from cause of action (Section 69).", actionType: "manual_packet", target: { channel: "physical", forum: "District_Consumer_Commission" }, expectedResponseDays: 90, }, ], edges: [ { from: "L0", to: "L1", condition: "no_response_or_unsatisfactory_after_30_days" }, { from: "L1", to: "L2", condition: "no_response_or_unsatisfactory_after_30_days" }, { from: "L2", to: "L3", condition: "no_response_or_unsatisfactory_after_15_days" }, ], }, requiredEvidence: ["receipt", "screenshot", "email", "chat"], deadlines: { complaint_within_days: 730, note: "Section 69 CPA 2019: 2-year limitation from date cause of action arose", grievance_officer_response_days: 30, district_commission_resolution_days: 90, }, sourceCitationsBySectionRef: [ { actName: "Consumer Protection Act, 2019", sectionNo: "35" }, { actName: "Consumer Protection Act, 2019", sectionNo: "47" }, { actName: "Consumer Protection Act, 2019", sectionNo: "69" }, { actName: "Consumer Protection Act, 2019", sectionNo: "2(47)" }, { actName: "Consumer Protection (E-Commerce) Rules, 2020", sectionNo: "4(5)" }, { actName: "Consumer Protection (E-Commerce) Rules, 2020", sectionNo: "5" }, { actName: "National Consumer Helpline – Grievance Filing Procedure", sectionNo: "ingram" }, ], socialTemplate: null, stopAndRefer: null, active: true, }; // ============================================================================ // PAYMENT domain route rule // ============================================================================ export const paymentRouteRule: RouteRuleSeedData = { issueDomain: "payment", jurisdictionFilter: { country: "IN" }, triggerConditions: { upi_or_bank: true, issue_types: [ "failed_upi_transaction", "unauthorized_debit", "non_reversal", "bank_fraud", "wallet_dispute", ], }, priority: 100, routeGraph: { nodes: [ { id: "L0", level: "L0", label: "Bank / PSP Complaint (30-Day Window)", description: "Immediately report unauthorized or failed transaction to your bank's customer care and PSP (e.g., Google Pay, PhonePe). Under RBI Customer Liability Circular 2017, reporting within 3 working days of bank's communication gives zero liability. Document the complaint reference number.", actionType: "send_email", target: { channel: "email", recipient: "bank_customer_care" }, expectedResponseDays: 30, }, { id: "L1", level: "L1", label: "RBI Banking Ombudsman (cms.rbi.org.in)", description: "If bank does not resolve within 30 days or gives unsatisfactory response, file complaint with RBI Integrated Ombudsman at cms.rbi.org.in. Per Clause 10 of RBI IOS 2021, you must have first lodged complaint with bank and waited 30 days. Maximum award is ₹20 lakh.", actionType: "submit_portal", target: { channel: "portal", url: "https://cms.rbi.org.in" }, expectedResponseDays: 30, }, { id: "L2", level: "L2", label: "NPCI / UPI TAT Escalation", description: "For UPI failed transactions where credit reversal has not occurred within T+1 day, escalate to NPCI through the PSP dispute management system. Per NPCI UPI Procedural Guidelines v1.6, reversal must occur within 5 working days. If PSP is unresponsive, raise chargeback through your bank.", actionType: "submit_portal", target: { channel: "portal", url: "https://www.npci.org.in/contact-us" }, expectedResponseDays: 5, }, { id: "L3", level: "L3", label: "Consumer Commission", description: "If RBI Ombudsman does not resolve or the complaint falls outside Ombudsman jurisdiction, file at District Consumer Commission under Consumer Protection Act 2019 (Section 35). Banking and payment services are 'services' under Section 2(34) CPA 2019.", actionType: "manual_packet", target: { channel: "physical", forum: "District_Consumer_Commission" }, expectedResponseDays: 90, }, ], edges: [ { from: "L0", to: "L1", condition: "no_resolution_within_30_days" }, { from: "L1", to: "L2", condition: "upi_specific_and_no_reversal" }, { from: "L1", to: "L3", condition: "ombudsman_unable_to_resolve_or_out_of_jurisdiction" }, { from: "L2", to: "L3", condition: "no_response_from_npci" }, ], }, requiredEvidence: ["receipt", "screenshot", "pdf"], deadlines: { report_to_bank_days: 3, note_rbi_zero_liability: "RBI Circular 2017: zero liability if reported within 3 working days of bank communication", ombudsman_complaint_days: 30, note_ombudsman_pre_filing: "RBI IOS 2021 Clause 10: 30-day pre-filing requirement with bank", upi_reversal_tat_days: 1, note_upi_tat: "NPCI UPI Guidelines v1.6: T+1 credit reversal for failed UPI", }, sourceCitationsBySectionRef: [ { actName: "RBI Customer Liability in Unauthorised Electronic Banking Transactions Circular 2017", sectionNo: "zero-liability", }, { actName: "RBI Customer Liability in Unauthorised Electronic Banking Transactions Circular 2017", sectionNo: "limited-liability", }, { actName: "Reserve Bank – Integrated Ombudsman Scheme, 2021", sectionNo: "clause-10", }, { actName: "Reserve Bank – Integrated Ombudsman Scheme, 2021", sectionNo: "clause-10-pre-filing", }, { actName: "Reserve Bank – Integrated Ombudsman Scheme, 2021", sectionNo: "award", }, { actName: "NPCI UPI Procedural Guidelines", sectionNo: "dispute-tat", }, { actName: "NPCI UPI Procedural Guidelines", sectionNo: "chargeback", }, { actName: "Consumer Protection Act, 2019", sectionNo: "2(34)" }, ], socialTemplate: null, stopAndRefer: null, active: true, }; // ============================================================================ // CYBER FRAUD domain route rule // ============================================================================ export const cyberFraudRouteRule: RouteRuleSeedData = { issueDomain: "cyber_fraud", jurisdictionFilter: { country: "IN" }, triggerConditions: { money_lost: true, urgency_hours_le: 48, issue_types: [ "upi_fraud", "phishing", "vishing", "identity_theft", "fake_customer_care", "investment_fraud", "romance_scam", "job_fraud", ], }, priority: 200, routeGraph: { nodes: [ { id: "L0", level: "L0", label: "URGENT: Call 1930 + File on cybercrime.gov.in", description: "IMMEDIATELY call 1930 (National Cyber Crime Helpline) and file at cybercrime.gov.in. The CFCFRMS system triggers a bank-freeze request in the golden hour. Keep UPI transaction ID, fraudster's mobile/account number, and transaction amount ready. This step is time-critical — funds can be frozen before the fraudster withdraws.", actionType: "inform_user", target: { channel: "portal", url: "https://cybercrime.gov.in", helpline: "1930", }, expectedResponseDays: 1, }, { id: "L1", level: "L1", label: "Bank Freeze Request (RBI 2017 Zero-Liability)", description: "Contact your bank's fraud/cybercrime helpline immediately after calling 1930. Invoke the RBI Customer Liability Circular 2017 (DBR.No.Leg.BC.78/09.07.005/2017-18) — zero liability applies when unauthorized transaction is reported within 3 working days of bank communication. Demand written acknowledgement and a provisional credit within 10 working days.", actionType: "send_email", target: { channel: "email", recipient: "bank_fraud_desk" }, expectedResponseDays: 10, }, { id: "L2", level: "L2", label: "FIR at Police Station + I4C Follow-Up", description: "File an FIR at the nearest police station citing IT Act 2000 Section 66C (identity theft) / 66D (cheating by personation) and Bharatiya Nyaya Sanhita 2023 Section 318 (cheating) / 319 (cheating by personation) as applicable. Cross-reference the cybercrime.gov.in complaint number in the FIR. Follow up with the I4C nodal officer for the bank-freeze status.", actionType: "manual_packet", target: { channel: "physical", forum: "Police_Station_Cyber_Cell" }, expectedResponseDays: 30, }, { id: "L3", level: "L3", label: "Cyber Tribunal / Consumer Commission", description: "If police fails to act or bank does not reverse funds, escalate to the Adjudicating Officer under IT Act 2000 Section 46, or file at District Consumer Commission if bank's deficient service contributed to the fraud. RBI Ombudsman can be approached if bank refuses to apply zero-liability protection under the 2017 circular.", actionType: "manual_packet", target: { channel: "physical", forum: "Adjudicating_Officer_IT_Act" }, expectedResponseDays: 90, }, ], edges: [ { from: "L0", to: "L1", condition: "immediately_after_1930_call" }, { from: "L1", to: "L2", condition: "bank_not_responsive_or_fir_required" }, { from: "L2", to: "L3", condition: "police_inaction_or_funds_not_recovered" }, ], }, requiredEvidence: ["screenshot", "receipt", "chat", "pdf"], deadlines: { golden_hour_report_asap: true, note_golden_hour: "Call 1930 immediately — CFCFRMS freeze window is time-critical", bank_report_within_working_days: 3, note_bank_zero_liability: "RBI Circular 2017: zero liability if bank notified within 3 days", fir_deadline_days: 30, ombudsman_complaint_after_bank_days: 30, }, sourceCitationsBySectionRef: [ { actName: "MHA Cybercrime Reporting – 1930 Helpline and National Cybercrime Reporting Portal", sectionNo: "1930-helpline" }, { actName: "MHA Cybercrime Reporting – 1930 Helpline and National Cybercrime Reporting Portal", sectionNo: "cybercrime-gov-in" }, { actName: "MHA Cybercrime Reporting – 1930 Helpline and National Cybercrime Reporting Portal", sectionNo: "bank-freeze" }, { actName: "RBI Customer Liability in Unauthorised Electronic Banking Transactions Circular 2017", sectionNo: "zero-liability", }, { actName: "Information Technology Act, 2000", sectionNo: "66C" }, { actName: "Information Technology Act, 2000", sectionNo: "66D" }, { actName: "Bharatiya Nyaya Sanhita, 2023", sectionNo: "318" }, { actName: "Bharatiya Nyaya Sanhita, 2023", sectionNo: "319" }, ], socialTemplate: null, stopAndRefer: { conditions: ["sextortion", "threats_to_safety", "child_safety", "active_fraud_in_progress"], helpline: "1930", message: "Call 1930 and visit cybercrime.gov.in immediately. If unsafe or threatened, dial 112. This situation requires immediate human assistance — CourtMitra automation is paused pending human review.", }, active: true, }; export const ALL_ROUTE_RULES: RouteRuleSeedData[] = [ consumerRouteRule, paymentRouteRule, cyberFraudRouteRule, ];