Instructions to use CaseLoop/rights-navigator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CaseLoop/rights-navigator with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("CaseLoop/rights-navigator") model = AutoModelForSeq2SeqLM.from_pretrained("CaseLoop/rights-navigator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 15,811 Bytes
50a8ea3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | import { LegalCase, Rulebook, DecodedResponse } from '../types';
export const INITIAL_RULEBOOKS: Rulebook[] = [
{
id: 'rti',
title: 'Right to Information (RTI)',
category: 'Public Records & Transparency',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'File formal requests to access information and public records held by government departments, municipal corporations, police, and public authorities under the RTI Act 2005.',
estMinutes: 15,
icon: 'description',
jurisdictions: ['Central Public Authorities', 'State Information Commissions', 'Municipal Corporations (BBMP/MCD/BMC)'],
samplePrompts: [
'Daily progress report and tender expenditure for road resurfacing work in Ward 150',
'Reason for delay and current file movement status of building plan approval application',
'Certified copy of police action-taken report on complaint #NCR-8821',
],
keyStatute: 'Right to Information Act 2005 § 6(1)',
steps: [
'Identify Public Authority & PIO / CPIO',
'Format Specific Period & Certified Records Scope',
'Invoke Section 10 Mandatory Severability',
'Attach Rs. 10 Statutory Application Fee Proof',
'Generate Ready-to-Submit RTI Notice',
],
},
{
id: 'consumer',
title: 'Consumer Disputes & Refunds',
category: 'Commerce & Service Deficiencies',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'Demand full refunds, replacements, and compensation from e-commerce companies, airlines, builders, electronics brands, or service providers under the Consumer Protection Act 2019.',
estMinutes: 20,
icon: 'shopping_bag',
jurisdictions: ['District Consumer Disputes Redressal Commission', 'State Consumer Commission (SCDRC)', 'National Consumer Commission (NCDRC)'],
samplePrompts: [
'E-commerce company refusing refund of ₹45,000 for delivered defective laptop',
'Flight cancelled without statutory refund or hotel accommodation',
'Real estate builder delaying flat possession by 2 years beyond agreement date',
],
keyStatute: 'Consumer Protection Act 2019 § 35',
steps: [
'Establish Proof of Purchase & Invoice / Transaction ID',
'Itemize Product Defect or Service Deficiency',
'Calculate Refund Amount and Mental Agony Damages',
'Draft 15-Day Statutory Legal Demand Notice',
'Prepare Formal Consumer Forum Petition',
],
},
{
id: 'tenancy',
title: 'Tenancy & Security Deposit Notice',
category: 'Housing & Rent Rights',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'Statutory demand notices for landlords unlawfully withholding rental security deposits, unjustified deduction claims, or unlawful lockouts under Model Tenancy and State Rent Control Acts.',
estMinutes: 15,
icon: 'home_work',
jurisdictions: ['Rent Control Court', 'Tenancy Authority', 'Civil Court (Small Causes)'],
samplePrompts: [
'Landlord refusing to refund ₹1,20,000 security deposit after handover with zero damages',
'Unreasonable deduction of ₹40,000 for standard wear-and-tear painting charges',
'Arbitrary eviction notice without statutory 30-day notice period',
],
keyStatute: 'State Tenancy & Rent Control Act / Transfer of Property Act § 106',
steps: [
'Attach Rental Agreement & Bank Transfer Receipts',
'Document Flat Handover Notice & Inspection Photos',
'Calculate Statutory 12% Interest on Withheld Deposit',
'Draft 15-Day Pre-Litigation Legal Notice',
],
},
{
id: 'employment',
title: 'Wage Recovery & Full & Final Settlement',
category: 'Employment & Labor Rights',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'Formal pre-litigation notices for recovering unpaid salary, withheld full & final (F&F) settlements, gratuity, and relieving letters from employers under labor laws.',
estMinutes: 18,
icon: 'badge',
jurisdictions: ['Labor Commissioner Office', 'Payment of Wages Authority', 'Industrial Tribunal'],
samplePrompts: [
'Employer withholding 2 months salary and ₹1,80,000 F&F settlement post-resignation',
'Refusal to issue Relieving Letter and Experience Certificate after serving notice period',
'Unpaid statutory gratuity dues pending over 60 days',
],
keyStatute: 'Payment of Wages Act 1936 § 15 / Payment of Gratuity Act § 7',
steps: [
'Compile Offer Letter, Resignation Email & Acceptance Copy',
'Calculate Pending Wages, Notice Period Adjustment, and Gratuity',
'Draft 7-Day Statutory Legal Notice to Managing Director / HR',
'Prepare Formal Claim Petition for Labor Court',
],
},
{
id: 'cybercrime',
title: 'Digital Banking Fraud & UPI Chargeback',
category: 'Banking & Cyber Safety',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'Statutory notices for unauthorized credit card debits, UPI fraud chargebacks, and online cyber fraud invoking RBI Zero-Liability directives.',
estMinutes: 12,
icon: 'lock',
jurisdictions: ['RBI Banking Ombudsman', 'Cyber Crime Cell', 'National Cyber Crime Reporting Portal (1930)'],
samplePrompts: [
'Unauthorized OTP-less debit of ₹65,000 from credit card reported within 2 hours',
'Bank refusing to reverse fraudulent UPI transaction despite immediate intimation',
],
keyStatute: 'RBI Customer Protection Circular (Zero Liability) / IT Act § 43A',
steps: [
'Log Transaction Reference Number, UTR & Bank SMS Time',
'Invoke RBI 3-Day Zero Liability Protection Mandate',
'Draft Formal Grievance to Principal Nodal Officer',
'Prepare Banking Ombudsman Complaint Escalation',
],
},
{
id: 'welfare',
title: 'Civic Grievance & Municipal Redressal',
category: 'Civic Infrastructure & Entitlements',
tag: 'ACTIVE CATEGORY',
status: 'active',
statusLabel: 'Active Template',
description: 'Formal notices and petitions for municipal negligence, open drains, delayed pensions, contaminated water supply, or road hazards.',
estMinutes: 15,
icon: 'account_balance',
jurisdictions: ['Municipal Corporation Commissioner', 'District Magistrate Grievance Cell', 'State Human Rights Commission'],
samplePrompts: [
'Raw sewage overflow in residential layout unresolved for 3 weeks',
'Pending senior citizen pension approval delayed beyond 90 days',
],
keyStatute: 'Municipal Corporation Act / Public Grievance Charter',
steps: [
'Document Geotagged Photos & Prior Complaint Numbers',
'Cite Municipal Statutory Duty for Public Health & Sanitation',
'Draft Formal Notice to Zonal Executive Engineer',
],
},
];
export const INITIAL_CASES: LegalCase[] = [
{
id: 'case-cl-2024-8932',
caseNumber: '#CL-2024-8932',
title: 'BBMP Ward 150 - Road Tender & Expenditure RTI',
category: 'Public Records (RTI)',
rulebookId: 'rti',
status: 'drafting',
statusBadge: 'In Progress',
statusType: 'warning',
deadlineText: 'Reply due in 18 days',
filedDate: 'October 24, 2024',
description: 'Requesting certified copies of work orders, quality test reports, and contractor payment vouchers for road resurfacing in Ward 150 under RTI Act 2005.',
rawIntakeText: 'Requesting certified inspection notes and bills for asphalt resurfacing on 27th Main Road, HSR Layout Ward 150 done in August 2024.',
redactedText: 'Requesting certified inspection notes and bills for asphalt resurfacing on [REDACTED LOCATION] done in August 2024.',
piiItems: [
{ id: 'pii-1', original: 'HSR Layout, Bengaluru 560102', type: 'Residential Location', masked: true },
{ id: 'pii-2', original: 'citizen.requester@gmail.com', type: 'Email Address', masked: true },
],
facts: [
{ id: 'f1', label: 'Work Subject', value: 'Road Asphalting & Drain Repair' },
{ id: 'f2', label: 'Public Authority', value: 'Bruhat Bengaluru Mahanagara Palike (BBMP)' },
{ id: 'f3', label: 'Statutory Act', value: 'Right to Information Act 2005 § 6(1)' },
],
officer: {
name: 'Dr. Suresh Kumar, KAS',
title: 'Public Information Officer (PIO) & Executive Engineer',
department: 'BBMP Engineering Division, South Zone',
avatar: 'SK',
jurisdiction: 'Bengaluru',
email: 'pio.southzone@bbmp.gov.in',
},
requestScope: 'Certified copies of work orders, measurement book (MB) entries, bitumen test reports, and sanctioned expenditure records.',
dateRange: 'August 2024 to October 2024',
statute: 'Right to Information Act 2005 § 6(1)',
score: 88,
hasHardshipClause: false,
autoRedactEnabled: true,
autoEscalateEnabled: true,
daysRemaining: 18,
revisionCount: 3,
lastEdited: '2 hours ago',
},
{
id: 'case-consumer-refund',
caseNumber: '#CL-2024-7719',
title: 'Consumer Notice: Defective Laptop & Refund Recovery',
category: 'Consumer Disputes',
rulebookId: 'consumer',
status: 'awaiting_reply',
statusBadge: 'Awaiting Reply',
statusType: 'urgent',
deadlineText: '15-Day Notice expires in 4 days',
filedDate: 'October 18, 2024',
description: '15-day statutory pre-litigation legal notice demanding immediate refund of ₹64,990 for a defective laptop sold with motherboard failure.',
rawIntakeText: 'Purchased ASUS laptop via e-commerce platform with Order ID #OD8812903. Failed on day 3. Service center denied replacement.',
redactedText: 'Purchased laptop with Order ID [REDACTED_ORDER_ID]. Defect reported within warranty period.',
piiItems: [
{ id: 'pii-c1', original: 'Order #OD8812903', type: 'Order Reference', masked: true },
{ id: 'pii-c2', original: 'Flat 402, Green Glen Layout, Bengaluru', type: 'Requester Address', masked: true },
],
facts: [
{ id: 'f-c1', label: 'Purchase Value', value: '₹64,990 (Fully Paid via UPI)' },
{ id: 'f-c2', label: 'Primary Cause', value: 'Deficient Service & Defective Product' },
{ id: 'f-c3', label: 'Opposing Party', value: 'Retailer & Authorized Service Center' },
],
officer: {
name: 'Head of Legal & Consumer Grievances',
title: 'Designated Nodal Grievance Officer',
department: 'E-Commerce Marketplace Grievance Redressal Cell',
avatar: 'LO',
jurisdiction: 'Bengaluru / Pan-India',
email: 'grievance-officer@marketplace-retail.in',
},
requestScope: 'Full refund of ₹64,990 with 18% p.a. interest, plus ₹15,000 compensation for mental harassment and loss of working days.',
dateRange: 'October 2024',
statute: 'Consumer Protection Act 2019 § 35',
score: 92,
hasHardshipClause: true,
autoRedactEnabled: true,
autoEscalateEnabled: true,
daysRemaining: 4,
revisionCount: 2,
lastEdited: '35 minutes ago',
},
{
id: 'case-tenancy-deposit',
caseNumber: '#CL-2024-6401',
title: 'Legal Demand: Security Deposit Refund of ₹1,40,000',
category: 'Tenant Protections',
rulebookId: 'tenancy',
status: 'stress_tested',
statusBadge: 'Ready to Send',
statusType: 'success',
deadlineText: 'Drafted: Oct 12, 2024',
filedDate: 'October 12, 2024',
description: 'Pre-litigation legal notice demanding immediate refund of rental security deposit unlawfully withheld without valid itemized deductions.',
rawIntakeText: 'Vacated apartment on 30th Sept 2024 after clean handover. Landlord refusing to return ₹1,40,000 deposit citing vague maintenance reasons.',
redactedText: 'Vacated apartment after complete handover. Notice issued for refund of [REDACTED_AMOUNT] security deposit.',
piiItems: [
{ id: 'pii-t1', original: '₹1,40,000 Security Deposit', type: 'Financial Figure', masked: true },
{ id: 'pii-t2', original: 'Apt 301, Palm Meadows, Whitefield', type: 'Rental Address', masked: true },
],
facts: [
{ id: 'f-t1', label: 'Withheld Deposit Amount', value: '₹1,40,000' },
{ id: 'f-t2', label: 'Handover Date', value: 'September 30, 2024 (Signed Checklist Available)' },
{ id: 'f-t3', label: 'Statute Applied', value: 'State Tenancy Act & Indian Contract Act § 73' },
],
officer: {
name: 'Mr. R. K. Sharma (Landlord)',
title: 'Property Owner',
department: 'Private Tenancy Agreement',
avatar: 'RS',
jurisdiction: 'Delhi / NCR',
email: 'rksharma.property@gmail.com',
},
requestScope: 'Immediate refund of ₹1,40,000 with 12% p.a. statutory interest from the date of handover, failing which civil and summary recovery proceedings will be initiated.',
dateRange: 'September 2024 to Present',
statute: 'Transfer of Property Act § 106 & Indian Contract Act',
score: 95,
hasHardshipClause: false,
autoRedactEnabled: true,
autoEscalateEnabled: false,
daysRemaining: 7,
revisionCount: 2,
lastEdited: '1 day ago',
},
];
export const DECODED_RESPONSES: Record<string, DecodedResponse> = {
exemption_pending_investigation: {
departmentStatement: 'Information denied pursuant to Section 8(1)(h) as investigation is pending in the department.',
actualMeaning: 'The department is trying to stall the RTI by citing an ongoing internal inquiry. Under Section 10 of RTI Act 2005, all non-exempt records must still be severed and provided within 30 days.',
severity: 'medium',
recommendedAction: 'File a First Appeal under Section 19(1) requesting certified release of all non-exempt notesheets and progress reports.',
appealDeadlineDays: 30,
},
glomar_neither_confirm_nor_deny: {
departmentStatement: 'The public authority neither confirms nor denies holding the requested information under internal departmental confidentiality guidelines.',
actualMeaning: 'Public authorities cannot cite internal guidelines over the RTI Act 2005. Section 22 gives the RTI Act overriding effect over departmental secrecy rules.',
severity: 'high',
recommendedAction: 'Issue a statutory Demand Notice invoking Section 22 overriding effect and Section 20 penalty warnings.',
appealDeadlineDays: 15,
},
excessive_fee_estimate: {
departmentStatement: 'Fulfillment of your request will require extensive clerical search time estimated at Rs. 4,500 advance search and compilation fees.',
actualMeaning: 'Public authorities cannot charge arbitrary compilation charges under the RTI Rules 2012 (statutory fee is strictly Rs. 2 per page for photocopies).',
severity: 'high',
recommendedAction: 'File an objection under RTI Fee Rules 2012 limiting fees to actual photocopying charges (Rs. 2/page) and demand fee waiver under Section 7(6) if delayed beyond 30 days.',
appealDeadlineDays: 10,
},
partial_redaction_pii: {
departmentStatement: 'Certified documents released with third-party personal identifiers redacted under Section 10(1) severability.',
actualMeaning: 'Standard compliant release. Legitimate statutory privacy protections were applied to unrelated third parties.',
severity: 'low',
recommendedAction: 'Inspect released certified records and verify all requested work orders and sanction notes are included.',
appealDeadlineDays: 30,
},
};
|