Problem
While the current RULE_PACKS["BR"] covers core baseline patterns (like Uber, iFood, and main streaming services), users with Brazilian bank accounts connected via Pluggy still encounter recurring uncategorized transactions. This happens because the pack lacks coverage for critical regional utilities (energy, water, and gas concessionaires), bank/government fees (IOF, administrative tariffs), cash withdrawals, and specific high-volume national brands (e.g., Zé Delivery, Ipiranga, Atacadão).
Proposed Solution
Expand the rules dictionary RULE_PACKS["BR"] inside backend/app/services/rule_service.py to include the following missing patterns:
1. National & Regional Utilities
contains: "LIGHT" / "ENEL" / "CPFL" / "NEOENERGIA" / "COPEL" / "CELESC" / "EQUATORIAL" / "EDP" / "CEMIG" → Moradia (Energy)
contains: "SABESP" / "CEDAE" / "AGUAS DO RIO" / "IGUA" / "BRK AMBIENTAL" / "SANEPAR" / "COPASA" / "EMBASA" / "COMPESA" / "CORSAN" / "CAGECE" / "SANEAGO" → Moradia (Water)
contains: "CEG" / "COMGAS" / "NATURGY" → Moradia (Gas)
2. Fees, Taxes & Cash
contains: "IOF" / "TARIFA" / "CUSTAS" / "MULTA" / "JUROS" / "ENCARGOS" → Impostos & Taxas
contains: "SAQUE" → Transferências
3. Retail & Brand Extensions
contains: "ZE DELIVERY" → Alimentação
contains: "IPIRANGA" / "PETROBRAS" → Transporte (Fuel)
contains: "VELOE" / "CONECTCAR" → Transporte (Mobility/Toll)
contains: "ATACADAO" / "PÃO DE AÇÚCAR" / "PAO DE ACUCAR" → Mercado
contains: "PACHECO" / "PAGUEMENOS" → Saúde
contains: "TICKETMASTER" / contains: "STEAM" → Lazer
contains: "PET" → Pets
Alternatives Considered
- Relying on end-user custom rules for utilities, which creates a fragmented experience since concessionaires are regional monopolies every user in that state will inevitably interact with.
- Relying entirely on LLM/AI categorization with MCP
Additional Context
These additions fill the remaining high-frequency gaps identified after checking the current rule engine implementation against real-world transaction payloads delivered by Pluggy.
Problem
While the current
RULE_PACKS["BR"]covers core baseline patterns (like Uber, iFood, and main streaming services), users with Brazilian bank accounts connected via Pluggy still encounter recurring uncategorized transactions. This happens because the pack lacks coverage for critical regional utilities (energy, water, and gas concessionaires), bank/government fees (IOF, administrative tariffs), cash withdrawals, and specific high-volume national brands (e.g., Zé Delivery, Ipiranga, Atacadão).Proposed Solution
Expand the rules dictionary
RULE_PACKS["BR"]insidebackend/app/services/rule_service.pyto include the following missing patterns:1. National & Regional Utilities
contains: "LIGHT"/"ENEL"/"CPFL"/"NEOENERGIA"/"COPEL"/"CELESC"/"EQUATORIAL"/"EDP"/"CEMIG"→ Moradia (Energy)contains: "SABESP"/"CEDAE"/"AGUAS DO RIO"/"IGUA"/"BRK AMBIENTAL"/"SANEPAR"/"COPASA"/"EMBASA"/"COMPESA"/"CORSAN"/"CAGECE"/"SANEAGO"→ Moradia (Water)contains: "CEG"/"COMGAS"/"NATURGY"→ Moradia (Gas)2. Fees, Taxes & Cash
contains: "IOF"/"TARIFA"/"CUSTAS"/"MULTA"/"JUROS"/"ENCARGOS"→ Impostos & Taxascontains: "SAQUE"→ Transferências3. Retail & Brand Extensions
contains: "ZE DELIVERY"→ Alimentaçãocontains: "IPIRANGA"/"PETROBRAS"→ Transporte (Fuel)contains: "VELOE"/"CONECTCAR"→ Transporte (Mobility/Toll)contains: "ATACADAO"/"PÃO DE AÇÚCAR"/"PAO DE ACUCAR"→ Mercadocontains: "PACHECO"/"PAGUEMENOS"→ Saúdecontains: "TICKETMASTER"/contains: "STEAM"→ Lazercontains: "PET"→ PetsAlternatives Considered
Additional Context
These additions fill the remaining high-frequency gaps identified after checking the current rule engine implementation against real-world transaction payloads delivered by Pluggy.