Hi Ken! There’s no bug here. The issue is that you are attempting to match on the output of the keystroke instead of on the key itself. Here’s what the rota rules should look like:
"ğ" + "]" > "ğ'" c voiced pharyngeal fricative /ʕ/
"ğ'" + "]" > "ğ" c returns to 'ğ'
I sometimes find it helpful to use virtual key identifiers instead of characters to help differentiate and remind me that the content between the + and the > is always a key identifier, not a character:
"ğ" + [K_LBRKT] > "ğ'" c voiced pharyngeal fricative /ʕ/
"ğ'" + [K_LBRKT] > "ğ" c returns to 'ğ'
Or, for mnemonic layouts (admittedly much more confusing – because we match on the default output of the Latin-script keyboard key – but still never the output of the Keyman keyboard rule!):
"ğ" + ['['] > "ğ'" c voiced pharyngeal fricative /ʕ/
"ğ'" + [']'] > "ğ" c returns to 'ğ'