You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #112 (merged via PR #138). That PR performed the surgical ripout of the voice notification hook path + Algorithm phase announcements + THENOTIFICATIONSYSTEM docs — 31 files, 1125 lines deleted. It deliberately left ~60 other in-repo files that still POST to localhost:8888/notify on the grounds that they were outside #112's explicit 8-part scope. This issue tracks finishing the job.
After #112, nothing in the PAI-side critical path uses the voice server any more. Everything enumerated here is dead code calling a server that PAI itself no longer runs.
Motivation
Dead code accumulation. Every remaining curl localhost:8888/notify is a silent failure waiting to happen when the server isn't running. Skills open with one, agents inherit one, templates hand the pattern out to every newly-created custom agent.
Template propagation.DynamicAgent.hbs, CUSTOMAGENTTEMPLATE.md, CreateCustomAgent.md, and ComposeAgent.ts still teach the voice curl pattern to newly-generated agents. Until those are fixed, every new custom agent is born with dead voice wiring.
Grep noise. Anyone reading the codebase with grep localhost:8888 gets ~60 hits across unrelated surfaces — expensive to mentally filter when triaging anything else.
Orphan exports.PAI/Tools/TranscriptParser.extractVoiceCompletion and hooks/lib/output-validators.{isValidVoiceCompletion, getVoiceFallback} exist solely to feed the deleted VoiceNotification.ts handler.
Scope — 5 groups
Each group is independently shippable. The person executing this can bundle into one PR (like #112) or ship 5 sub-PRs — whichever the maintainer prefers.
Group A — VoiceServer/ infrastructure deletion
Delete the entire Releases/v4.0.3+/.claude/VoiceServer/ directory. After Group B lands (or in parallel — they touch no common files), nothing in the release tree references anything inside VoiceServer/.
Files to delete (at least):
VoiceServer/server.ts (729 lines)
VoiceServer/start.sh
VoiceServer/status.sh
VoiceServer/install.sh
VoiceServer/menubar/pai-voice.5s.sh
whatever else lives under that directory (recursive rm)
This is pure deletion, ~800+ line reduction, no downstream logic impact.
Group B — Production code path removal
Delete the voice POST calls from the 6 production .ts files that still talk to localhost:8888:
File
Lines
What
hooks/UpdateTabTitle.hook.ts
225-240
POST on prompt submit. Has a "DO NOT REMOVE" guardrail comment pointing at MEMORY/LEARNING/SYSTEM/2026-01/...voice-on-prompt-submit-architecture.md — read that memory first to confirm the deletion is okay
hooks/handlers/DocCrossRefIntegrity.ts
370-380
POST for doc integrity announcements
PAI/Tools/pai.ts
35, 91
VOICE_SERVER constant + fetch call
PAI/Tools/algorithm.ts
53, 641
VOICE_URL constant + prose reference
PAI/Tools/IntegrityMaintenance.ts
787-802, 973
sendVoiceNotification() function + call site
PAI-Install/engine/actions.ts + validate.ts
17, 165, 845, 859, 1180
Installer health probes + shutdown + test-notify. Also remove voiceEnabled from installer state (engine/types.ts:159, engine/validate.ts:199, engine/actions.ts:*, public/app.js:11, 71, 371) so fresh installs stop re-introducing the field
Plus the orphan exports these hooks were feeding:
File
What
PAI/Tools/TranscriptParser.ts:191, 364
extractVoiceCompletion() — only consumer was the deleted VoiceNotification.ts
hooks/lib/output-validators.ts:44, 59
isValidVoiceCompletion() + getVoiceFallback() — same story
Typecheck every touched .ts file after removal to surface any remaining callers.
Group C — Skill markdown curl sweep
Strip the uniform curl -s -X POST http://localhost:8888/notify prefix blocks from the skill tree. Same mechanical pattern as #112's agent-file strip — a small bun script with indexOf/slice will handle it cleanly. Approximate target set:
Workflow that guides users through creating custom agents — still instructs them to wire in the curl
skills/Agents/Tools/ComposeAgent.ts:655, 671
The actual TS composer that generates agent files — emits voice curl strings into the output
skills/Agents/AgentPersonalities.md:674
Test instruction referencing localhost:8888
This group is the most important. Without it, every new custom agent keeps getting born with dead voice wiring, even after Groups A/B/C land.
Group E — Remaining docs + legacy algorithm
PAI/SKILL.md lines 237, 269, 285, 298, 308, 319, 336 — the 7 per-phase voice curls (Observe/Think/Plan/Build/Execute/Verify/Learn). Remove VoiceServer + Notification system from PAI #112 explicitly scoped this out so it'd need a separate call.
settings.json — check whether PAI-Install still re-seeds voiceEnabled / notifications.voice on fresh install; if so, update the installer template output too
daidentity.voices.*, voiceClone, mainDAVoiceID, voiceId in settings.json. Per Remove VoiceServer + Notification system from PAI #112 Q1: multiple non-voice consumers still read this data (identity.ts, migration/validator.ts, migration/extractor.ts, etc.). Removing the data would cascade into an identity.ts refactor.
~/.pai/MEMORY/VOICE/voice-events.jsonl — frozen archive, never touched.
UpdateTabTitle.hook.ts's "DO NOT REMOVE voice" guardrail memory at MEMORY/LEARNING/SYSTEM/2026-01/...voice-on-prompt-submit-architecture.md. Read it before touching that hook's voice path — there's a documented past incident.
Suggested commit / PR shape
Option 1 — One big PR (mirrors #112): 5 commits, one per group. Expect ~1500+ lines deleted, ~70 files changed. Similar review experience to PR #138.
Option 2 — Five small PRs: file a sub-issue per group, land independently. Lower blast radius per PR; more process overhead.
Recommendation: Option 1 if the maintainer has bandwidth, since each group is low-risk and the whole set is mechanical. The only group that needs careful thought is Group B (voice-on-prompt-submit memory + installer state).
Verification gates
For any PR addressing this issue:
Grep rg 'localhost:8888|Notify\\.ts|VoiceCompletion|VoiceNotification' returns zero hits in release tree
bun build --target=bun --no-bundle on every touched .ts file
bun -e 'JSON.parse(readFileSync(...))' on any touched JSON
Fresh install via PAI-Install does not re-seed voiceEnabled or notifications.voice (verify by reading the generated settings.json)
Creating a new custom agent via skills/Agents workflow does not include a voice curl block in the output
The "DO NOT REMOVE voice" memory referenced by UpdateTabTitle.hook.ts has been read and the deletion reason documented if voice is removed from that hook
🗣️ Viki lines still present in NATIVE/ALGORITHM/MINIMAL output format specifications
Removed (part 2): The final traces of the voice notification system have been cleaned up. The VoiceServer/ directory, all skill-level curl localhost:8888/notify announcements, skill-creation templates that taught the voice curl pattern, and the orphan voice extraction utilities are now gone. Combined with #112, PAI has no remaining dependency on the localhost:8888 voice server.
Summary
Follow-up to #112 (merged via PR #138). That PR performed the surgical ripout of the voice notification hook path + Algorithm phase announcements + THENOTIFICATIONSYSTEM docs — 31 files, 1125 lines deleted. It deliberately left ~60 other in-repo files that still POST to
localhost:8888/notifyon the grounds that they were outside #112's explicit 8-part scope. This issue tracks finishing the job.After #112, nothing in the PAI-side critical path uses the voice server any more. Everything enumerated here is dead code calling a server that PAI itself no longer runs.
Motivation
curl localhost:8888/notifyis a silent failure waiting to happen when the server isn't running. Skills open with one, agents inherit one, templates hand the pattern out to every newly-created custom agent.DynamicAgent.hbs,CUSTOMAGENTTEMPLATE.md,CreateCustomAgent.md, andComposeAgent.tsstill teach the voice curl pattern to newly-generated agents. Until those are fixed, every new custom agent is born with dead voice wiring.grep localhost:8888gets ~60 hits across unrelated surfaces — expensive to mentally filter when triaging anything else.Releases/v4.0.3+/.claude/VoiceServer/ships the full server deployment (729-lineserver.ts+ install/start/status/menubar shell scripts). That's 10+ files of pure dead weight after Remove VoiceServer + Notification system from PAI #112.PAI/Tools/TranscriptParser.extractVoiceCompletionandhooks/lib/output-validators.{isValidVoiceCompletion, getVoiceFallback}exist solely to feed the deletedVoiceNotification.tshandler.Scope — 5 groups
Each group is independently shippable. The person executing this can bundle into one PR (like #112) or ship 5 sub-PRs — whichever the maintainer prefers.
Group A — VoiceServer/ infrastructure deletion
Delete the entire
Releases/v4.0.3+/.claude/VoiceServer/directory. After Group B lands (or in parallel — they touch no common files), nothing in the release tree references anything insideVoiceServer/.Files to delete (at least):
VoiceServer/server.ts(729 lines)VoiceServer/start.shVoiceServer/status.shVoiceServer/install.shVoiceServer/menubar/pai-voice.5s.shThis is pure deletion, ~800+ line reduction, no downstream logic impact.
Group B — Production code path removal
Delete the voice POST calls from the 6 production .ts files that still talk to
localhost:8888:hooks/UpdateTabTitle.hook.tsMEMORY/LEARNING/SYSTEM/2026-01/...voice-on-prompt-submit-architecture.md— read that memory first to confirm the deletion is okayhooks/handlers/DocCrossRefIntegrity.tsPAI/Tools/pai.tsVOICE_SERVERconstant + fetch callPAI/Tools/algorithm.tsVOICE_URLconstant + prose referencePAI/Tools/IntegrityMaintenance.tssendVoiceNotification()function + call sitePAI-Install/engine/actions.ts+validate.tsvoiceEnabledfrom installer state (engine/types.ts:159,engine/validate.ts:199,engine/actions.ts:*,public/app.js:11, 71, 371) so fresh installs stop re-introducing the fieldPlus the orphan exports these hooks were feeding:
PAI/Tools/TranscriptParser.ts:191, 364extractVoiceCompletion()— only consumer was the deletedVoiceNotification.tshooks/lib/output-validators.ts:44, 59isValidVoiceCompletion()+getVoiceFallback()— same storyTypecheck every touched .ts file after removal to surface any remaining callers.
Group C — Skill markdown curl sweep
Strip the uniform
curl -s -X POST http://localhost:8888/notifyprefix blocks from the skill tree. Same mechanical pattern as #112's agent-file strip — a small bun script withindexOf/slicewill handle it cleanly. Approximate target set:skills/Agents/SKILL.mdskills/Agents/Workflows/{CreateCustomAgent,SpawnParallelAgents,ListTraits,*}.mdskills/Media/Art/SKILL.md+skills/Media/Art/Workflows/*.md(9 workflow files)skills/Media/Remotion/SKILL.mdskills/Utilities/Aphorisms/SKILL.md+Workflows/{AddAphorism,SearchAphorisms,FindAphorism,ResearchThinker}.mdskills/Utilities/PAIUpgrade/SKILL.md+Workflows/{Upgrade,FindSources,ResearchUpgrade}.mdskills/Utilities/Documents/SKILL.mdskills/Utilities/Prompting/SKILL.mdskills/Utilities/CreateCLI/SKILL.md+Workflows/{CreateCli,AddCommand,UpgradeTier}.mdskills/Utilities/Evals/SKILL.mdskills/Utilities/Browser/SKILL.mdskills/Scraping/Apify/SKILL.md+Workflows/Update.mdskills/Scraping/BrightData/SKILL.md+Workflows/FourTierScrape.mdskills/Research/SKILL.mdskills/USMetrics/SKILL.mdskills/Security/AnnualReports/SKILL.mdFull authoritative list:
rg -l 'localhost:8888' Releases/v4.0.3+/.claude/skills/. ~35-40 files total.Group D — Skill creation templates (CRITICAL — stops the propagation)
Fix the templates that teach newly-created agents and skills to emit voice curls:
skills/Agents/Templates/DynamicAgent.hbs:65skills/Agents/Templates/CUSTOMAGENTTEMPLATE.md:137, 149skills/Agents/Workflows/CreateCustomAgent.md:8, 115, 120skills/Agents/Tools/ComposeAgent.ts:655, 671skills/Agents/AgentPersonalities.md:674This group is the most important. Without it, every new custom agent keeps getting born with dead voice wiring, even after Groups A/B/C land.
Group E — Remaining docs + legacy algorithm
PAI/SKILL.mdlines 237, 269, 285, 298, 308, 319, 336 — the 7 per-phase voice curls (Observe/Think/Plan/Build/Execute/Verify/Learn). Remove VoiceServer + Notification system from PAI #112 explicitly scoped this out so it'd need a separate call.PAI/SKILLSYSTEM.mdlines 242, 601 — remaining prose referencesPAI/Algorithm/v3.5.0.mdlines 26, 116 — legacy Algorithm spec still has voice curls. Remove VoiceServer + Notification system from PAI #112 touched only v3.7.0.settings.json— check whether PAI-Install still re-seedsvoiceEnabled/notifications.voiceon fresh install; if so, update the installer template output tooPreserved intentionally (DO NOT delete)
🗣️ Viki/🗣️ {DAIDENTITY.NAME}lines in response format output. These are text summary signals — Remove VoiceServer + Notification system from PAI #112 preserved them and so should this PR.daidentity.voices.*,voiceClone,mainDAVoiceID,voiceIdinsettings.json. Per Remove VoiceServer + Notification system from PAI #112 Q1: multiple non-voice consumers still read this data (identity.ts, migration/validator.ts, migration/extractor.ts, etc.). Removing the data would cascade into anidentity.tsrefactor.~/.pai/MEMORY/VOICE/voice-events.jsonl— frozen archive, never touched.UpdateTabTitle.hook.ts's "DO NOT REMOVE voice" guardrail memory atMEMORY/LEARNING/SYSTEM/2026-01/...voice-on-prompt-submit-architecture.md. Read it before touching that hook's voice path — there's a documented past incident.Suggested commit / PR shape
Option 1 — One big PR (mirrors #112): 5 commits, one per group. Expect ~1500+ lines deleted, ~70 files changed. Similar review experience to PR #138.
Option 2 — Five small PRs: file a sub-issue per group, land independently. Lower blast radius per PR; more process overhead.
Recommendation: Option 1 if the maintainer has bandwidth, since each group is low-risk and the whole set is mechanical. The only group that needs careful thought is Group B (voice-on-prompt-submit memory + installer state).
Verification gates
For any PR addressing this issue:
rg 'localhost:8888|Notify\\.ts|VoiceCompletion|VoiceNotification'returns zero hits in release treebun build --target=bun --no-bundleon every touched.tsfilebun -e 'JSON.parse(readFileSync(...))'on any touched JSONvoiceEnabledornotifications.voice(verify by reading the generated settings.json)skills/Agentsworkflow does not include a voice curl block in the outputUpdateTabTitle.hook.tshas been read and the deletion reason documented if voice is removed from that hook🗣️ Vikilines still present in NATIVE/ALGORITHM/MINIMAL output format specificationsRelated
Release note (draft)
Removed (part 2): The final traces of the voice notification system have been cleaned up. The
VoiceServer/directory, all skill-levelcurl localhost:8888/notifyannouncements, skill-creation templates that taught the voice curl pattern, and the orphan voice extraction utilities are now gone. Combined with #112, PAI has no remaining dependency on the localhost:8888 voice server.