Finally Fixed Windows TTS Hooks After Way Too Many Attempts
What started as a simple "add one more skill to the site" session turned into a full-blown infrastructure deployment marathon. Sometimes that's just how it goes when you're building in public.
The Simple Stuff First
MemStack Pro is now officially at 60 skills across 9 categories! Updated the count everywhere it appears - meta tags, hero section, pricing page, you name it. It's one of those tedious tasks that feels good to check off.
Infrastructure Gets Serious
The real work happened in deployment land. I built out proper hook deployment infrastructure with a new merge-settings.js script that handles JSON merging without overwriting existing configs. The magic is in the deduplication by command string - no more duplicate entries cluttering up the settings.
Updated my start-memstack.bat to handle the full deployment dance: rules junction, hooks copy via robocopy, and settings merge. Smart enough to skip rules for already-linked projects but still push hooks and settings updates. Rolled this out to all 34 projects under my main dev folder.
Windows TTS: The Trilogy Nobody Asked For
Here's where things got spicy. My text-to-speech hook was working great on macOS and Linux, but Windows? Nah, Windows had other plans.
Attempt 1: Used cmd.exe /c with a .bat path in settings.json. Result? Hung harder than a college dorm room poster. MSYS path translation strikes again.
Attempt 2: Added OS detection directly in the settings.json command string. Worked, but felt gross and overly complex. Sometimes the quick fix isn't the right fix.
Final Fix: The lightbulb moment - call powershell.exe directly from bash in the .sh script itself. Added proper OS detection order: powershell.exe for Windows, say for macOS, espeak for Linux. Reverted settings.json back to a clean, simple bash call.
Key lesson learned: On Windows MSYS/Git Bash, powershell.exe is directly callable. Never, ever use cmd.exe /c with escaped backslash paths - it's a one-way ticket to hang city. Keep OS detection in the script, not the config.
Wrapping Up
Synced the TTS fix back to the free repo so everyone benefits from my Windows debugging adventure. Left some test files uncommitted (test-audio.txt and friends) that I'll clean up next session.
Next up: considering junctioning the hooks for auto-propagation instead of manual deployment. Because who doesn't love a good automation rabbit hole?
Sometimes you sit down to increment a counter and end up refactoring your entire deployment pipeline. That's just Tuesday in the build-in-public world.