Remove VoiceServer + Notification system from PAI (#112, closes #83)#138
Merged
virtualian merged 6 commits intomainfrom Apr 15, 2026
Merged
Conversation
Delete VoiceCompletion.hook.ts and handlers/VoiceNotification.ts, drop the VoiceCompletion entry from the settings.json Stop hook block, and strip the now-stale "Task completion voice is separate" cross-reference comment from UpdateTabTitle.hook.ts. Part 2 of the #112 ripout bundle. Runtime mirror (~/.pai) was updated in the same pass but is not tracked by this repo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop the two voice-related aphorism strings from the settings.json aphorisms array that describe a system that no longer exists: "Voice announcements at Algorithm entry..." and "Only the primary agent makes voice curls...". The release template did not contain top-level voiceEnabled nor a notifications.voice block (#112's line references 265 / 385 were matching the runtime ~/.claude/settings.json, not the release). The runtime copy had both and has been cleaned in the same pass. daidentity.voices.*, voiceClone, mainDAVoiceID, and voiceId remain in settings.json: non-TTS consumers (hooks/lib/identity.ts -> RatingCapture, RelationshipMemory, KittyEnvPersist, TabState, TranscriptParser, migration/{validator,extractor}, Telos/UpdateTelos, pai.ts) still read them. Q1 gate verdict: leave the data. Part 3 of the #112 ripout bundle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip from Algorithm v3.7.0.md: - Entire "### Voice Announcements" section (9 lines) - The "Voice (FIRST action after loading this file)" line before the PRD stub instructions - The "Voice announce ..., then" prefix from all 7 phase FIRST ACTIONs (OBSERVE, THINK, PLAN, BUILD, EXECUTE, VERIFY, LEARN) - The "before voice announcement and PRD edit" wording in the console output gate Phase headers, PRD frontmatter edit instructions, and all other Algorithm content are preserved. The runtime mirror at ~/.pai/PAI/Algorithm/v3.7.0.md was updated in the same pass. Part 4 of the #112 ripout bundle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLAUDE.md.template: strip the NATIVE MODE 'Voice:' curl invocation line. The shipped CLAUDE.md was already cleaned by PR #111; only the fresh-install template still had the curl. Agent files (12 files): for each of the 11 "standard-shape" agents (ClaudeResearcher, PerplexityResearcher, GeminiResearcher, CodexResearcher, GrokResearcher, Engineer, Designer, Architect, Algorithm, Artist, QATester), strip: - the "Send voice notification that you're loading context" bullet from the MANDATORY STARTUP SEQUENCE list (renumbering the rest) - the entire "MANDATORY VOICE NOTIFICATION SYSTEM" section with its bash curl block + trailing separator - the "Send voice notifications" bullet from the closing Remember list (renumbering the rest) Pentester.md uses a different embedded structure — stripped the "CRITICAL: VOICE NOTIFICATION IS MANDATORY" section plus the "SEND VOICE NOTIFICATION FIRST" bullet from CRITICAL OUTPUT RULES. Runtime mirror (~/.pai/agents/*.md, 13 files including Intern) updated in the same pass. Intern follows the same embedded Pentester-style shape. Part 5 of the #112 ripout bundle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete PAI/THENOTIFICATIONSYSTEM.md entirely (305 lines). Strip
the cross-references that pointed at it and at the voice system
from the surrounding docs and data files:
- PAI/CONTEXT_ROUTING.md: drop the "Notification system" row
- PAI/DOCUMENTATIONINDEX.md: drop "execute voice notifications,"
from the skill execution prose
- PAI/README.md: drop the THENOTIFICATIONSYSTEM filename ref and
the ElevenLabs/localhost:8888 sentence from the Notifications
section; the ntfy/Discord/Twilio description stays
- PAI/TOOLS.md: drop the entire "Voice Server API" section
- PAI/THEHOOKSYSTEM.md: drop the VoiceCompletion entry from the
Stop hook JSON + handler list, the "Voice Notifications" common
pattern section + code example, the "Voice Notifications Not
Working" troubleshooting block, the STOP (4 hooks) -> (3 hooks)
listing update, the VOICE SERVER ASCII block, VoiceNotification
from the identity.ts consumers list, and the `voice.*` event
table row
- hooks/README.md: drop VoiceCompletion from the Stop diagram,
the VoiceCompletion.hook.ts table row, the second Stop diagram
(ResponseTabReset -> brand color becomes the sole tail), and
VoiceNotification from the output-validators consumers list
- PAI/doc-dependencies.json: drop the notification-system section
from SYSTEMARCHITECTURE dependents and the THENOTIFICATIONSYSTEM
top-level entry
- hooks/lib/change-detection.ts: drop THENOTIFICATIONSYSTEM.md
from HIGH_PRIORITY_PATHS
Runtime mirror (~/.pai) updated in the same pass, preserving the
intentional release<->runtime path divergences in THEHOOKSYSTEM.md.
Intentional divergences: release uses ~/.pai/skills/..., runtime
uses ~/.claude/skills/... - neither form was normalized.
Out-of-scope voice refs left intact (documented for PR body):
SKILLSYSTEM.md, PAI/SKILL.md 7-phase curls, Algorithm/v3.5.0.md
legacy, PAI/Tools/{pai,algorithm,IntegrityMaintenance}.ts,
PAI/Tools/TranscriptParser.ts (extractVoiceCompletion),
hooks/handlers/DocCrossRefIntegrity.ts, hooks/UpdateTabTitle.hook.ts,
hooks/lib/output-validators.ts (isValidVoiceCompletion,
getVoiceFallback), VoiceServer/server.ts (the server source lives
inside this repo, contrary to #112's 'outside this repo' note).
Part 6 of the #112 ripout bundle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip the four live 'bun Notify.ts' shell blocks from the Learning skill: - skills/Learning/SKILL.md: drop the entire "Voice Notification" section; rename the remaining "Workflow Announcement" to keep just the text-announcement guidance - skills/Learning/Workflows/Review.md: drop the bun Notify.ts code block at the top; the text announcement remains - skills/Learning/Workflows/Check.md: same - skills/Learning/Workflows/Apply.md: same These were the only live Notify.ts invocations in release skill markdown per a full grep (Q2 verdict: 4 Learning hits, no hits in Packs, Research, Security/Recon, PAIUpgrade despite #112's speculative list). Runtime mirror (~/.pai/skills/Learning) updated in the same pass, preserving the ~/.pai/ vs ~/.claude/ intentional path divergence. Part 7 of the #112 ripout bundle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #112. Closes #83.
Surgical ripout of the entire voice notification stack per #112's 8-part scope. Six logical commits, 31 files changed (75+/1125-). Supersedes the never-landed #83 hook-side gate fix — the subsystem is gone, so the bug can no longer occur.
Commits
58e2c9b329c6f74c1973ffdc0dc427238bbb64ad51Part 1 (Notify.ts CLI deletion) yielded no repo diff — the CLI lived only at
~/.pai/PAI/Tools/Notify.tsand never shipped in the release template.Releases/v4.0.3+/.claude/**/Notify.tsglob returns nothing. Runtime file was deleted in the same pass for behavioural parity.Open Questions (from #112's Q1/Q2/Q3 review)
Q1 — Non-TTS consumers of
daidentity.voices.*/voiceId/voiceCloneVerdict: LEAVE the data in settings.json. A
grepof `hooks/lib/identity.ts` and its callers found multiple non-voice consumers:Removing `daidentity.voices.*` / `mainDAVoiceID` / `voiceClone` would cascade into refactors of `identity.ts` plus every caller. Out of surgical scope.
Only removed from settings.json:
Q2 —
Notify.tslive invocations in skill markdownVerdict: 4 live hits in the Learning skill, all removed.
Null findings (grep of full Packs + skills tree): no hits in Research, Security/Recon, Security/WorldThreatModelHarness, Security/AnnualReports, or PAIUpgrade — despite #112's speculative list. Those references have already migrated to other patterns or never existed.
Q3 — LaunchAgent / systemd / shell unit for port 8888
Verdict: None ship with this repo. No launchd plist, no systemd unit, no shell startup snippet found. The closest thing is `PAI-Install/engine/actions.ts` which calls `/health`, `/shutdown`, and tests `/notify` during installation — those are installer-time probes, not startup units.
Users who ran the voice server: stop the localhost:8888 process manually. The ElevenLabs API key env var (`ELEVENLABS_API_KEY`) is no longer needed by PAI itself. No plists/units to clean up.
Scope discrepancies found
These were documented but not touched — they expand beyond #112's explicit 8-part scope and would widen this PR into a refactor:
Recommend follow-up issue(s) for the above — together they'd fully detach PAI from the voice server.
Preserved intentionally
/.pai/`, runtime uses `/.claude/`)Release note
Removed: voice notification system. The localhost:8888 voice server is no longer used by PAI. If you ran the server process for PAI, stop it manually — the ElevenLabs API key env var is no longer needed by PAI itself. The `🗣️ Viki` line in NATIVE/ALGORITHM response formats is preserved as a text summary signal; it just no longer triggers TTS playback.
Test plan
🤖 Generated with Claude Code