⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
Fix: Update all directory references to use Title Case paths
Daniel Miessler90c99b9a2600
diff --git a/.claude/Hooks/capture-all-events.ts b/.claude/Hooks/capture-all-events.tsindex 11b9dba8..c2f20fee 100755--- a/.claude/Hooks/capture-all-events.ts+++ b/.claude/Hooks/capture-all-events.ts@@ -8,7 +8,7 @@import { readFileSync, appendFileSync, mkdirSync, existsSync, writeFileSync } from 'fs';import { join } from 'path';-import { PAI_DIR } from './lib/pai-paths';+import { PAI_DIR, HISTORY_DIR } from './lib/pai-paths';import { enrichEventWithAgentMetadata, isAgentSpawningCall } from './lib/metadata-extraction';interface HookEvent {@@ -43,7 +43,7 @@ function getEventsFilePath(): string {const month = String(pstDate.getMonth() + 1).padStart(2, '0');const day = String(pstDate.getDate()).padStart(2, '0');- const monthDir = join(PAI_DIR, 'history', 'raw-outputs', `${year}-${month}`);+ const monthDir = join(HISTORY_DIR, 'raw-outputs', `${year}-${month}`);// Ensure directory existsif (!existsSync(monthDir)) {diff --git a/.claude/Hooks/capture-session-summary.ts b/.claude/Hooks/capture-session-summary.tsindex 390a674a..02f1163c 100755--- a/.claude/Hooks/capture-session-summary.ts+++ b/.claude/Hooks/capture-session-summary.ts@@ -168,7 +168,7 @@ ${info.commandsExecuted.length > 0 ? '```bash\n' + info.commandsExecuted.join('\This session summary was automatically generated by the UOCS SessionEnd hook.-For detailed tool outputs, see: \`\${PAI_DIR}/history/raw-outputs/${timestamp.substring(0, 7)}/\`+For detailed tool outputs, see: \`\${PAI_DIR}/History/raw-outputs/${timestamp.substring(0, 7)}/\`---diff --git a/.claude/Hooks/capture-tool-output.ts b/.claude/Hooks/capture-tool-output.tsindex 88bff483..ed784f47 100755--- a/.claude/Hooks/capture-tool-output.ts+++ b/.claude/Hooks/capture-tool-output.ts@@ -9,7 +9,7 @@import { appendFileSync, mkdirSync, existsSync } from 'fs';import { join } from 'path';-import { PAI_DIR } from './lib/pai-paths';+import { PAI_DIR, HISTORY_DIR } from './lib/pai-paths';interface ToolUseData {tool_name: string;@@ -20,7 +20,7 @@ interface ToolUseData {}// Configuration-const CAPTURE_DIR = join(PAI_DIR, 'history', 'raw-outputs');+const CAPTURE_DIR = join(HISTORY_DIR, 'raw-outputs');const INTERESTING_TOOLS = ['Bash', 'Edit', 'Write', 'Read', 'Task', 'NotebookEdit'];async function main() {diff --git a/.claude/Scratchpad/test-choice.sh b/.claude/Scratchpad/test-choice.shnew file mode 100644index 00000000..3582ce6d--- /dev/null+++ b/.claude/Scratchpad/test-choice.sh@@ -0,0 +1,73 @@+#!/bin/bash++# Test the case statement logic with different inputs++test_choice() {+ local choice="$1"+ local PAI_DIR+ local DEFAULT_DIR="$HOME/PAI"++ case $choice in+ 1)+ PAI_DIR="$HOME/PAI"+ ;;+ 2)+ PAI_DIR="$HOME/Projects/PAI"+ ;;+ 3)+ PAI_DIR="$HOME/Documents/PAI"+ ;;+ 4)+ PAI_DIR="custom"+ ;;+ *)+ PAI_DIR="$DEFAULT_DIR"+ ;;+ esac++ echo "Input: [$choice] -> Result: $PAI_DIR"+}++echo "Testing without whitespace trim:"+test_choice "1"+test_choice "2"+test_choice "2 "+test_choice " 2"+test_choice " 2 "++echo ""+echo "Testing WITH whitespace trim:"+test_choice_trimmed() {+ local choice="$1"+ # Trim whitespace+ choice=$(echo "$choice" | xargs)++ local PAI_DIR+ local DEFAULT_DIR="$HOME/PAI"++ case $choice in+ 1)+ PAI_DIR="$HOME/PAI"+ ;;+ 2)+ PAI_DIR="$HOME/Projects/PAI"+ ;;+ 3)+ PAI_DIR="$HOME/Documents/PAI"+ ;;+ 4)+ PAI_DIR="custom"+ ;;+ *)+ PAI_DIR="$DEFAULT_DIR"+ ;;+ esac++ echo "Input: [$choice] -> Result: $PAI_DIR"+}++test_choice_trimmed "1"+test_choice_trimmed "2"+test_choice_trimmed "2 "+test_choice_trimmed " 2"+test_choice_trimmed " 2 "diff --git a/.claude/Scratchpad/test-mcp.sh b/.claude/Scratchpad/test-mcp.shnew file mode 100644index 00000000..93092cf7--- /dev/null+++ b/.claude/Scratchpad/test-mcp.sh@@ -0,0 +1,17 @@+#!/bin/bash++claude_dir="/Users/daniel/Projects/PAI/.claude"++mcp_json_data=$(jq -r '.mcpServers | keys | join(" "), length' "$claude_dir/.mcp.json" 2>/dev/null)+echo "Full data: [$mcp_json_data]"++mcp_json_names=$(echo "$mcp_json_data" | head -1)+echo "Names: [$mcp_json_names]"++mcp_json_count=$(echo "$mcp_json_data" | tail -1)+echo "Count: [$mcp_json_count]"++echo "Test loop:"+for mcp in $mcp_json_names; do+ echo " - $mcp"+donediff --git a/.claude/Scratchpad/test-statusline-mcp.sh b/.claude/Scratchpad/test-statusline-mcp.shnew file mode 100644index 00000000..cc221b99--- /dev/null+++ b/.claude/Scratchpad/test-statusline-mcp.sh@@ -0,0 +1,52 @@+#!/bin/bash++claude_dir="/Users/daniel/Projects/PAI/.claude"++# Count MCPs from both settings.json and .mcp.json+mcp_names_raw=""+mcps_count=0++echo "=== Testing MCP Counting Logic ==="++# Check settings.json for .mcpServers (legacy)+if [ -f "$claude_dir/settings.json" ]; then+ mcp_data=$(jq -r '.mcpServers | keys | join(" "), length' "$claude_dir/settings.json" 2>/dev/null)+ echo "settings.json mcp_data: [$mcp_data]"+ if [ -n "$mcp_data" ] && [ "$mcp_data" != "null" ]; then+ mcp_names_raw=$(echo "$mcp_data" | head -1)+ mcps_count=$(echo "$mcp_data" | tail -1)+ echo " Extracted names: [$mcp_names_raw]"+ echo " Extracted count: [$mcps_count]"+ else+ echo " No MCPs in settings.json (data was empty or null)"+ fi+fi++# Check .mcp.json (current Claude Code default)+if [ -f "$claude_dir/.mcp.json" ]; then+ mcp_json_data=$(jq -r '.mcpServers | keys | join(" "), length' "$claude_dir/.mcp.json" 2>/dev/null)+ echo ".mcp.json mcp_json_data: [$mcp_json_data]"+ if [ -n "$mcp_json_data" ] && [ "$mcp_json_data" != "null" ]; then+ mcp_json_names=$(echo "$mcp_json_data" | head -1)+ mcp_json_count=$(echo "$mcp_json_data" | tail -1)+ echo " Extracted names: [$mcp_json_names]"+ echo " Extracted count: [$mcp_json_count]"++ # Combine with settings.json results+ if [ -n "$mcp_names_raw" ]; then+ mcp_names_raw="$mcp_names_raw $mcp_json_names"+ else+ mcp_names_raw="$mcp_json_names"+ fi+ mcps_count=$((mcps_count + mcp_json_count))+ echo " Combined names: [$mcp_names_raw]"+ echo " Combined count: [$mcps_count]"+ else+ echo " No MCPs in .mcp.json (data was empty or null)"+ fi+fi++echo ""+echo "=== Final Results ==="+echo "mcp_names_raw: [$mcp_names_raw]"+echo "mcps_count: [$mcps_count]"diff --git a/.claude/Skills/AlexHormoziPitch/SKILL.md b/.claude/Skills/AlexHormoziPitch/SKILL.mdindex 93621664..f7806461 100644--- a/.claude/Skills/AlexHormoziPitch/SKILL.md+++ b/.claude/Skills/AlexHormoziPitch/SKILL.md@@ -62,4 +62,4 @@ Value = (Dream Outcome × Perceived Likelihood) / (Time Delay × Effort & Sacrif## Full Workflow Reference-For complete step-by-step instructions: `read ${PAI_DIR}/commands/create-hormozi-pitch.md`+For complete step-by-step instructions: `read ${PAI_DIR}/Commands/create-hormozi-pitch.md`diff --git a/.claude/Skills/Art/SKILL.md b/.claude/Skills/Art/SKILL.mdindex 2d54a315..f9bbf460 100644--- a/.claude/Skills/Art/SKILL.md+++ b/.claude/Skills/Art/SKILL.md@@ -42,7 +42,7 @@ Complete visual content system using the **PAI Visual Aesthetic**.- Neon orange (warmth) + cyan (tech) accents- Subtle glows on key elements-**Full aesthetic documentation:** `${PAI_DIR}/skills/CORE/aesthetic.md`+**Full aesthetic documentation:** `${PAI_DIR}/Skills/CORE/aesthetic.md`**This is the SINGLE SOURCE OF TRUTH for all visual styling.**@@ -74,7 +74,7 @@ Complete visual content system using the **PAI Visual Aesthetic**.**Default model:** nano-banana-pro (Gemini 3 Pro)```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[PROMPT]" \--size 2K \@@ -120,4 +120,4 @@ What does user need?----**For complete visual styling rules, ALWAYS read:** `${PAI_DIR}/skills/CORE/aesthetic.md`+**For complete visual styling rules, ALWAYS read:** `${PAI_DIR}/Skills/CORE/aesthetic.md`diff --git a/.claude/Skills/Art/workflows/AnnotatedScreenshots.md b/.claude/Skills/Art/workflows/AnnotatedScreenshots.mdindex f51cf9d1..bbba63cf 100644--- a/.claude/Skills/Art/workflows/AnnotatedScreenshots.md+++ b/.claude/Skills/Art/workflows/AnnotatedScreenshots.md@@ -248,7 +248,7 @@ If generating combined image is difficult:**Option A: Generate combined (if model supports):**```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--reference-image /path/to/screenshot.png \--prompt "[ANNOTATION PROMPT]" \diff --git a/.claude/Skills/Art/workflows/Aphorisms.md b/.claude/Skills/Art/workflows/Aphorisms.mdindex a2d68618..e623f266 100644--- a/.claude/Skills/Art/workflows/Aphorisms.md+++ b/.claude/Skills/Art/workflows/Aphorisms.md@@ -226,7 +226,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Comics.md b/.claude/Skills/Art/workflows/Comics.mdindex 08adecf9..e92d19c4 100644--- a/.claude/Skills/Art/workflows/Comics.md+++ b/.claude/Skills/Art/workflows/Comics.md@@ -292,7 +292,7 @@ Sign "{{{assistantName}}}" small in bottom right corner of final panel in charco### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Comparisons.md b/.claude/Skills/Art/workflows/Comparisons.mdindex 425d7e98..df07b382 100644--- a/.claude/Skills/Art/workflows/Comparisons.md+++ b/.claude/Skills/Art/workflows/Comparisons.md@@ -261,7 +261,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Frameworks.md b/.claude/Skills/Art/workflows/Frameworks.mdindex 8db7000b..f0c68700 100644--- a/.claude/Skills/Art/workflows/Frameworks.md+++ b/.claude/Skills/Art/workflows/Frameworks.md@@ -263,7 +263,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Maps.md b/.claude/Skills/Art/workflows/Maps.mdindex 93ad273c..0e7420c9 100644--- a/.claude/Skills/Art/workflows/Maps.md+++ b/.claude/Skills/Art/workflows/Maps.md@@ -304,7 +304,7 @@ Sign "{{{assistantName}}}" small in bottom corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Mermaid.md b/.claude/Skills/Art/workflows/Mermaid.mdindex d8d65f2b..9ac55d8c 100644--- a/.claude/Skills/Art/workflows/Mermaid.md+++ b/.claude/Skills/Art/workflows/Mermaid.md@@ -605,7 +605,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).**Execute with optimal model for text-heavy diagrams:**```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR COMPREHENSIVE PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/RecipeCards.md b/.claude/Skills/Art/workflows/RecipeCards.mdindex 4080fe1f..c10850b1 100644--- a/.claude/Skills/Art/workflows/RecipeCards.md+++ b/.claude/Skills/Art/workflows/RecipeCards.md@@ -277,7 +277,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Stats.md b/.claude/Skills/Art/workflows/Stats.mdindex 8d1c3fcd..9f72e6af 100644--- a/.claude/Skills/Art/workflows/Stats.md+++ b/.claude/Skills/Art/workflows/Stats.md@@ -255,7 +255,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Taxonomies.md b/.claude/Skills/Art/workflows/Taxonomies.mdindex b051c109..6cb0c63f 100644--- a/.claude/Skills/Art/workflows/Taxonomies.md+++ b/.claude/Skills/Art/workflows/Taxonomies.md@@ -243,7 +243,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/TechnicalDiagrams.md b/.claude/Skills/Art/workflows/TechnicalDiagrams.mdindex 8de8157b..bf90daaa 100644--- a/.claude/Skills/Art/workflows/TechnicalDiagrams.md+++ b/.claude/Skills/Art/workflows/TechnicalDiagrams.md@@ -365,7 +365,7 @@ CRITICAL REQUIREMENTS:### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Timelines.md b/.claude/Skills/Art/workflows/Timelines.mdindex 586cf3d2..f9875892 100644--- a/.claude/Skills/Art/workflows/Timelines.md+++ b/.claude/Skills/Art/workflows/Timelines.md@@ -250,7 +250,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).### Step 5: Execute Generation```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Visualize.md b/.claude/Skills/Art/workflows/Visualize.mdindex b1693d27..c54981ca 100644--- a/.claude/Skills/Art/workflows/Visualize.md+++ b/.claude/Skills/Art/workflows/Visualize.md@@ -402,7 +402,7 @@ Sign "{{{assistantName}}}" small in bottom right corner in charcoal (#2D2D2D).**Execute the visualization:**```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR COMPREHENSIVE PROMPT]" \--size 2K \diff --git a/.claude/Skills/Art/workflows/Workflow.md b/.claude/Skills/Art/workflows/Workflow.mdindex c971e9fd..269d3758 100644--- a/.claude/Skills/Art/workflows/Workflow.md+++ b/.claude/Skills/Art/workflows/Workflow.md@@ -113,7 +113,7 @@ The concept should be describable in ONE sentence with 2-3 PHYSICAL elements tha### Read the Aesthetic Source-**Always read:** `${PAI_DIR}/skills/CORE/aesthetic.md`+**Always read:** `${PAI_DIR}/Skills/CORE/aesthetic.md`### Core Visual Rules@@ -241,7 +241,7 @@ Before generating, verify:### Default Model: nano-banana-pro```bash-bun run ${PAI_DIR}/skills/art/tools/generate-ulart-image.ts \+bun run ${PAI_DIR}/Skills/art/tools/generate-ulart-image.ts \--model nano-banana-pro \--prompt "[YOUR PROMPT]" \--size 2K \diff --git a/.claude/Skills/BrightData/SKILL.md b/.claude/Skills/BrightData/SKILL.mdindex cec06282..5df5a1de 100644--- a/.claude/Skills/BrightData/SKILL.md+++ b/.claude/Skills/BrightData/SKILL.md@@ -14,7 +14,7 @@ description: |**When user requests scraping/fetching URL content:**Examples: "scrape this URL", "fetch this page", "get content from [URL]", "pull content from this site", "retrieve [URL]", "can't access this site", "this site is blocking me", "use Bright Data to fetch"-→ **READ:** ${PAI_DIR}/skills/brightdata/workflows/four-tier-scrape.md+→ **READ:** ${PAI_DIR}/Skills/brightdata/workflows/four-tier-scrape.md→ **EXECUTE:** Four-tier progressive scraping workflow (WebFetch → Curl → Browser Automation → Bright Data MCP)---@@ -149,7 +149,7 @@ Skill Response:---**Related Documentation:**-- `${PAI_DIR}/skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md` - Canonical structure guide-- `${PAI_DIR}/skills/CORE/CONSTITUTION.md` - Overall Kai philosophy+- `${PAI_DIR}/Skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md` - Canonical structure guide+- `${PAI_DIR}/Skills/CORE/CONSTITUTION.md` - Overall Kai philosophy**Last Updated:** 2025-11-23diff --git a/.claude/Skills/CORE/CONSTITUTION.md b/.claude/Skills/CORE/CONSTITUTION.mdindex 5bbdc91c..60388b3c 100644--- a/.claude/Skills/CORE/CONSTITUTION.md+++ b/.claude/Skills/CORE/CONSTITUTION.md@@ -457,7 +457,7 @@ Level 4: Workflow Invocation (Which specific procedure?)Execution```-**For complete routing guide, see:** `${PAI_DIR}/skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md`+**For complete routing guide, see:** `${PAI_DIR}/Skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md`---@@ -475,7 +475,7 @@ Execution**Example Structure:**```-${PAI_DIR}/skills/blogging/+${PAI_DIR}/Skills/blogging/├── SKILL.md # Core skill + routing├── workflows/│ ├── write.md # Write blog workflow@@ -532,7 +532,7 @@ User says: "write a blog", "create a post", "write an article"**Agent Configuration:**```-${PAI_DIR}/agents/engineer.md+${PAI_DIR}/Agents/engineer.mdFrontmatter:- voice_id: [ElevenLabs voice ID]@@ -687,7 +687,7 @@ evals run --use-case newsletter-summary \AI should orchestrate deterministic tools, not replace them with ad-hoc prompting.-**For complete CLI-First guide, see:** `${PAI_DIR}/skills/CORE/cli-first-architecture.md`+**For complete CLI-First guide, see:** `${PAI_DIR}/Skills/CORE/cli-first-architecture.md`### CLI-First for API Calls@@ -788,7 +788,7 @@ llcli search "consulting" | grep -i "quorum"**Before (Bash Script):**```bash# In skill prompt:-${PAI_DIR}/skills/skill-name/scripts/fetch-data.sh today "" 20+${PAI_DIR}/Skills/skill-name/scripts/fetch-data.sh today "" 20```**After (CLI Tool):**@@ -798,7 +798,7 @@ ${PAI_DIR}/bin/toolname/toolname.ts today --limit 20```**Key Differences:**-1. **Location:** `/bin/` not `/skills/.../scripts/`+1. **Location:** `/bin/` not `/Skills/.../scripts/`2. **Language:** TypeScript not Bash3. **Documentation:** --help not comments4. **Validation:** Type-checked not string parsing@@ -895,7 +895,7 @@ Traditional MCP-only architectures have fatal flaws for production use:**Tier 2: System MCPs - Execution Phase**-**Location:** `${PAI_DIR}/skills/system-mcp/`+**Location:** `${PAI_DIR}/Skills/system-mcp/`**When to Use:**- ✅ API will be called >10 times@@ -972,7 +972,7 @@ Kai uses mandatory structured output format that integrates with voice server fo🎯 COMPLETED: Blog post published and verified live on production```-2. **Stop hook fires** (`${PAI_DIR}/hooks/stop-hook.ts`)+2. **Stop hook fires** (`${PAI_DIR}/Hooks/stop-hook.ts`)- Reads transcript after response- Extracts COMPLETED line text- Determines entity (Kai vs specific agent)@@ -1025,13 +1025,13 @@ Kai uses mandatory structured output format that integrates with voice server fo**THE PERMANENT KNOWLEDGE BASE**-**Location:** `${PAI_DIR}/history/`+**Location:** `${PAI_DIR}/History/`**Purpose:** Capture ALL valuable work for future reference, learning, and analysis.**Directory Structure:**```-${PAI_DIR}/history/+${PAI_DIR}/History/├── raw-outputs/ # Raw event logs (JSONL)│ └── YYYY-MM/│ └── YYYY-MM-DD_all-events.jsonl@@ -1088,7 +1088,7 @@ ${PAI_DIR}/history/- Random one-off requests- Delete when done-**History** (`${PAI_DIR}/history/`):+**History** (`${PAI_DIR}/History/`):- PERMANENT valuable outputs- Research findings- Learnings and insights@@ -1101,7 +1101,7 @@ ${PAI_DIR}/history/**EVENT-DRIVEN AUTOMATION**-**Location:** `${PAI_DIR}/hooks/`+**Location:** `${PAI_DIR}/Hooks/`**Purpose:** Automatically capture events, trigger actions, and integrate systems without explicit calls.@@ -1128,7 +1128,7 @@ ${PAI_DIR}/history/- Can inject context- Can modify prompts-**Reference:** `${PAI_DIR}/skills/CORE/hook-system.md`+**Reference:** `${PAI_DIR}/Skills/CORE/hook-system.md`### 4. Agent System@@ -1174,8 +1174,8 @@ Kai → [10 Interns update files] → Spotcheck Intern (verifies all 10)```**Reference:**-- `${PAI_DIR}/skills/CORE/delegation-patterns.md`-- `${PAI_DIR}/skills/CORE/agent-protocols.md`+- `${PAI_DIR}/Skills/CORE/delegation-patterns.md`+- `${PAI_DIR}/Skills/CORE/agent-protocols.md`### 5. MCP Profile Management@@ -1208,7 +1208,7 @@ ${PAI_DIR}/MCPs/swap-mcp chrome-enabled# MUST restart Claude Code to apply!```-**Reference:** `${PAI_DIR}/skills/CORE/mcp-strategy.md`+**Reference:** `${PAI_DIR}/Skills/CORE/mcp-strategy.md`---@@ -1295,7 +1295,7 @@ description: |## 🎯 Load Full CORE Context-read ${PAI_DIR}/skills/CORE/SKILL.md+read ${PAI_DIR}/Skills/CORE/SKILL.md## When to Activate This Skill@@ -1317,7 +1317,7 @@ read ${PAI_DIR}/skills/CORE/SKILL.md4. Reference files for deep dives5. Assets/examples for templates-**Reference:** `${PAI_DIR}/skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md`+**Reference:** `${PAI_DIR}/Skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md`### Adding Workflows@@ -1383,7 +1383,7 @@ voice_id: [ElevenLabs voice ID][Use standard COMPLETED format]```-**Reference:** `${PAI_DIR}/skills/CORE/agent-protocols.md`+**Reference:** `${PAI_DIR}/Skills/CORE/agent-protocols.md`---@@ -1432,7 +1432,7 @@ voice_id: [ElevenLabs voice ID]**Never skip quality gates.** If testing reveals issues, fix them before completion.-**Reference:** `${PAI_DIR}/skills/CORE/TESTING.md`+**Reference:** `${PAI_DIR}/Skills/CORE/TESTING.md`---diff --git a/.claude/Skills/CORE/HistorySystem.md b/.claude/Skills/CORE/HistorySystem.mdindex 10dc0365..64a5f7d8 100644--- a/.claude/Skills/CORE/HistorySystem.md+++ b/.claude/Skills/CORE/HistorySystem.md@@ -83,7 +83,7 @@ YYYY-MM-DD-HHMMSS_[PROJECT]_[TYPE]_[HIERARCHY]_[DESCRIPTION].md### 1. PostToolUse Hook**Triggers:** Every tool execution (Bash, Edit, Write, Read, Task, etc.)-**Implementation:** `${PAI_DIR}/hooks/capture-all-events.ts --event-type PostToolUse`+**Implementation:** `${PAI_DIR}/Hooks/capture-all-events.ts --event-type PostToolUse`**Output:** Daily JSONL logs in `Raw-Outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`**Purpose:** Raw execution data for forensics and analytics@@ -93,7 +93,7 @@ YYYY-MM-DD-HHMMSS_[PROJECT]_[TYPE]_[HIERARCHY]_[DESCRIPTION].md### 2. Stop Hook**Triggers:** Main agent (PAI) task completion-**Implementation:** `${PAI_DIR}/hooks/stop-hook.ts`+**Implementation:** `${PAI_DIR}/Hooks/stop-hook.ts`**Output:** Auto-captured files in `Learnings/` or `Sessions/` based on content**Purpose:** Lightweight capture of work summaries and learning moments@@ -105,7 +105,7 @@ YYYY-MM-DD-HHMMSS_[PROJECT]_[TYPE]_[HIERARCHY]_[DESCRIPTION].md### 3. SubagentStop Hook**Triggers:** Specialized agent task completion-**Implementation:** `${PAI_DIR}/hooks/subagent-stop-hook.ts`+**Implementation:** `${PAI_DIR}/Hooks/subagent-stop-hook.ts`**Output:** Categorized documents in appropriate directories**Purpose:** Organized work documentation by agent type@@ -128,13 +128,13 @@ New fields available in SubagentStop hooks:### 4. SessionEnd Hook**Triggers:** Session exit (when you quit Claude Code)-**Implementation:** `${PAI_DIR}/hooks/capture-session-summary.ts`+**Implementation:** `${PAI_DIR}/Hooks/capture-session-summary.ts`**Output:** Session summary in `Sessions/YYYY-MM/`**Purpose:** High-level session documentation### 5. SessionStart Hook**Triggers:** Session initialization (when you start Claude Code)-**Implementation:** `${PAI_DIR}/hooks/initialize-kai-session.ts`+**Implementation:** `${PAI_DIR}/Hooks/initialize-kai-session.ts`**Purpose:** Load core context and prepare session environment---diff --git a/.claude/Skills/CORE/HookSystem.md b/.claude/Skills/CORE/HookSystem.mdindex edb1660b..3f25b08c 100644--- a/.claude/Skills/CORE/HookSystem.md+++ b/.claude/Skills/CORE/HookSystem.md@@ -2,7 +2,7 @@**Event-Driven Automation Infrastructure**-**Location:** `${PAI_DIR}/hooks/`+**Location:** `${PAI_DIR}/Hooks/`**Configuration:** `${PAI_DIR}/settings.json`**Status:** Active - All hooks running in production@@ -15,7 +15,7 @@ The PAI hook system is an event-driven automation infrastructure built on Claude**Core Capabilities:**- **Session Management** - Auto-load context, capture summaries, manage state- **Voice Notifications** - Text-to-speech announcements for task completions-- **History Capture** - Automatic work/learning documentation to `${PAI_DIR}/history/`+- **History Capture** - Automatic work/learning documentation to `${PAI_DIR}/History/`- **Multi-Agent Support** - Agent-specific hooks with voice routing- **Observability** - Real-time event streaming to dashboard- **Tab Titles** - Dynamic terminal tab updates with task context@@ -26,7 +26,7 @@ The PAI hook system is an event-driven automation infrastructure built on Claude## Available Hook Types-Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/observability.ts`):+Claude Code supports the following hook events (from `${PAI_DIR}/Hooks/lib/observability.ts`):### 1. **SessionStart****When:** Claude Code session begins (new conversation)@@ -43,15 +43,15 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/load-core-context.ts"+ "command": "${PAI_DIR}/Hooks/load-core-context.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/initialize-pai-session.ts"+ "command": "${PAI_DIR}/Hooks/initialize-pai-session.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type SessionStart"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type SessionStart"}]}@@ -62,7 +62,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser**What They Do:**- `load-core-context.ts` - Reads `skills/CORE/SKILL.md` and injects PAI context as `<system-reminder>` at session start- `initialize-pai-session.ts` - Sets up session state and environment-- `capture-all-events.ts` - Logs event to `${PAI_DIR}/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`+- `capture-all-events.ts` - Logs event to `${PAI_DIR}/History/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`---@@ -81,11 +81,11 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/capture-session-summary.ts"+ "command": "${PAI_DIR}/Hooks/capture-session-summary.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type SessionEnd"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type SessionEnd"}]}@@ -94,7 +94,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser```**What They Do:**-- `capture-session-summary.ts` - Analyzes session activity and creates summary document in `${PAI_DIR}/history/sessions/YYYY-MM/`+- `capture-session-summary.ts` - Analyzes session activity and creates summary document in `${PAI_DIR}/History/sessions/YYYY-MM/`- Captures: files changed, commands executed, tools used, session focus, duration---@@ -114,11 +114,11 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/update-tab-titles.ts"+ "command": "${PAI_DIR}/Hooks/update-tab-titles.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type UserPromptSubmit"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type UserPromptSubmit"}]}@@ -148,11 +148,11 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/stop-hook.ts"+ "command": "${PAI_DIR}/Hooks/stop-hook.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type Stop"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type Stop"}]}@@ -164,7 +164,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser- `stop-hook.ts` - THE CRITICAL HOOK for main agent completions- Extracts `🎯 COMPLETED:` line from response- Sends to voice server with PAI's voice ID (`s3TPKV1kjDlVtZbl4Ksh`)- - Captures work summaries to `${PAI_DIR}/history/sessions/YYYY-MM/` or learnings to `${PAI_DIR}/history/learnings/YYYY-MM/`+ - Captures work summaries to `${PAI_DIR}/History/sessions/YYYY-MM/` or learnings to `${PAI_DIR}/History/learnings/YYYY-MM/`- Updates Kitty tab with `✅` prefix- Sends event to observability dashboard@@ -187,11 +187,11 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/subagent-stop-hook.ts"+ "command": "${PAI_DIR}/Hooks/subagent-stop-hook.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type SubagentStop"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type SubagentStop"}]}@@ -231,7 +231,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type PreToolUse"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type PreToolUse"}]}@@ -261,7 +261,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type PostToolUse"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type PostToolUse"}]}@@ -271,7 +271,7 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser**What They Do:**- Captures tool output, execution time, success/failure-- Logs to `${PAI_DIR}/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`+- Logs to `${PAI_DIR}/History/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`- Powers observability dashboard---@@ -292,11 +292,11 @@ Claude Code supports the following hook events (from `${PAI_DIR}/hooks/lib/obser"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/context-compression-hook.ts"+ "command": "${PAI_DIR}/Hooks/context-compression-hook.ts"},{"type": "command",- "command": "${PAI_DIR}/hooks/capture-all-events.ts --event-type PreCompact"+ "command": "${PAI_DIR}/Hooks/capture-all-events.ts --event-type PreCompact"}]}@@ -346,7 +346,7 @@ Hooks have access to all environment variables from `${PAI_DIR}/settings.json` `"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/my-hook.ts --arg value"+ "command": "${PAI_DIR}/Hooks/my-hook.ts --arg value"}]}@@ -475,8 +475,8 @@ else if (process.env.CLAUDE_CODE_AGENT) {agentName = process.env.CLAUDE_CODE_AGENT;}-// Detect from path (subagents run in /agents/name/)-else if (hookData.cwd && hookData.cwd.includes('/agents/')) {+// Detect from path (subagents run in /Agents/name/)+else if (hookData.cwd && hookData.cwd.includes('/Agents/')) {const agentMatch = hookData.cwd.match(/\/agents\/([^\/]+)/);if (agentMatch) agentName = agentMatch[1];}@@ -528,7 +528,7 @@ await sendEventToObservability({execSync(`printf '\\033]0;${titleWithEmoji}\\007' >&2`);// Launch background process for Haiku summary (slow)-Bun.spawn(['bun', `${paiDir}/hooks/update-tab-title.ts`, prompt], {+Bun.spawn(['bun', `${paiDir}/Hooks/update-tab-title.ts`, prompt], {stdout: 'ignore',stderr: 'ignore',stdin: 'ignore'@@ -568,7 +568,7 @@ async function main() {Decide which event should trigger your hook (SessionStart, Stop, PostToolUse, etc.)### Step 2: Create Hook Script-**Location:** `${PAI_DIR}/hooks/my-custom-hook.ts`+**Location:** `${PAI_DIR}/Hooks/my-custom-hook.ts`**Template:**```typescript@@ -609,7 +609,7 @@ main();### Step 3: Make Executable```bash-chmod +x ${PAI_DIR}/hooks/my-custom-hook.ts+chmod +x ${PAI_DIR}/Hooks/my-custom-hook.ts```### Step 4: Add to settings.json@@ -621,7 +621,7 @@ chmod +x ${PAI_DIR}/hooks/my-custom-hook.ts"hooks": [{"type": "command",- "command": "${PAI_DIR}/hooks/my-custom-hook.ts"+ "command": "${PAI_DIR}/Hooks/my-custom-hook.ts"}]}@@ -633,7 +633,7 @@ chmod +x ${PAI_DIR}/hooks/my-custom-hook.ts### Step 5: Test```bash# Test hook directly-echo '{"session_id":"test","transcript_path":"/tmp/test.jsonl","hook_event_name":"Stop"}' | bun ${PAI_DIR}/hooks/my-custom-hook.ts+echo '{"session_id":"test","transcript_path":"/tmp/test.jsonl","hook_event_name":"Stop"}' | bun ${PAI_DIR}/Hooks/my-custom-hook.ts```### Step 6: Restart Claude Code@@ -695,18 +695,18 @@ await Promise.race([readPromise, timeoutPromise]);### Hook Not Running**Check:**-1. Is hook script executable? `chmod +x ${PAI_DIR}/hooks/my-hook.ts`-2. Is path correct in settings.json? Use `${PAI_DIR}/hooks/...`+1. Is hook script executable? `chmod +x ${PAI_DIR}/Hooks/my-hook.ts`+2. Is path correct in settings.json? Use `${PAI_DIR}/Hooks/...`3. Is settings.json valid JSON? `jq . ${PAI_DIR}/settings.json`4. Did you restart Claude Code after editing settings.json?**Debug:**```bash# Test hook directly-echo '{"session_id":"test","transcript_path":"/tmp/test.jsonl","hook_event_name":"Stop"}' | bun ${PAI_DIR}/hooks/my-hook.ts+echo '{"session_id":"test","transcript_path":"/tmp/test.jsonl","hook_event_name":"Stop"}' | bun ${PAI_DIR}/Hooks/my-hook.ts# Check hook logs (stderr output)-tail -f ${PAI_DIR}/hooks/debug.log # If you add logging+tail -f ${PAI_DIR}/Hooks/debug.log # If you add logging```---@@ -758,19 +758,19 @@ curl -X POST http://localhost:8888/notify \### History Not Capturing**Check:**-1. Does `${PAI_DIR}/history/` directory exist?+1. Does `${PAI_DIR}/History/` directory exist?2. Are structured sections present in response? (`📋 SUMMARY:`, `🎯 COMPLETED:`, etc.)-3. Is hook actually running? Check `${PAI_DIR}/history/raw-outputs/` for events-4. File permissions? `ls -la ${PAI_DIR}/history/sessions/`+3. Is hook actually running? Check `${PAI_DIR}/History/raw-outputs/` for events+4. File permissions? `ls -la ${PAI_DIR}/History/sessions/`**Debug:**```bash# Check recent captures-ls -lt ${PAI_DIR}/history/sessions/$(date +%Y-%m)/ | head -10-ls -lt ${PAI_DIR}/history/learnings/$(date +%Y-%m)/ | head -10+ls -lt ${PAI_DIR}/History/sessions/$(date +%Y-%m)/ | head -10+ls -lt ${PAI_DIR}/History/learnings/$(date +%Y-%m)/ | head -10# Check raw events-tail ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl+tail ${PAI_DIR}/History/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl```**Common Issues:**@@ -787,11 +787,11 @@ tail ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.**Evidence:**```bash# Check if Stop events fired today-grep '"event_type":"Stop"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl+grep '"event_type":"Stop"' ${PAI_DIR}/History/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl# Result: 0 matches (no Stop events)# But other hooks ARE working-grep '"event_type":"PostToolUse"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl+grep '"event_type":"PostToolUse"' ${PAI_DIR}/History/raw-outputs/$(date +%Y-%m)/$(date +%Y-%m-%d)_all-events.jsonl# Result: 80+ matches (PostToolUse working fine)```@@ -809,7 +809,7 @@ grep '"event_type":"PostToolUse"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/**Workaround (MANDATORY):**-1. **Added CAPTURE field to response format** (see `${PAI_DIR}/skills/CORE/SKILL.md`)+1. **Added CAPTURE field to response format** (see `${PAI_DIR}/Skills/CORE/SKILL.md`)- MANDATORY field in every response- Forces verification before completing responses- Must document: "Auto-captured" / "Manually saved" / "N/A"@@ -822,15 +822,15 @@ grep '"event_type":"PostToolUse"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/3. **Verification Commands:**```bash# Check if auto-captured (should happen, but often doesn't due to Stop event bug)- ls -lt ${PAI_DIR}/history/sessions/$(date +%Y-%m)/ | head -5- ls -lt ${PAI_DIR}/history/learnings/$(date +%Y-%m)/ | head -5+ ls -lt ${PAI_DIR}/History/sessions/$(date +%Y-%m)/ | head -5+ ls -lt ${PAI_DIR}/History/learnings/$(date +%Y-%m)/ | head -5# If 0 results or doesn't match current work → Manual capture required```**Status:** UNRESOLVED (Claude Code issue, not hook configuration)**Mitigation:** Structural enforcement via response format (cannot complete valuable work without verification)-**Tracking:** Documented in `${PAI_DIR}/skills/CORE/SKILL.md` (History Capture System section)+**Tracking:** Documented in `${PAI_DIR}/Skills/CORE/SKILL.md` (History Capture System section)**Long-term Fix:**- Report to Anthropic (Claude Code team) as Stop event reliability issue@@ -844,7 +844,7 @@ grep '"event_type":"PostToolUse"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/**Check:**1. Is `${PAI_DIR}/agent-sessions.json` writable?2. Is `[AGENT:type]` tag in `🎯 COMPLETED:` line?-3. Is agent running from correct directory? (`/agents/name/`)+3. Is agent running from correct directory? (`/Agents/name/`)**Debug:**```bash@@ -852,13 +852,13 @@ grep '"event_type":"PostToolUse"' ${PAI_DIR}/history/raw-outputs/$(date +%Y-%m)/cat ${PAI_DIR}/agent-sessions.json | jq .# Check subagent-stop debug log-tail -f ${PAI_DIR}/hooks/subagent-stop-debug.log+tail -f ${PAI_DIR}/Hooks/subagent-stop-debug.log```**Fix:**- Ensure agents include `[AGENT:type]` in completion line- Verify Task tool passes `subagent_type` parameter-- Check cwd includes `/agents/` in path+- Check cwd includes `/Agents/` in path---@@ -872,7 +872,7 @@ tail -f ${PAI_DIR}/hooks/subagent-stop-debug.log**Debug:**```bash# Start dashboard server-cd ${PAI_DIR}/skills/system/observability/dashboard/apps/server+cd ${PAI_DIR}/Skills/system/observability/dashboard/apps/serverbun run dev# Check server logs@@ -886,14 +886,14 @@ bun run dev### Context Loading Issues (SessionStart)**Check:**-1. Does `${PAI_DIR}/skills/CORE/SKILL.md` exist?+1. Does `${PAI_DIR}/Skills/CORE/SKILL.md` exist?2. Is `load-core-context.ts` executable?3. Is `PAI_DIR` env variable set correctly?**Debug:**```bash# Test context loading directly-bun ${PAI_DIR}/hooks/load-core-context.ts+bun ${PAI_DIR}/Hooks/load-core-context.ts# Should output <system-reminder> with SKILL.md content```@@ -901,7 +901,7 @@ bun ${PAI_DIR}/hooks/load-core-context.ts**Common Issues:**- Subagent sessions loading main context → Fixed (subagent detection in hook)- File not found → Check `PAI_DIR` environment variable-- Permission denied → `chmod +x ${PAI_DIR}/hooks/load-core-context.ts`+- Permission denied → `chmod +x ${PAI_DIR}/Hooks/load-core-context.ts`---@@ -916,8 +916,8 @@ Hooks in same event execute **sequentially** in order defined in settings.json:"Stop": [{"hooks": [- { "command": "${PAI_DIR}/hooks/stop-hook.ts" }, // Runs first- { "command": "${PAI_DIR}/hooks/capture-all-events.ts" } // Runs second+ { "command": "${PAI_DIR}/Hooks/stop-hook.ts" }, // Runs first+ { "command": "${PAI_DIR}/Hooks/capture-all-events.ts" } // Runs second]}]@@ -1051,11 +1051,11 @@ HOOK LIFECYCLE:KEY FILES:${PAI_DIR}/settings.json Hook configuration-${PAI_DIR}/hooks/ Hook scripts-${PAI_DIR}/hooks/lib/observability.ts Helper library-${PAI_DIR}/history/raw-outputs/ Event logs (JSONL)-${PAI_DIR}/history/sessions/ Work summaries-${PAI_DIR}/history/learnings/ Learning captures+${PAI_DIR}/Hooks/ Hook scripts+${PAI_DIR}/Hooks/lib/observability.ts Helper library+${PAI_DIR}/History/raw-outputs/ Event logs (JSONL)+${PAI_DIR}/History/sessions/ Work summaries+${PAI_DIR}/History/learnings/ Learning captures${PAI_DIR}/agent-sessions.json Session→Agent mappingCRITICAL HOOKS:diff --git a/.claude/Skills/CORE/ProsodyAgentTemplate.md b/.claude/Skills/CORE/ProsodyAgentTemplate.mdindex ac6e06d6..045be73f 100644--- a/.claude/Skills/CORE/ProsodyAgentTemplate.md+++ b/.claude/Skills/CORE/ProsodyAgentTemplate.md@@ -48,6 +48,6 @@ Control pacing and emphasis within your message:🎯 COMPLETED: [AGENT:your-type] [optional marker] message with **emphasis**... and pauses!```-**Full Guide:** `${PAI_DIR}/skills/CORE/prosody-guide.md`+**Full Guide:** `${PAI_DIR}/Skills/CORE/prosody-guide.md`---diff --git a/.claude/Skills/CORE/ProsodyGuide.md b/.claude/Skills/CORE/ProsodyGuide.mdindex e52c6ffc..873ba8b8 100644--- a/.claude/Skills/CORE/ProsodyGuide.md+++ b/.claude/Skills/CORE/ProsodyGuide.md@@ -407,9 +407,9 @@ curl -X POST http://localhost:8888/notify \## Related Documentation- `${PAI_DIR}/voice-server/USAGE.md` - Voice server complete usage guide-- `${PAI_DIR}/skills/CORE/agent-personalities.md` - Agent personality definitions-- `${PAI_DIR}/skills/CORE/workflows/voice-routing-full.md` - Voice routing table-- `${PAI_DIR}/hooks/lib/prosody-enhancer.ts` - Prosody enhancement library+- `${PAI_DIR}/Skills/CORE/agent-personalities.md` - Agent personality definitions+- `${PAI_DIR}/Skills/CORE/workflows/voice-routing-full.md` - Voice routing table+- `${PAI_DIR}/Hooks/lib/prosody-enhancer.ts` - Prosody enhancement library---diff --git a/.claude/Skills/CORE/SKILL.md b/.claude/Skills/CORE/SKILL.mdindex 3981d8e2..9642de59 100644--- a/.claude/Skills/CORE/SKILL.md+++ b/.claude/Skills/CORE/SKILL.md@@ -110,14 +110,14 @@ COMPLETED: [12 words max - drives voice output - REQUIRED]**Operating Principles:**- Date Awareness: Always use today's actual date from system (not training cutoff)-- Constitutional Principles: See ${PAI_DIR}/skills/CORE/CONSTITUTION.md+- Constitutional Principles: See ${PAI_DIR}/Skills/CORE/CONSTITUTION.md- Command Line First, Deterministic Code First, Prompts Wrap Code---## Documentation Index & Route Triggers-**All documentation files are in `${PAI_DIR}/skills/CORE/` (flat structure).**+**All documentation files are in `${PAI_DIR}/Skills/CORE/` (flat structure).****Core Architecture & Philosophy:**- `CONSTITUTION.md` - System architecture and philosophy | PRIMARY REFERENCE@@ -155,8 +155,8 @@ description: [What it does]. USE WHEN [intent triggers using OR]. [Capabilities]## File Organization (Always Active)- **Scratchpad** (`${PAI_DIR}/scratchpad/`) - Temporary files only. Delete when done.-- **History** (`${PAI_DIR}/history/`) - Permanent valuable outputs.-- **Backups** (`${PAI_DIR}/history/backups/`) - All backups go here, NEVER inside skill directories.+- **History** (`${PAI_DIR}/History/`) - Permanent valuable outputs.+- **Backups** (`${PAI_DIR}/History/backups/`) - All backups go here, NEVER inside skill directories.**Rules:**- Save valuable work to history, not scratchpad@@ -260,19 +260,19 @@ You have EXPLICIT PERMISSION to say "I don't know" or "I'm not confident" when:**CRITICAL: When the user asks about ANYTHING done in the past, CHECK THE HISTORY SYSTEM FIRST.**-The history system at `${PAI_DIR}/history/` contains ALL past work - sessions, learnings, research, decisions.+The history system at `${PAI_DIR}/History/` contains ALL past work - sessions, learnings, research, decisions.### How to Search History```bash# Quick keyword search across all history-rg -i "keyword" ${PAI_DIR}/history/+rg -i "keyword" ${PAI_DIR}/History/# Search sessions specifically-rg -i "keyword" ${PAI_DIR}/history/sessions/+rg -i "keyword" ${PAI_DIR}/History/sessions/# List recent files-ls -lt ${PAI_DIR}/history/sessions/2025-11/ | head -20+ls -lt ${PAI_DIR}/History/sessions/2025-11/ | head -20```### Directory Quick Referencediff --git a/.claude/Skills/CORE/TerminalTabs.md b/.claude/Skills/CORE/TerminalTabs.mdindex 8bcfd8f8..ca3495f4 100644--- a/.claude/Skills/CORE/TerminalTabs.md+++ b/.claude/Skills/CORE/TerminalTabs.md@@ -60,7 +60,7 @@ printf '\033]30;Title Here\007'The terminal tab functionality is implemented in:```-${PAI_DIR}/hooks/stop-hook.ts+${PAI_DIR}/Hooks/stop-hook.ts```### Key Functions@@ -75,13 +75,13 @@ If tab titles aren't updating:1. **Check hook is executable:**```bash- ls -la ${PAI_DIR}/hooks/stop-hook.ts+ ls -la ${PAI_DIR}/Hooks/stop-hook.ts# Should show: -rwxr-xr-x```2. **Verify Claude Code settings:**- Ensure stop-hook is configured in your Claude Code settings- - Path should be: `${PAI_DIR}/hooks/stop-hook.ts`+ - Path should be: `${PAI_DIR}/Hooks/stop-hook.ts`3. **Test manually:**```bash@@ -96,7 +96,7 @@ If tab titles aren't updating:## Customization-To modify the tab title behavior, edit `${PAI_DIR}/hooks/stop-hook.ts`:+To modify the tab title behavior, edit `${PAI_DIR}/Hooks/stop-hook.ts`:- Change word count (currently 4 words)- Modify verb tense (currently past tense)diff --git a/.claude/Skills/CORE/VOICE.md b/.claude/Skills/CORE/VOICE.mdindex 9422354b..b3ebf41d 100644--- a/.claude/Skills/CORE/VOICE.md+++ b/.claude/Skills/CORE/VOICE.md@@ -87,8 +87,8 @@ See `${PAI_DIR}/voice-server/README.md` for complete voice list.## 🔗 Related Documentation-- **Prosody Guide:** `${PAI_DIR}/skills/CORE/prosody-guide.md` (voice parameter tuning)-- **Agent Template:** `${PAI_DIR}/skills/CORE/prosody-agent-template.md` (creating agent voices)+- **Prosody Guide:** `${PAI_DIR}/Skills/CORE/prosody-guide.md` (voice parameter tuning)+- **Agent Template:** `${PAI_DIR}/Skills/CORE/prosody-agent-template.md` (creating agent voices)---diff --git a/.claude/Skills/Createskill/SKILL.md b/.claude/Skills/Createskill/SKILL.mdindex 6b6a25fc..3a90ada5 100644--- a/.claude/Skills/Createskill/SKILL.md+++ b/.claude/Skills/Createskill/SKILL.md@@ -9,9 +9,9 @@ MANDATORY skill creation framework for ALL skill creation requests.## Authoritative Source-**Before creating ANY skill, READ:** `${PAI_DIR}/skills/CORE/SkillSystem.md`+**Before creating ANY skill, READ:** `${PAI_DIR}/Skills/CORE/SkillSystem.md`-**Canonical example to follow:** `${PAI_DIR}/skills/Blogging/SKILL.md`+**Canonical example to follow:** `${PAI_DIR}/Skills/Blogging/SKILL.md`## TitleCase Naming Conventiondiff --git a/.claude/Skills/Createskill/workflows/CanonicalizeSkill.md b/.claude/Skills/Createskill/workflows/CanonicalizeSkill.mdindex c50bf7fc..01802f85 100644--- a/.claude/Skills/Createskill/workflows/CanonicalizeSkill.md+++ b/.claude/Skills/Createskill/workflows/CanonicalizeSkill.md@@ -9,7 +9,7 @@**REQUIRED FIRST:** Read the canonical structure:```-${PAI_DIR}/skills/CORE/SkillSystem.md+${PAI_DIR}/Skills/CORE/SkillSystem.md```This defines exactly what "canonicalize" means.@@ -19,7 +19,7 @@ This defines exactly what "canonicalize" means.## Step 2: Read the Current Skill```bash-${PAI_DIR}/skills/[skill-name]/SKILL.md+${PAI_DIR}/Skills/[skill-name]/SKILL.md```Identify what's wrong:@@ -36,10 +36,10 @@ Identify what's wrong:## Step 3: Backup```bash-cp -r ${PAI_DIR}/skills/[skill-name]/ ${PAI_DIR}/history/backups/[skill-name]-backup-$(date +%Y%m%d)/+cp -r ${PAI_DIR}/Skills/[skill-name]/ ${PAI_DIR}/History/backups/[skill-name]-backup-$(date +%Y%m%d)/```-**Note:** Backups go to `${PAI_DIR}/history/backups/`, NEVER inside skill directories.+**Note:** Backups go to `${PAI_DIR}/History/backups/`, NEVER inside skill directories.---@@ -74,7 +74,7 @@ cp -r ${PAI_DIR}/skills/[skill-name]/ ${PAI_DIR}/history/backups/[skill-name]-ba**Rename files if needed:**```bash# Example: rename workflow files-cd ${PAI_DIR}/skills/[SkillName]/workflows/+cd ${PAI_DIR}/Skills/[SkillName]/workflows/mv create.md Create.mdmv update-info.md UpdateInfo.mdmv sync_repo.md SyncRepo.md@@ -160,7 +160,7 @@ If the markdown body already had routing information in a different format, consList workflow files:```bash-ls ${PAI_DIR}/skills/[SkillName]/workflows/+ls ${PAI_DIR}/Skills/[SkillName]/workflows/```For EACH file:diff --git a/.claude/Skills/Createskill/workflows/CreateSkill.md b/.claude/Skills/Createskill/workflows/CreateSkill.mdindex 312ad9f6..e0029298 100644--- a/.claude/Skills/Createskill/workflows/CreateSkill.md+++ b/.claude/Skills/Createskill/workflows/CreateSkill.md@@ -6,8 +6,8 @@ Create a new skill following the canonical structure with proper TitleCase namin**REQUIRED FIRST:**-1. Read the skill system documentation: `${PAI_DIR}/skills/CORE/SkillSystem.md`-2. Read the canonical example: `${PAI_DIR}/skills/Blogging/SKILL.md`+1. Read the skill system documentation: `${PAI_DIR}/Skills/CORE/SkillSystem.md`+2. Read the canonical example: `${PAI_DIR}/Skills/Blogging/SKILL.md`## Step 2: Understand the Request@@ -35,14 +35,14 @@ Ask the user:## Step 4: Create the Skill Directory```bash-mkdir -p ${PAI_DIR}/skills/[SkillName]/workflows-mkdir -p ${PAI_DIR}/skills/[SkillName]/tools+mkdir -p ${PAI_DIR}/Skills/[SkillName]/workflows+mkdir -p ${PAI_DIR}/Skills/[SkillName]/tools```**Example:**```bash-mkdir -p ${PAI_DIR}/skills/Daemon/workflows-mkdir -p ${PAI_DIR}/skills/Daemon/tools+mkdir -p ${PAI_DIR}/Skills/Daemon/workflows+mkdir -p ${PAI_DIR}/Skills/Daemon/tools```## Step 5: Create SKILL.md@@ -99,24 +99,24 @@ User: "[Different request]"For each workflow in the routing section:```bash-touch ${PAI_DIR}/skills/[SkillName]/workflows/[WorkflowName].md+touch ${PAI_DIR}/Skills/[SkillName]/workflows/[WorkflowName].md```**Examples (TitleCase):**```bash-touch ${PAI_DIR}/skills/Daemon/workflows/UpdateDaemonInfo.md-touch ${PAI_DIR}/skills/Daemon/workflows/UpdatePublicRepo.md-touch ${PAI_DIR}/skills/Blogging/workflows/Create.md-touch ${PAI_DIR}/skills/Blogging/workflows/Publish.md+touch ${PAI_DIR}/Skills/Daemon/workflows/UpdateDaemonInfo.md+touch ${PAI_DIR}/Skills/Daemon/workflows/UpdatePublicRepo.md+touch ${PAI_DIR}/Skills/Blogging/workflows/Create.md+touch ${PAI_DIR}/Skills/Blogging/workflows/Publish.md```## Step 7: Verify TitleCaseRun this check:```bash-ls ${PAI_DIR}/skills/[SkillName]/-ls ${PAI_DIR}/skills/[SkillName]/workflows/-ls ${PAI_DIR}/skills/[SkillName]/tools/+ls ${PAI_DIR}/Skills/[SkillName]/+ls ${PAI_DIR}/Skills/[SkillName]/workflows/+ls ${PAI_DIR}/Skills/[SkillName]/tools/```Verify ALL files use TitleCase:diff --git a/.claude/Skills/Createskill/workflows/UpdateSkill.md b/.claude/Skills/Createskill/workflows/UpdateSkill.mdindex 6f2fe90e..466d629b 100644--- a/.claude/Skills/Createskill/workflows/UpdateSkill.md+++ b/.claude/Skills/Createskill/workflows/UpdateSkill.md@@ -9,7 +9,7 @@**REQUIRED FIRST:** Read the canonical structure:```-${PAI_DIR}/skills/CORE/SkillSystem.md+${PAI_DIR}/Skills/CORE/SkillSystem.md```---@@ -17,7 +17,7 @@ ${PAI_DIR}/skills/CORE/SkillSystem.md## Step 2: Read the Current Skill```bash-${PAI_DIR}/skills/[SkillName]/SKILL.md+${PAI_DIR}/Skills/[SkillName]/SKILL.md```Understand the current:@@ -46,12 +46,12 @@ What needs to change?2. **Create the workflow file:**```bash-touch ${PAI_DIR}/skills/[SkillName]/workflows/[WorkflowName].md+touch ${PAI_DIR}/Skills/[SkillName]/workflows/[WorkflowName].md```Example:```bash-touch ${PAI_DIR}/skills/Daemon/workflows/UpdatePublicRepo.md+touch ${PAI_DIR}/Skills/Daemon/workflows/UpdatePublicRepo.md```3. **Add entry to `## Workflow Routing` section in SKILL.md:**@@ -77,13 +77,13 @@ description: [What it does]. USE WHEN [updated intent triggers using OR]. [Capab1. **Create TitleCase tool file:**```bash-touch ${PAI_DIR}/skills/[SkillName]/tools/ToolName.ts-touch ${PAI_DIR}/skills/[SkillName]/tools/ToolName.help.md+touch ${PAI_DIR}/Skills/[SkillName]/tools/ToolName.ts+touch ${PAI_DIR}/Skills/[SkillName]/tools/ToolName.help.md```2. **Ensure tools/ directory exists:**```bash-mkdir -p ${PAI_DIR}/skills/[SkillName]/tools+mkdir -p ${PAI_DIR}/Skills/[SkillName]/tools```---@@ -93,8 +93,8 @@ mkdir -p ${PAI_DIR}/skills/[SkillName]/toolsAfter making changes, verify naming:```bash-ls ${PAI_DIR}/skills/[SkillName]/workflows/-ls ${PAI_DIR}/skills/[SkillName]/tools/+ls ${PAI_DIR}/Skills/[SkillName]/workflows/+ls ${PAI_DIR}/Skills/[SkillName]/tools/```All files must use TitleCase:diff --git a/.claude/Skills/Createskill/workflows/ValidateSkill.md b/.claude/Skills/Createskill/workflows/ValidateSkill.mdindex f70afd82..e19643e2 100644--- a/.claude/Skills/Createskill/workflows/ValidateSkill.md+++ b/.claude/Skills/Createskill/workflows/ValidateSkill.md@@ -9,7 +9,7 @@**REQUIRED FIRST:** Read the canonical structure:```-${PAI_DIR}/skills/CORE/SkillSystem.md+${PAI_DIR}/Skills/CORE/SkillSystem.md```---@@ -17,7 +17,7 @@ ${PAI_DIR}/skills/CORE/SkillSystem.md## Step 2: Read the Target Skill```bash-${PAI_DIR}/skills/[SkillName]/SKILL.md+${PAI_DIR}/Skills/[SkillName]/SKILL.md```---@@ -26,7 +26,7 @@ ${PAI_DIR}/skills/[SkillName]/SKILL.md### Skill Directory```bash-ls ${PAI_DIR}/skills/ | grep -i [skillname]+ls ${PAI_DIR}/Skills/ | grep -i [skillname]```Verify TitleCase:@@ -35,7 +35,7 @@ Verify TitleCase:### Workflow Files```bash-ls ${PAI_DIR}/skills/[SkillName]/workflows/+ls ${PAI_DIR}/Skills/[SkillName]/workflows/```Verify TitleCase:@@ -44,7 +44,7 @@ Verify TitleCase:### Tool Files```bash-ls ${PAI_DIR}/skills/[SkillName]/tools/+ls ${PAI_DIR}/Skills/[SkillName]/tools/```Verify TitleCase:@@ -117,7 +117,7 @@ User: "[Request]"## Step 6: Check Workflow Files```bash-ls ${PAI_DIR}/skills/[SkillName]/workflows/+ls ${PAI_DIR}/Skills/[SkillName]/workflows/```Verify:@@ -131,7 +131,7 @@ Verify:## Step 7: Check Structure```bash-ls -la ${PAI_DIR}/skills/[SkillName]/+ls -la ${PAI_DIR}/Skills/[SkillName]/```Verify:diff --git a/.claude/Skills/Observability/SKILL.md b/.claude/Skills/Observability/SKILL.mdindex 3dd35854..56a2d785 100644--- a/.claude/Skills/Observability/SKILL.md+++ b/.claude/Skills/Observability/SKILL.md@@ -39,7 +39,7 @@ Real-time monitoring of PAI multi-agent activity with WebSocket streaming.- WebSocket live updates### Data Sources-- **Primary**: `~/.claude/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`+- **Primary**: `~/.claude/History/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`- **Format**: JSONL with structured event data- **Hooks**: Events logged automatically by PAI hook system@@ -118,7 +118,7 @@ bun run dev- Restart: `./manage.sh restart`### No events showing-- Verify events file exists: `~/.claude/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`+- Verify events file exists: `~/.claude/History/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`- Check hooks are configured in `~/.claude/settings.json`- Try triggering an event (use any tool or agent)@@ -155,6 +155,6 @@ bun run dev## Hook IntegrationFor the observability dashboard to receive events, configure your PAI hooks to log to:-`~/.claude/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`+`~/.claude/History/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl`The `capture-all-events.ts` hook in `~/.claude/Hooks/` handles this automatically.diff --git a/.claude/Skills/Observability/apps/server/src/file-ingest.ts b/.claude/Skills/Observability/apps/server/src/file-ingest.tsindex f58dd941..f723a167 100644--- a/.claude/Skills/Observability/apps/server/src/file-ingest.ts+++ b/.claude/Skills/Observability/apps/server/src/file-ingest.ts@@ -43,7 +43,7 @@ function getTodayEventsFile(): string {const month = String(pstDate.getMonth() + 1).padStart(2, '0');const day = String(pstDate.getDate()).padStart(2, '0');- const monthDir = join(paiDir, 'history', 'raw-outputs', `${year}-${month}`);+ const monthDir = join(paiDir, 'History', 'raw-outputs', `${year}-${month}`);return join(monthDir, `${year}-${month}-${day}_all-events.jsonl`);}diff --git a/.claude/Skills/Observability/apps/server/src/index.ts b/.claude/Skills/Observability/apps/server/src/index.tsindex 3491b489..bd8127f7 100644--- a/.claude/Skills/Observability/apps/server/src/index.ts+++ b/.claude/Skills/Observability/apps/server/src/index.ts@@ -14,7 +14,7 @@ import { startFileIngestion, getRecentEvents, getFilterOptions } from './file-in// Store WebSocket clientsconst wsClients = new Set<any>();-// Start file-based ingestion (reads from ~/.claude/history/raw-outputs/)+// Start file-based ingestion (reads from ~/.claude/History/raw-outputs/)// Pass a callback to broadcast new events to connected WebSocket clientsstartFileIngestion((events) => {// Broadcast each event to all connected WebSocket clientsdiff --git a/.claude/Skills/Prompting/SKILL.md b/.claude/Skills/Prompting/SKILL.mdindex 57a85b36..c6b79085 100644--- a/.claude/Skills/Prompting/SKILL.md+++ b/.claude/Skills/Prompting/SKILL.md@@ -86,7 +86,7 @@ Delegate subtasks to specialized agents with minimal context❌ Vague instructions ("might", "could", "should")## Supplementary Resources-For full standards: `read ${PAI_DIR}/skills/prompting/CLAUDE.md`+For full standards: `read ${PAI_DIR}/Skills/prompting/CLAUDE.md`## Based OnAnthropic's "Effective Context Engineering for AI Agents"diff --git a/.claude/Skills/Research/SKILL.md b/.claude/Skills/Research/SKILL.mdindex 1cdb1af2..98123121 100644--- a/.claude/Skills/Research/SKILL.md+++ b/.claude/Skills/Research/SKILL.md@@ -28,58 +28,58 @@ description: Comprehensive research, analysis, and content extraction system. Mu**When user requests comprehensive parallel research:**Examples: "do research on X", "research this topic", "find information about Y", "investigate this subject"-→ **READ:** `${PAI_DIR}/skills/research/workflows/conduct.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/conduct.md`→ **EXECUTE:** Parallel multi-agent research using available researcher agents**When user requests Claude-based research (FREE - no API keys):**Examples: "use claude for research", "claude research on X", "use websearch to research Y"-→ **READ:** `${PAI_DIR}/skills/research/workflows/claude-research.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/claude-research.md`→ **EXECUTE:** Intelligent query decomposition with Claude's WebSearch**When user requests Perplexity research (requires PERPLEXITY_API_KEY):**Examples: "use perplexity to research X", "perplexity research on Y"-→ **READ:** `${PAI_DIR}/skills/research/workflows/perplexity-research.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/perplexity-research.md`→ **EXECUTE:** Fast web search with query decomposition via Perplexity API**When user requests interview preparation:**Examples: "prepare interview questions for X", "interview research on Y"-→ **READ:** `${PAI_DIR}/skills/research/workflows/interview-research.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/interview-research.md`→ **EXECUTE:** Interview prep with diverse question generation### Content Retrieval Workflows**When user indicates difficulty accessing content:**Examples: "can't get this content", "site is blocking me", "CAPTCHA blocking"-→ **READ:** `${PAI_DIR}/skills/research/workflows/retrieve.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/retrieve.md`→ **EXECUTE:** Escalation through layers (WebFetch → BrightData → Apify)**When user provides YouTube URL:**Examples: "get this youtube video", "extract from youtube URL"-→ **READ:** `${PAI_DIR}/skills/research/workflows/youtube-extraction.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/youtube-extraction.md`→ **EXECUTE:** YouTube content extraction using fabric -y**When user requests web scraping:**Examples: "scrape this site", "extract data from this website"-→ **READ:** `${PAI_DIR}/skills/research/workflows/web-scraping.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/web-scraping.md`→ **EXECUTE:** Web scraping techniques and tools### Fabric Pattern Processing**When user requests Fabric pattern usage:**Examples: "use fabric to X", "create threat model", "summarize with fabric"-→ **READ:** `${PAI_DIR}/skills/research/workflows/fabric.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/fabric.md`→ **EXECUTE:** Auto-select best pattern from 242+ Fabric patterns### Content Enhancement Workflows**When user requests content enhancement:**Examples: "enhance this content", "improve this draft"-→ **READ:** `${PAI_DIR}/skills/research/workflows/enhance.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/enhance.md`→ **EXECUTE:** Content improvement and refinement**When user requests knowledge extraction:**Examples: "extract knowledge from X", "get insights from this"-→ **READ:** `${PAI_DIR}/skills/research/workflows/extract-knowledge.md`+→ **READ:** `${PAI_DIR}/Skills/research/workflows/extract-knowledge.md`→ **EXECUTE:** Knowledge extraction and synthesis---@@ -105,7 +105,7 @@ Examples: "extract knowledge from X", "get insights from this"### Available Research Agents-Check `${PAI_DIR}/agents/` for agents with "researcher" in their name:+Check `${PAI_DIR}/Agents/` for agents with "researcher" in their name:- `claude-researcher` - Uses Claude's WebSearch (FREE, no API key needed)- `perplexity-researcher` - Uses Perplexity API (requires PERPLEXITY_API_KEY)- `gemini-researcher` - Uses Gemini API (requires GOOGLE_API_KEY)@@ -199,7 +199,7 @@ ${PAI_DIR}/scratchpad/YYYY-MM-DD-HHMMSS_research-[topic]/### Permanent Storage (History)```-${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_[topic]/+${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD_[topic]/├── README.md├── research-report.md└── metadata.jsondiff --git a/.claude/Skills/Research/workflows/ClaudeResearch.md b/.claude/Skills/Research/workflows/ClaudeResearch.mdindex f858ce07..d7dd9cc9 100755--- a/.claude/Skills/Research/workflows/ClaudeResearch.md+++ b/.claude/Skills/Research/workflows/ClaudeResearch.md@@ -8,7 +8,7 @@** ## Usage* ```bash- * bun ${PAI_DIR}/commands/perform-claude-research.md "your complex research question here"+ * bun ${PAI_DIR}/Commands/perform-claude-research.md "your complex research question here"* ```** ## Features@@ -33,7 +33,7 @@ const originalQuestion = process.argv.slice(2).join(' ');if (!originalQuestion) {console.error('❌ Please provide a research question');- console.error('Usage: bun ${PAI_DIR}/commands/perform-claude-research.md "your question here"');+ console.error('Usage: bun ${PAI_DIR}/Commands/perform-claude-research.md "your question here"');process.exit(1);}diff --git a/.claude/Skills/Research/workflows/Fabric.md b/.claude/Skills/Research/workflows/Fabric.mdindex b499159b..0d65868f 100644--- a/.claude/Skills/Research/workflows/Fabric.md+++ b/.claude/Skills/Research/workflows/Fabric.md@@ -6,7 +6,7 @@ Intelligent pattern selection for Fabric CLI. Automatically selects the right pa**Before starting any task with this skill, load complete PAI context:**-`Skill("CORE")` or `read ${PAI_DIR}/skills/CORE/SKILL.md`+`Skill("CORE")` or `read ${PAI_DIR}/Skills/CORE/SKILL.md`This provides access to:- Stack preferences and tool configurations@@ -279,19 +279,19 @@ fabric "your text here" -p [pattern]## 🔄 Updating Patterns-The Fabric repository is included in this skill at `${PAI_DIR}/skills/fabric/fabric-repo/`.+The Fabric repository is included in this skill at `${PAI_DIR}/Skills/fabric/fabric-repo/`.**To update patterns:**```bash-cd ${PAI_DIR}/skills/fabric/fabric-repo+cd ${PAI_DIR}/Skills/fabric/fabric-repogit pull origin main```**To see all available patterns:**```bash-ls ${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/+ls ${PAI_DIR}/Skills/fabric/fabric-repo/data/patterns/# OR from your local Fabric install:ls ~/.config/fabric/patterns/```@@ -368,10 +368,10 @@ cat wisdom.txt | fabric -p create_5_sentence_summary## 📖 Supplementary Resources-**Full Pattern List:** `ls ${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/`-**Fabric Repo:** `${PAI_DIR}/skills/fabric/fabric-repo/`+**Full Pattern List:** `ls ${PAI_DIR}/Skills/fabric/fabric-repo/data/patterns/`+**Fabric Repo:** `${PAI_DIR}/Skills/fabric/fabric-repo/`**Fabric Documentation:** https://github.com/danielmiessler/fabric-**Pattern Templates:** See `${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/official_pattern_template/`+**Pattern Templates:** See `${PAI_DIR}/Skills/fabric/fabric-repo/data/patterns/official_pattern_template/`## 🔑 Key Insightdiff --git a/.claude/Skills/Research/workflows/PerplexityResearch.md b/.claude/Skills/Research/workflows/PerplexityResearch.mdindex dd534e88..80e8fb9e 100755--- a/.claude/Skills/Research/workflows/PerplexityResearch.md+++ b/.claude/Skills/Research/workflows/PerplexityResearch.md@@ -8,7 +8,7 @@** ## Usage* ```bash- * bun ${PAI_DIR}/commands/perform-perplexity-research.md "your complex research question here"+ * bun ${PAI_DIR}/Commands/perform-perplexity-research.md "your complex research question here"* ```** ## Features@@ -56,7 +56,7 @@ const originalQuestion = process.argv.slice(2).join(' ');if (!originalQuestion) {console.error('❌ Please provide a research question');- console.error('Usage: bun ${PAI_DIR}/commands/perform-perplexity-research.md "your question here"');+ console.error('Usage: bun ${PAI_DIR}/Commands/perform-perplexity-research.md "your question here"');process.exit(1);}diff --git a/.claude/Skills/Research/workflows/Retrieve.md b/.claude/Skills/Research/workflows/Retrieve.mdindex e3254f93..d9743755 100644--- a/.claude/Skills/Research/workflows/Retrieve.md+++ b/.claude/Skills/Research/workflows/Retrieve.md@@ -6,7 +6,7 @@ Intelligent multi-layer content retrieval system for DIFFICULT content retrieval**Before starting any task with this skill, load complete PAI context:**-`Skill("CORE")` or `read ${PAI_DIR}/skills/CORE/SKILL.md`+`Skill("CORE")` or `read ${PAI_DIR}/Skills/CORE/SKILL.md`This provides access to:- Stack preferences and tool configurations@@ -411,7 +411,7 @@ mcp__Apify__apify-slash-rag-web-browser({- Draft extracted data and transformations2. **History (Permanent Archive):**- - Move to `${PAI_DIR}/history/research/YYYY-MM-DD_[description]/` when complete+ - Move to `${PAI_DIR}/History/research/YYYY-MM-DD_[description]/` when complete- Include: `README.md`, final extracted content, metadata- Archive for future reference and reuse@@ -438,7 +438,7 @@ ${PAI_DIR}/scratchpad/2025-10-26-143022_retrieve-react19-docs/**History (permanent archive):**```-${PAI_DIR}/history/research/2025-10-26_react19-documentation/+${PAI_DIR}/History/research/2025-10-26_react19-documentation/├── README.md (retrieval documentation)├── content.md (final extracted content)├── metadata.json (sources, layers used, timestamps)diff --git a/.claude/Skills/Research/workflows/WebScraping.md b/.claude/Skills/Research/workflows/WebScraping.mdindex f8ad58ad..7f2215be 100644--- a/.claude/Skills/Research/workflows/WebScraping.md+++ b/.claude/Skills/Research/workflows/WebScraping.md@@ -6,7 +6,7 @@ Web scraping and crawling using WebFetch for simple pages, BrightData MCP for CA**Before starting any task with this skill, load complete PAI context:**-`Skill("CORE")` or `read ${PAI_DIR}/skills/CORE/SKILL.md`+`Skill("CORE")` or `read ${PAI_DIR}/Skills/CORE/SKILL.md`This provides access to:- Stack preferences and tool configurationsdiff --git a/.claude/Skills/Research/workflows/YoutubeExtraction.md b/.claude/Skills/Research/workflows/YoutubeExtraction.mdindex 3abd7de7..61b2872c 100644--- a/.claude/Skills/Research/workflows/YoutubeExtraction.md+++ b/.claude/Skills/Research/workflows/YoutubeExtraction.md@@ -6,7 +6,7 @@ Extract content from YouTube videos using Fabric CLI. Automatically downloads, t**Before starting any task with this skill, load complete PAI context:**-`Skill("CORE")` or `read ${PAI_DIR}/skills/CORE/SKILL.md`+`Skill("CORE")` or `read ${PAI_DIR}/Skills/CORE/SKILL.md`This provides access to:- Stack preferences and tool configurationsdiff --git a/.claude/Skills/StoryExplanation/SKILL.md b/.claude/Skills/StoryExplanation/SKILL.mdindex 85134143..c90f98e7 100644--- a/.claude/Skills/StoryExplanation/SKILL.md+++ b/.claude/Skills/StoryExplanation/SKILL.md@@ -9,7 +9,7 @@ description: Create compelling story-format summaries using UltraThink to find t**Before starting any task with this skill, load complete PAI context:**-`read ${PAI_DIR}/skills/CORE/SKILL.md`+`read ${PAI_DIR}/Skills/CORE/SKILL.md`## Core Philosophy@@ -118,7 +118,7 @@ User request → Analyze intent:- Example: `${PAI_DIR}/scratchpad/2025-10-26-143000_story-explanation-agi-timeline/`2. **History (Permanent Archive - Optional):**- - Move to `${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-[agent]_RESEARCH_[slug].md` **ONLY IF:**+ - Move to `${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-[agent]_RESEARCH_[slug].md` **ONLY IF:**- The analysis provides valuable reusable insights about narrative framing- The content analysis reveals patterns applicable to future work- The framing exploration demonstrates particularly effective techniques@@ -142,7 +142,7 @@ ${PAI_DIR}/scratchpad/2025-10-26-143000_story-explanation-agi-timeline/└── final-story-explanation.md # Final output# Only if exceptional:-${PAI_DIR}/history/research/2025-10/2025-10-26-143000_AGENT-default_RESEARCH_agi-timeline-narrative-framing-analysis.md+${PAI_DIR}/History/research/2025-10/2025-10-26-143000_AGENT-default_RESEARCH_agi-timeline-narrative-framing-analysis.md```**Guidelines:**diff --git a/.claude/Skills/StoryExplanation/workflows/Create.md b/.claude/Skills/StoryExplanation/workflows/Create.mdindex 3ebdc438..f993341a 100644--- a/.claude/Skills/StoryExplanation/workflows/Create.md+++ b/.claude/Skills/StoryExplanation/workflows/Create.md@@ -199,7 +199,7 @@ Save final story explanation to scratchpad:- `${PAI_DIR}/scratchpad/YYYY-MM-DD-HHMMSS_story-explanation-[topic]/final-story-explanation.md`**Optional:** If analysis methodology is exceptionally valuable, archive to:-- `${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-default_RESEARCH_[topic]-narrative-framing-analysis.md`+- `${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-default_RESEARCH_[topic]-narrative-framing-analysis.md`Include:- Final story explanationdiff --git a/.claude/Skills/StoryExplanation/workflows/CreateWithLinks.md b/.claude/Skills/StoryExplanation/workflows/CreateWithLinks.mdindex e6816b0f..a35421e9 100644--- a/.claude/Skills/StoryExplanation/workflows/CreateWithLinks.md+++ b/.claude/Skills/StoryExplanation/workflows/CreateWithLinks.md@@ -172,7 +172,7 @@ Present the final story explanation in this format:## STEP 7: Save Output (Optional)If the story explanation is valuable for future reference:-- Save to: `${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`+- Save to: `${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`- Include both the narrative and the source content- Add metadata: date generated, source files, lengthdiff --git a/.claude/Skills/StoryExplanation/workflows/TechnicalStorytellingGemini3.md b/.claude/Skills/StoryExplanation/workflows/TechnicalStorytellingGemini3.mdindex 796112de..00e2bbcc 100644--- a/.claude/Skills/StoryExplanation/workflows/TechnicalStorytellingGemini3.md+++ b/.claude/Skills/StoryExplanation/workflows/TechnicalStorytellingGemini3.md@@ -374,7 +374,7 @@ Save complete technical narrative to scratchpad:**Archive to history if valuable:**```-${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-default_RESEARCH_[topic]-technical-narrative.md+${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD-HHMMSS_AGENT-default_RESEARCH_[topic]-technical-narrative.md```Include:diff --git a/.claude/Skills/StoryExplanation/workflows/storytelling/create-with-links.md b/.claude/Skills/StoryExplanation/workflows/storytelling/create-with-links.mdindex 3aac14fd..3351a706 100644--- a/.claude/Skills/StoryExplanation/workflows/storytelling/create-with-links.md+++ b/.claude/Skills/StoryExplanation/workflows/storytelling/create-with-links.md@@ -196,7 +196,7 @@ Present the final story explanation in this format:## STEP 7: Save Output (Optional)If the story explanation is valuable for future reference:-- Save to: `${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`+- Save to: `${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`- Include: The narrative with inline links + the source content + metadata- Metadata: date generated, source files, length, narrative framing useddiff --git a/.claude/Skills/StoryExplanation/workflows/storytelling/create.md b/.claude/Skills/StoryExplanation/workflows/storytelling/create.mdindex 0f4309ac..4e240326 100644--- a/.claude/Skills/StoryExplanation/workflows/storytelling/create.md+++ b/.claude/Skills/StoryExplanation/workflows/storytelling/create.md@@ -174,7 +174,7 @@ Present the final story explanation in this format:## STEP 7: Save Output (Optional)If the story explanation is valuable for future reference:-- Save to: `${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`+- Save to: `${PAI_DIR}/History/research/YYYY-MM/YYYY-MM-DD_story-explanation-[topic].md`- Include both the narrative and the source content- Add metadata: date generated, source files, lengthdiff --git a/CHANGELOG-2025-11-20.md b/CHANGELOG-2025-11-20.mdindex 57ce9617..eaab4700 100644--- a/CHANGELOG-2025-11-20.md+++ b/CHANGELOG-2025-11-20.md@@ -58,7 +58,7 @@ Major architectural improvements addressing GitHub issues #112, #113, #95, and #- `.claude/Hooks/self-test.ts` - PAI health check system- Tests 12 core guarantees- - Command: `bun ${PAI_DIR}/hooks/self-test.ts`+ - Command: `bun ${PAI_DIR}/Hooks/self-test.ts`- Validates: directories, CORE skill, settings, agents, hooks- Clear pass/fail reporting@@ -94,7 +94,7 @@ Major architectural improvements addressing GitHub issues #112, #113, #95, and #- `.claude/Hooks/pre-commit.template` - Git pre-commit hook- Automatically runs validation before commits- - Installation: `cp .claude/Hooks/pre-commit.template .git/hooks/pre-commit`+ - Installation: `cp .claude/Hooks/pre-commit.template .git/Hooks/pre-commit`- Prevents accidents- `PAI_SYNC_GUIDE.md` - Complete workflow documentation@@ -180,8 +180,8 @@ All systems tested and verified:3. **Install pre-commit hook (optional but recommended):**```bash- cp .claude/Hooks/pre-commit.template .git/hooks/pre-commit- chmod +x .git/hooks/pre-commit+ cp .claude/Hooks/pre-commit.template .git/Hooks/pre-commit+ chmod +x .git/Hooks/pre-commit```4. **Read new documentation:**diff --git a/PAI_CONTRACT.md b/PAI_CONTRACT.mdindex d2d3a42f..8995c75e 100644--- a/PAI_CONTRACT.md+++ b/PAI_CONTRACT.md@@ -137,7 +137,7 @@ Some docs describe:Run this command to verify PAI is working:```bash-bun ${PAI_DIR}/hooks/self-test.ts+bun ${PAI_DIR}/Hooks/self-test.ts```Expected output:diff --git a/PAI_SYNC_GUIDE.md b/PAI_SYNC_GUIDE.mdindex fa382c0c..91e398c5 100644--- a/PAI_SYNC_GUIDE.md+++ b/PAI_SYNC_GUIDE.md@@ -34,7 +34,7 @@ Checks for:- ❌ References to private Kai data- ❌ Secrets or credentials-### 3. **Pre-Commit Hook** (`.git/hooks/pre-commit`)+### 3. **Pre-Commit Hook** (`.git/Hooks/pre-commit`)Automatically runs validation before every commit.---@@ -59,10 +59,10 @@ Ask yourself:### Step 3: Copy to PAI Repo```bash# Example: Copying a new skill-cp -r ${PAI_DIR}/skills/new-skill ~/Projects/PAI/.claude/Skills/+cp -r ${PAI_DIR}/Skills/new-skill ~/Projects/PAI/.claude/Skills/# Example: Updating a hook-cp ${PAI_DIR}/hooks/some-hook.ts ~/Projects/PAI/.claude/Hooks/+cp ${PAI_DIR}/Hooks/some-hook.ts ~/Projects/PAI/.claude/Hooks/```**IMPORTANT:** Do NOT use `cp -r ~/.claude ~/Projects/PAI/` (don't bulk copy everything)@@ -200,8 +200,8 @@ The pre-commit hook is NOT installed by default (to avoid interfering with otherTo install:```bashcd ~/Projects/PAI-cp .claude/Hooks/pre-commit.template .git/hooks/pre-commit-chmod +x .git/hooks/pre-commit+cp .claude/Hooks/pre-commit.template .git/Hooks/pre-commit+chmod +x .git/Hooks/pre-commit```Now validation runs automatically before every commit.@@ -292,7 +292,7 @@ Complete example of adding a new skill from Kai to PAI:```bash# 1. Copy skill from Kai to PAI-cp -r ${PAI_DIR}/skills/my-new-skill ~/Projects/PAI/.claude/Skills/+cp -r ${PAI_DIR}/Skills/my-new-skill ~/Projects/PAI/.claude/Skills/# 2. Sanitize the skill's SKILL.mdcd ~/Projects/PAI/.claude/Skills/my-new-skill