⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
Update voice system and tools documentation
Daniel Miessler8240e44c5f97
diff --git a/PAI_DIRECTORY/context/documentation/voicesystem/CLAUDE.md b/PAI_DIRECTORY/context/documentation/voicesystem/CLAUDE.mdindex c79d0d13..cfcbd69e 100644--- a/PAI_DIRECTORY/context/documentation/voicesystem/CLAUDE.md+++ b/PAI_DIRECTORY/context/documentation/voicesystem/CLAUDE.md@@ -1,15 +1,22 @@#### Agent Voice Architecture-Each agent has a unique voice ID for the notification system, creating distinct personalities:+Each agent has a unique macOS Premium or Enhanced voice for the notification system, creating distinct personalities through natural-sounding neural TTS voices.-**Voice ID Mappings:**-- **Main Agent**: Configure your own voice ID - The primary orchestrator voice-- **Researcher Agent**: Configure your own voice ID - Information discovery voice-- **Designer Agent**: Configure your own voice ID - Designer voice-- **Engineer Agent**: Configure your own voice ID - Development voice-- **Writer Agent**: Configure your own voice ID - Content creation voice-- **Pentester Agent**: Configure your own voice ID - Security testing voice-- **Architect Agent**: Configure your own voice ID - Architecture and planning voice+**Voice Mappings (macOS Native):**+- **Kai (Main Agent)**: Jamie (Premium) - UK Male - Professional, conversational+- **Researcher Agent**: Ava (Premium) - US Female - Analytical, highest quality+- **Designer Agent**: Isha (Premium) - Indian Female - Creative, distinct+- **Engineer Agent**: Tom (Enhanced) - US Male - Steady, professional+- **Writer Agent**: Samantha (Enhanced) - US Female - Articulate, warm+- **Pentester Agent**: Oliver (Enhanced) - UK Male - Technical, sharp+- **Architect Agent**: Serena (Premium) - UK Female - Strategic, sophisticated++**Voice Configuration:**+- All voices configured in `${PAI_DIR}/voice-server/voices.json`+- Uses macOS native Premium and Enhanced neural voices+- Zero API costs, complete privacy, 100% offline+- Customizable speech rates per agent (configured via rate_multiplier)+- Default speeds: Kai at 228 wpm (1.3x), agents at 236 wpm (1.35x)**Voice Completion Format:**@@ -29,40 +36,42 @@ All agents speak in first person: "Completed [task in 5-6 words]"- "What time?" → CUSTOM COMPLETED: "Three fifteen PM"- Fallback: Standard COMPLETED line used if CUSTOM is missing/too long-**🚨 VOICE ID UPDATE CHECKLIST - CRITICAL REFERENCE**+**🚨 VOICE UPDATE CHECKLIST - CRITICAL REFERENCE**-When updating any agent voice ID, you MUST update ALL of these locations:+When updating any agent voice, you MUST update ALL of these locations:-1. **Agent Configuration File**: `agents/[agent-name].md`- - Update `voiceId: [new-voice-id]` in frontmatter- - Update voice ID reference in completion rules section+1. **Voice Configuration File**: `${PAI_DIR}/voice-server/voices.json`+ - Update `voice_name`: macOS voice (e.g., "Jamie (Premium)", "Ava (Premium)")+ - Adjust `rate_multiplier`: Speed multiplier (1.0 = normal, 1.3 = 30% faster)+ - Update `description`: Voice characteristics and personality match+ - Set `type`: "Premium" or "Enhanced"-2. **Subagent Stop Hook**: `${PAI_DIR}/hooks/subagent-stop-hook.ts`- - Update `AGENT_VOICE_IDS` mapping with new voice ID- - Ensure agent name exists in `AGENT_NAMES` mapping- - Verify agent type included in regex patterns for completion parsing+2. **Agent Configuration File**: `${PAI_DIR}/agents/[agent-name].md`+ - Update `voiceId:` in frontmatter to match macOS voice name+ - Example: `voiceId: Ava (Premium)` or `voiceId: Tom (Enhanced)`-3. **Main Context Documentation**: `${PAI_DIR}/context/CLAUDE.md`- - Update voice ID in "Agent Voice Architecture" section- - Keep this checklist current with any new locations+3. **Stop Hook**: `${PAI_DIR}/hooks/stop-hook.ts`+ - Update `VOICES` mapping to reference correct voice names from voices.json+ - Ensure agent name exists in voice mappings+ - Hook loads configuration from voices.json automatically-4. **Voice Server Configuration**: (Location varies)- - Voice notification server may cache voice mappings- - Check notification server configuration files- - Restart voice server if needed to reload configurations+4. **Documentation**: `${PAI_DIR}/context/documentation/voice-system.md`+ - Update voice mappings table+ - Keep this documentation current with voice changes-5. **Test Scripts**: `${PAI_DIR}/hooks/tests/` (if they exist)- - Update any test cases that reference specific voice IDs- - Verify test suite passes with new voice configuration+**BEFORE CHANGING VOICES:**+1. Download the new voice from System Settings → Voice (Live Speech) → Manage Voices+2. Verify it's a Premium or Enhanced voice (not legacy/compact)+3. Test voice directly: `say -v "Voice Name (Premium)" "Test message"`**VERIFICATION STEPS:**1. Test agent with simple task to verify voice system works-2. Check voice server logs for any errors with new voice ID-3. Confirm voice sounds correct and matches intended agent personality-4. Update this documentation if new locations are discovered+2. Confirm voice sounds correct and matches intended agent personality+3. Verify speech rate is appropriate (not too fast/slow)+4. Check no errors in voice server output**COMMON MISTAKES TO AVOID:**-- Forgetting to update agent regex patterns in hook parsing-- Missing voice ID updates in agent configuration frontmatter-- Not restarting voice server after configuration changes-- Updating hook but not agent config (or vice versa)\ No newline at end of file+- Using legacy voices instead of Premium/Enhanced (sounds robotic!)+- Forgetting to download the voice from System Settings first+- Not matching voice name exactly in voices.json (case-sensitive!)+- Setting rate_multiplier too high (>1.5x can be hard to understand)\ No newline at end of filediff --git a/PAI_DIRECTORY/context/tools/CLAUDE.md b/PAI_DIRECTORY/context/tools/CLAUDE.mdindex efeb61e7..80ac160f 100644--- a/PAI_DIRECTORY/context/tools/CLAUDE.md+++ b/PAI_DIRECTORY/context/tools/CLAUDE.md@@ -15,428 +15,42 @@ When someone asks you to do ANYTHING, your FIRST thought should be:## Web searches-Don't use fetch to research things, use `${PAI_DIR}/commands/web-research.md` instead.--#### 🎭 Playwright MCP Server - Browser Automation & Testing--THESE ARE YOUR EYES, Kai!-**Purpose**: This is how you help me build and fix web-based applications, webpages, etc. Use for all browser automation, visual testing, web debugging, and screenshot capture using Playwright--**🚨🚨🚨 MANDATORY - ALWAYS USE THE MCP BRIDGE - NO EXCEPTIONS 🚨🚨🚨**--**THE BRIDGE IS THE ONLY WAY TO USE PLAYWRIGHT. PERIOD.**--- **EVERYONE MUST use `--browser chrome --extension`** - This is NON-NEGOTIABLE-- **This applies to:**- - Kai (you) - ALWAYS use the bridge- - Designer agent - ALWAYS use the bridge- - Engineer agent - ALWAYS use the bridge- - Pentester agent - ALWAYS use the bridge- - ALL agents - ALWAYS use the bridge- - ANY Playwright usage - ALWAYS use the bridge--**🔧 TROUBLESHOOTING SESSIONS - START WITH NEW WINDOW:**-- **ALWAYS open a NEW browser window** for troubleshooting/debugging-- **DO NOT interrupt Daniel's current browser workflow**-- **The bridge will create a new window automatically**-- **This preserves Daniel's active tabs and work**-- **Start fresh for each troubleshooting session**--**WHY THE BRIDGE IS MANDATORY:**-- **Uses Daniel's real browser** - Has all cookies, sessions, and authentication-- **NO PROMPTS** - Works silently without permission dialogs-- **REAL CONTEXT** - Accesses actual logged-in state-- **NO ISOLATION** - Uses the real browser environment-- **NEW WINDOWS** - Doesn't disrupt current work--**NEVER DO THIS:**-- ❌ DO NOT use headless mode-- ❌ DO NOT use isolated mode-- ❌ DO NOT skip the --extension flag-- ❌ DO NOT use any other browser profile-- ❌ DO NOT try to use Playwright without the bridge--**CORRECT USAGE (THE ONLY WAY):**-```-mcp__playwright__ tools with --browser chrome --extension-```--**BEST PRACTICES FOR BROWSER SESSIONS:**-1. **Start troubleshooting** → Open NEW window with bridge-2. **Debug website issues** → Open NEW window with bridge-3. **Visual testing** → Open NEW window with bridge-4. **Don't interrupt Daniel's work** → ALWAYS use new windows-5. **Each session is fresh** → Bridge creates clean new window--**If an agent doesn't use the bridge, they are doing it WRONG. There are NO exceptions to this rule.**--Command options:----allowed-origins <origins> semicolon-separated list of origins to allow- the browser to request. Default is to allow- all.- --blocked-origins <origins> semicolon-separated list of origins to block- the browser from requesting. Blocklist is- evaluated before allowlist. If used without- the allowlist, requests not matching the- blocklist are still allowed.- --block-service-workers block service workers- --browser <browser> browser or chrome channel to use, possible- values: chrome, firefox, webkit, msedge.- --caps <caps> comma-separated list of additional- capabilities to enable, possible values:- vision, pdf.- --cdp-endpoint <endpoint> CDP endpoint to connect to.- --cdp-header <headers...> CDP headers to send with the connect request,- multiple can be specified.- --config <path> path to the configuration file.- --device <device> device to emulate, for example: "iPhone 15"- --executable-path <path> path to the browser executable.- --extension Connect to a running browser instance- (Edge/Chrome only). Requires the "Playwright- MCP Bridge" browser extension to be installed.- --headless run browser in headless mode, headed by- default- --host <host> host to bind server to. Default is localhost.- Use 0.0.0.0 to bind to all interfaces.- --ignore-https-errors ignore https errors- --isolated keep the browser profile in memory, do not- save it to disk.- --image-responses <mode> whether to send image responses to the client.- Can be "allow" or "omit", Defaults to "allow".- --no-sandbox disable the sandbox for all process types that- are normally sandboxed.- --output-dir <path> path to the directory for output files.- --port <port> port to listen on for SSE transport.- --proxy-bypass <bypass> comma-separated domains to bypass proxy, for- example ".com,chromium.org,.domain.com"- --proxy-server <proxy> specify proxy server, for example- "http://myproxy:3128" or- "socks5://myproxy:8080"- --save-session Whether to save the Playwright MCP session- into the output directory.- --save-trace Whether to save the Playwright Trace of the- session into the output directory.- --secrets <path> path to a file containing secrets in the- dotenv format- --storage-state <path> path to the storage state file for isolated- sessions.- --timeout-action <timeout> specify action timeout in milliseconds,- defaults to 5000ms- --timeout-navigation <timeout> specify navigation timeout in milliseconds,- defaults to 60000ms- --user-agent <ua string> specify user agent string- --user-data-dir <path> path to the user data directory. If not- specified, a temporary directory will be- created.- --viewport-size <size> specify browser viewport size in pixels, for- example "1280, 720"--### Tools-Core automation-browser_click-Title: Click-Description: Perform click on a web page-Parameters:-element (string): Human-readable element description used to obtain permission to interact with the element-ref (string): Exact target element reference from the page snapshot-doubleClick (boolean, optional): Whether to perform a double click instead of a single click-button (string, optional): Button to click, defaults to left-modifiers (array, optional): Modifier keys to press-Read-only: false-browser_close-Title: Close browser-Description: Close the page-Parameters: None-Read-only: true-browser_console_messages-Title: Get console messages-Description: Returns all console messages-Parameters: None-Read-only: true-browser_drag-Title: Drag mouse-Description: Perform drag and drop between two elements-Parameters:-startElement (string): Human-readable source element description used to obtain the permission to interact with the element-startRef (string): Exact source element reference from the page snapshot-endElement (string): Human-readable target element description used to obtain the permission to interact with the element-endRef (string): Exact target element reference from the page snapshot-Read-only: false-browser_evaluate-Title: Evaluate JavaScript-Description: Evaluate JavaScript expression on page or element-Parameters:-function (string): () => { /* code / } or (element) => { / code */ } when element is provided-element (string, optional): Human-readable element description used to obtain permission to interact with the element-ref (string, optional): Exact target element reference from the page snapshot-Read-only: false-browser_file_upload-Title: Upload files-Description: Upload one or multiple files-Parameters:-paths (array): The absolute paths to the files to upload. Can be a single file or multiple files.-Read-only: false-browser_fill_form-Title: Fill form-Description: Fill multiple form fields-Parameters:-fields (array): Fields to fill in-Read-only: false-browser_handle_dialog-Title: Handle a dialog-Description: Handle a dialog-Parameters:-accept (boolean): Whether to accept the dialog.-promptText (string, optional): The text of the prompt in case of a prompt dialog.-Read-only: false-browser_hover-Title: Hover mouse-Description: Hover over element on page-Parameters:-element (string): Human-readable element description used to obtain permission to interact with the element-ref (string): Exact target element reference from the page snapshot-Read-only: true-browser_navigate-Title: Navigate to a URL-Description: Navigate to a URL-Parameters:-url (string): The URL to navigate to-Read-only: false-browser_navigate_back-Title: Go back-Description: Go back to the previous page-Parameters: None-Read-only: true-browser_network_requests-Title: List network requests-Description: Returns all network requests since loading the page-Parameters: None-Read-only: true-browser_press_key-Title: Press a key-Description: Press a key on the keyboard-Parameters:-key (string): Name of the key to press or a character to generate, such as ArrowLeft or a-Read-only: false-browser_resize-Title: Resize browser window-Description: Resize the browser window-Parameters:-width (number): Width of the browser window-height (number): Height of the browser window-Read-only: true-browser_select_option-Title: Select option-Description: Select an option in a dropdown-Parameters:-element (string): Human-readable element description used to obtain permission to interact with the element-ref (string): Exact target element reference from the page snapshot-values (array): Array of values to select in the dropdown. This can be a single value or multiple values.-Read-only: false-browser_snapshot-Title: Page snapshot-Description: Capture accessibility snapshot of the current page, this is better than screenshot-Parameters: None-Read-only: true-browser_take_screenshot-Title: Take a screenshot-Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.-Parameters:-type (string, optional): Image format for the screenshot. Default is png.-filename (string, optional): File name to save the screenshot to. Defaults to page-{timestamp}.{png|jpeg} if not specified.-element (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.-ref (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.-fullPage (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.-Read-only: true-browser_type-Title: Type text-Description: Type text into editable element-Parameters:-element (string): Human-readable element description used to obtain permission to interact with the element-ref (string): Exact target element reference from the page snapshot-text (string): Text to type into the element-submit (boolean, optional): Whether to submit entered text (press Enter after)-slowly (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.-Read-only: false-browser_wait_for-Title: Wait for-Description: Wait for text to appear or disappear or a specified time to pass-Parameters:-time (number, optional): The time to wait in seconds-text (string, optional): The text to wait for-textGone (string, optional): The text to wait for to disappear-Read-only: true--Playwright MCP Server Tool Examples-- 1. browser_close-- Close the page when done with browser automation or testing to free resources and end session- gracefully.- mcp__playwright__browser_close()-- 2. browser_resize-- Resize the browser window to test responsive design layouts or simulate different device viewport sizes- for testing.- mcp__playwright__browser_resize({width: 1920, height: 1080})-- 3. browser_console_messages-- Returns all console messages from the page to debug JavaScript errors, warnings, or track logged output- during automation.- mcp__playwright__browser_console_messages()-- 4. browser_handle_dialog-- Handle JavaScript dialogs like alerts, confirms, and prompts by accepting or dismissing them with- optional text input.- mcp__playwright__browser_handle_dialog({accept: true, promptText: "user input"})-- 5. browser_evaluate-- Execute JavaScript code on the page or element to extract data, modify DOM, or trigger custom page- behaviors.- mcp__playwright__browser_evaluate({function: "() => document.title"})-- 6. browser_file_upload-- Upload one or multiple files to file input elements for testing file upload functionality in web- applications.- mcp__playwright__browser_file_upload({paths: ["/path/to/file.pdf"]})-- 7. browser_fill_form-- Fill multiple form fields at once including textboxes, checkboxes, radios, combos, and sliders for- efficient form testing.- mcp__playwright__browser_fill_form({fields: [{name: "email", type: "textbox", ref: "#email", value:- "[email protected]"}]})-- 8. browser_install-- Install the browser specified in config when you get an error about the browser not being installed yet.- mcp__playwright__browser_install()-- 9. browser_press_key-- Press keyboard keys to trigger shortcuts, navigate forms, or test keyboard accessibility features in web- applications.- mcp__playwright__browser_press_key({key: "Enter"})-- 10. browser_type-- Type text into editable elements with options for slow typing and auto-submit to simulate real user- input.- mcp__playwright__browser_type({element: "search box", ref: "#search", text: "test query", submit: true})-- 11. browser_navigate-- Navigate to a URL to load web pages for testing, scraping, or automation of web application workflows.- mcp__playwright__browser_navigate({url: "https://example.com"})-- 12. browser_navigate_back-- Go back to the previous page in browser history for testing navigation flows or multi-step user- journeys.- mcp__playwright__browser_navigate_back()-- 13. browser_navigate_forward-- Go forward in browser history (missing from list but typically available in Playwright implementations).- mcp__playwright__browser_navigate_forward()-- 14. browser_network_requests-- Returns all network requests since page load to analyze API calls, resource loading, and network- performance issues.- mcp__playwright__browser_network_requests()-- 15. browser_take_screenshot-- Take a screenshot of current page or specific element for visual testing, documentation, or debugging UI- issues.- mcp__playwright__browser_take_screenshot({fullPage: true, filename: "screenshot.png"})-- 16. browser_snapshot-- Capture accessibility snapshot of current page for better element identification and interaction than- screenshots provide typically.- mcp__playwright__browser_snapshot()-- 17. browser_click-- Click on web page elements to trigger actions, navigate, submit forms, or interact with UI components- programmatically.- mcp__playwright__browser_click({element: "submit button", ref: "#submit-btn"})-- 18. browser_drag-- Perform drag and drop between two elements for testing drag interfaces, reordering lists, or file upload- areas.- mcp__playwright__browser_drag({startElement: "item", startRef: "#item1", endElement: "target", endRef:- "#dropzone"})-- 19. browser_hover-- Hover over elements to trigger tooltips, dropdown menus, or CSS hover states for testing interactive UI- features.- mcp__playwright__browser_hover({element: "menu item", ref: "#nav-menu"})-- 20. browser_select_option-- Select options in dropdown menus supporting single or multiple selections for testing form controls and- filters.- mcp__playwright__browser_select_option({element: "country dropdown", ref: "#country", values: ["USA",- "Canada"]})-- 21. browser_tabs (browser_tab_list, browser_tab_new, browser_tab_select, browser_tab_close)-- Manage browser tabs by listing, creating, selecting, or closing them for testing multi-tab workflows and- popup windows.- mcp__playwright__browser_tabs({action: "new"})- mcp__playwright__browser_tabs({action: "select", index: 1})-- 22. browser_wait_for-- Wait for text to appear/disappear or specific time to handle dynamic content loading and asynchronous- page updates.- mcp__playwright__browser_wait_for({text: "Loading complete"})- mcp__playwright__browser_wait_for({textGone: "Please wait...", time: 5})--## 🎤 CRITICAL: AGENT VOICE SYSTEM FIX--**🚨 MANDATORY FOR ALL AGENT INVOCATIONS 🚨**--When invoking ANY agent via Task tool, you MUST include their voice configuration AND Playwright bridge instructions in the prompt:--```typescript-Task({- description: "Brief task",- prompt: `- [VOICE CONFIG - MANDATORY]- Follow your agents/${agentType}.md configuration:- - Use [AGENT:${agentType}] tag in COMPLETED section- - Your voice ID: ${voiceId}- - Follow your specified output format-- [PLAYWRIGHT BRIDGE - MANDATORY]- If using Playwright, you MUST use --browser chrome --extension- The MCP Bridge is MANDATORY - no exceptions-- [TASK]- ${actualTask}- `,- subagent_type: agentType-})-```--**Agent Voice IDs:**-- researcher: AXdz6evoL7OPd7eU12-- pentester: hmMWXCj97N5CPcRkfC-- engineer: kmSVBPu7oj4yNinwWM-- designer: ZF6FPbjXT488VcRRnw-- architect: muZKMsIGYtIkjiUS82+Don't use fetch to research things, use `${PAI_DIR}/commands/web-research.md` instead.++## 🚨🚨🚨 CHROME DEVTOOLS MCP - FOR ALL WEB BROWSING & TESTING 🚨🚨🚨++**THESE ARE YOUR EYES, Kai!**++**USE THIS FOR EVERYTHING WEB-BASED:**+- Opening web pages+- Testing web apps+- Troubleshooting web pages+- Browser automation+- Taking screenshots+- Clicking buttons and links+- Filling out forms+- Scrolling pages+- Visual debugging+- Checking console errors++**THE CHROME DEVTOOLS MCP TOOLS ARE NAMED:**+- `mcp__chrome-devtools__navigate_page` - Open a URL+- `mcp__chrome-devtools__take_screenshot` - Capture screenshot+- `mcp__chrome-devtools__click` - Click elements+- `mcp__chrome-devtools__fill` - Fill form fields+- `mcp__chrome-devtools__list_console_messages` - Check errors+- `mcp__chrome-devtools__evaluate_script` - Run JavaScript+- And more...++**CRITICAL RULES:**+- ✅ ALWAYS use Chrome DevTools MCP for web browsing+- ✅ NEVER use curl, fetch, or wget for web debugging+- ✅ Take screenshots to SEE what's happening+- ✅ The tools are prefixed with `mcp__chrome-devtools__`++NEVER USE curl or Playwright for this. Only Chrome DevTools MCP.++**Official Documentation:** https://github.com/ChromeDevTools/chrome-devtools-mcp## 📁 AVAILABLE COMMANDS (${PAI_DIR}/commands/)