Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Architecture: VoiceServer location in ~/.claude/ conflates config with runtime

Open virtualian opened this issue 10 months ago • 1 comments

Summary

VoiceServer is installed to ~/.claude/VoiceServer/, placing a runtime server inside Claude Code's configuration directory. This conflates configuration with application runtime.

Related Issues

  • #346 - ENV path inconsistent (broader path/location issues)
  • #393 - Config path mismatch (symptom of unclear directory conventions)

Current State

~/.claude/                      # Claude Code config directory
├── settings.json               # Config ✓
├── skills/                     # Config ✓
├── hooks/                      # Scripts ✓
├── VoiceServer/                # Runtime server ✗
│   ├── server.ts
│   ├── manage.sh
│   └── voice-personalities.json
└── .env                        # Secrets ✓

Problem

~/.claude/ is Claude Code's configuration directory. It should contain:

  • Settings and preferences
  • Memory/context files
  • Skills and hooks (configuration/scripts)
  • Secrets (.env)

It should not contain:

  • Long-running server processes
  • Server logs and runtime state
  • Application data that grows over time

Issues with current approach:

  1. Conflates config with application runtime
  2. Makes backup/restore of config more complex (must exclude runtime data)
  3. Violates separation of concerns
  4. Doesn't follow XDG Base Directory Specification

Proposed Structure

Option A: Dedicated PAI directory

~/.claude/                    # Claude Code config only
├── settings.json
├── skills/
├── hooks/
└── .env

~/.pai/                       # PAI runtime services
├── VoiceServer/
├── logs/
└── cache/

Option B: XDG compliant

~/.config/claude/             # Claude Code config (or ~/.claude/)
~/.config/pai/                # PAI configuration
~/.local/share/pai/           # PAI runtime/data (VoiceServer, cache)
~/.local/state/pai/           # PAI logs, state

Option C: Platform-native (macOS)

~/Library/Application Support/PAI/

Impact

This is architectural debt, not a blocking bug. Current installation works but should be addressed to establish clean conventions before v1.0.

Recommendation

  1. Define clear directory conventions in PAI documentation
  2. Consider migration path for existing installations
  3. Update all packs to use consistent locations

virtualian avatar Jan 12 '26 21:01 virtualian

Thanks for the architecture feedback! The VoiceServer location was reconsidered during the v3.0 restructure (now released). It remains in ~/.claude/VoiceServer/ as a practical choice for co-location with the rest of PAI. Appreciate the thoughtful analysis!

kaimagnus avatar Feb 15 '26 17:02 kaimagnus