Repository navigation
Description
Problem
Friday rewrites words that sound like product names, in every cleanup mode, with
no off switch. cloud/clouds become Claude, codec/cortex become Codex,
sol/sole/soul become Sol, fable becomes Fable, whisper gets cased
as Whisper.
These rules exist because they are the words I say all day, and I only ever
say those sounds as product names. That is a fine trade for me and a bad one for
almost everyone else. If you dictate "the sole of my shoe" you get "the Sol of
my shoe", and there is currently nothing you can do about it. This was listed as
a known trade-off in the v0.4.0 notes; it should stop being one.
Rough scope
A user-editable vocabulary layer on top of (or replacing) the hardcoded rules:
- A settings surface where a user can add their own
heard → writtenpairs. - Persist them alongside existing settings.
- Apply them in the cleanup pipeline.
- Let a user disable the built-in defaults, individually or as a set. What the
default should be for a fresh install is an open question — I lean toward
shipping the built-ins off and letting people opt in, but I am not certain.
Pointers
Sources/FridayMac/Services/PostProcessService.swift— every current rule
lives here as anormalize*Brand/normalize*Termsfunction with a hand-
written regex. Note the guards: word-boundary lookarounds, and thewhisper
rule deliberately skippingwhisper.cppandwhisper-server. A user-supplied
rule needs equivalent guarding, which is most of the real work.Sources/FridayMac/Models/FridaySettings.swiftand
Sources/FridayMac/Services/SettingsStore.swift— settings model and
persistence, including how older settings files migrate.Sources/FridayMac/UI/MenuContentView.swift— where a settings control would
surface.Tests/FridayMacTests/PostProcessServiceTests.swift— existing rule tests.
What a first contribution could look like
You do not have to do all of it. A genuinely useful first PR is just the data
layer: a settings-persisted list of user pairs, applied literally (no regex
authoring by the user) after the built-in rules, with tests. UI and the
disable-the-defaults switch can be separate PRs.
Honest unknowns
- Whether users should be allowed to write regexes at all. Probably not — a bad
user regex can be quadratic and Friday already had to remove one such case.
Literal phrase matching with case options is the safer design, but it cannot
express some of the existing built-ins. - Whether rewriting should be case-sensitive, and how to handle a rule that
should apply inside a Chinese sentence with no word boundaries. - Whether per-app vocabularies are worth it. I suspect not for v1.
Activity