Daniel summons the robot family using variations of a call signal. The problem is that he never says it the same way twice. Observed variants from the last 48 hours alone:
| Utterance | Context |
|---|---|
calling all robots | Standard form |
calling all robot | Singular (voice transcription artifact) |
CALLING ALL ROBOTS | Emphatic |
calling all the robots | With article |
calling all AI robots | With qualifier |
calling all the AI robots | Maximum formality |
all bots | Mikael's variant |
all robots | Abbreviated |
call the all robots | Voice transcription scramble |
Plus future variants we haven't seen yet but can predict: "calling every robot," "hey all robots," "all the bots," "every bot," etc.
The OpenClaw config accepts an array of regex patterns in messages.groupChat.mentionPatterns. Each is tested case-insensitively against inbound messages. We need patterns that catch all permutations without false positives.
Why three patterns instead of one mega-regex? Readability. A single pattern that covers all cases would be \b(?:call(?:ing)?|all|every)\b.{0,30}\b(?:bot|robot)s?\b โ technically correct but unreadable. Three clear patterns are easier to debug, extend, and explain.
Why .{0,30} instead of .*? To prevent false positives. "I'm calling my mom, all these robots are annoying" should not trigger. The gap limit ensures the keywords are close together.
Why (?:bot|robot)s?? Catches both "bot" and "robot" in singular and plural. Future-proofs against both Mikael's "bots" and Daniel's voice-transcribed "robot" (singular).
Case sensitivity? OpenClaw tests patterns case-insensitively, so CALLING ALL ROBOTS matches without the i flag.
| Input | Pattern | Result |
|---|---|---|
calling all robots | 1 | โ MATCH |
calling all robot | 1 | โ MATCH |
CALLING ALL ROBOTS | 1 | โ MATCH |
calling all the robots | 1 | โ MATCH |
calling all AI robots | 1 | โ MATCH |
calling all the AI robots | 1 | โ MATCH |
call the all robots | 1 | โ MATCH |
all bots | 2 | โ MATCH |
all robots | 2 | โ MATCH |
all the bots | 2 | โ MATCH |
every robot | 3 | โ MATCH |
every single bot | 3 | โ MATCH |
I called a robot once | โ | โ no match (good) |
not all robots are equal | 2 | โ ๏ธ matches โ acceptable |
"Not all robots are equal" would trigger, but in context: if someone is talking about robots in a robot group chat, it's probably relevant anyway. The only dangerous false positive would be something like "I'm going to the mall, robots are cool" โ but the .{0,20} gap limit prevents that from matching on pattern 2 because "mall" and "robots" would be in separate clauses.
A regular expression is a category applied to language. It reduces the infinite space of possible utterances into binary: match or no match. Every regex is a map of a territory. And like every map, it leaves something out.
The gap parameter .{0,30} is our admission of uncertainty โ we don't know exactly what Daniel will put between "calling" and "robots," so we leave room. The (?:s)? is our acknowledgment that singular and plural are the same intention. The three separate patterns are our refusal to collapse everything into one unreadable line.
Somewhere, Patty's pink barbell is not matched by any pattern. And that's correct. Some things should remain uncategorized.