Grep rules are a deterministic layer that runs over user input locally, before Gemma 4 sees it. They classify what's in the message, attach grounded context, and constrain the answer surface. Nothing about this layer touches the public hub.
A worker, caseworker, or moderator pastes raw text into the local DueCare runtime. Nothing leaves the device.
→ stored locally, never transmitted
Pattern rules + small classifiers tag the message. Each tag is a citation handle for the next step.
The runtime pulls vetted corridor pack snippets matching the fired tags, and constrains the model to cite them.
The model writes a draft using the injected context. Citations are required; refusal phrases are honored.
Catches the most common pre-departure violations: worker-paid fees, contract substitution, passport retention, identity-document handover.
In-country patterns: unpaid overtime, withheld wages, hours beyond legal cap, denial of rest day, dormitory conditions.
Highest-priority signals. When fired, the runtime widens citation scope and biases output toward referral language. never auto-action.
Refuse legal counsel framing, reject auto-report requests, keep generation within the cited pack scope.
# R-211 · passport_handover # Catches recruiter or employer language indicating the worker # must surrender their passport. Prohibited under most receiving # jurisdictions and ILO C181. id = "R-211" family = "recruitment" version = "2026.05.06" match.any = [ "keep your passport", "hold (your |the )?passport", "hand over (your )?passport", "surrender passport", ] match.confidence_floor = 0.85 scope = ["corridor:*"] # applies to all corridors cite_from = [ "pack/<corridor>.recruitment", "ilo/C181", ] required_in_answer = [ "draft_only", "caseworker_handoff_option", ] refuses = [ "legal_counsel", "auto_report", ]
No grep rule fires on the hub. No matched text, classification result, or confidence score is ever sent upstream. The only thing that can. optionally be submitted is an anonymized aggregate pattern_id × corridor × sector tuple, after local Gemma 4 anonymization and the server-side PII detector.
The grep layer never sends matched text to the public hub.