⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
refactor: Rebrand from kai-* to pai-* naming across all packs
Daniel Miessler0faf5e4108db
diff --git a/Bundles/Kai/README.md b/Bundles/Official/README.mdsimilarity index 76%rename from Bundles/Kai/README.mdrename to Bundles/Official/README.mdindex 1be872ba..e6e346f6 100644--- a/Bundles/Kai/README.md+++ b/Bundles/Official/README.md@@ -1,14 +1,16 @@<p align="center">- <img src="kai.png" alt="The Official PAI (Kai) Bundle" width="256">+ <img src="pai-bundle.png" alt="The Official PAI Bundle" width="256"></p>-# The Official PAI (Kai) Bundle v2.0.0+# The Official PAI Bundle v2.1.0-> **FOR AI AGENTS:** You are about to install the complete Kai bundle. Run the wizard, then install each pack in order.+> **FOR AI AGENTS:** You are about to install the complete PAI bundle. Run the wizard, then install each pack in order.++**Origin:** This bundle is extracted from Daniel Miessler's production Kai system - a battle-tested Personal AI Infrastructure that has been refined through daily use since 2024.----## 🚨 CRITICAL: Full Implementation Required (For AI Agents)+## CRITICAL: Full Implementation Required (For AI Agents)> **MANDATORY: Read this section before installing ANY pack in this bundle.**@@ -43,13 +45,13 @@ AI agents systematically create "simplified" versions of pack implementations. I**After ALL packs are installed, confirm:**```markdown-## Kai Bundle Installation Complete+## PAI Bundle Installation Complete### Pack Status-- [ ] kai-hook-system - FULLY installed, verified-- [ ] kai-history-system - FULLY installed, verified-- [ ] kai-core-install - FULLY installed, verified-- [ ] kai-voice-system - FULLY installed, verified (if applicable)+- [ ] pai-hook-system - FULLY installed, verified+- [ ] pai-history-system - FULLY installed, verified+- [ ] pai-core-install - FULLY installed, verified+- [ ] pai-voice-system - FULLY installed, verified (if applicable)### Integration Status- [ ] ~/.claude directory structure correct@@ -110,7 +112,7 @@ Update mode will:## What This Bundle Provides-When fully installed, the Kai bundle gives you:+When fully installed, the PAI bundle gives you:- A custom **History system** - Automatically captures sessions, decisions, learnings, and research- A custom set of **Hooks** - Event-driven automation that triggers on session start, tool use, and task completion@@ -127,21 +129,23 @@ When fully installed, the Kai bundle gives you:| # | Pack | Purpose | Dependencies ||---|------|---------|--------------|-| 1 | [kai-hook-system](../../Packs/kai-hook-system/) | Event-driven automation | None |-| 2 | [kai-history-system](../../Packs/kai-history-system/) | Memory and capture | Hooks |-| 3 | [kai-core-install](../../Packs/kai-core-install/) | Skills + Identity + Architecture | Hooks, History |-| 4 | [kai-prompting-skill](../../Packs/kai-prompting-skill/) | Meta-prompting & templates | Core |-| 5 | [kai-voice-system](../../Packs/kai-voice-system/) | Voice notifications (optional) | Hooks, Core |-| 6 | [kai-agents-skill](../../Packs/kai-agents-skill/) | Dynamic agent composition (optional) | Core, Voice (optional) |-| 7 | [kai-art-skill](../../Packs/kai-art-skill/) | Visual content generation (optional) | Core |-| 8 | [kai-observability-server](../../Packs/kai-observability-server/) | Multi-agent monitoring (optional) | Hooks |+| 1 | [pai-hook-system](../../Packs/pai-hook-system/) | Event-driven automation | None |+| 2 | [pai-history-system](../../Packs/pai-history-system/) | Memory and capture | Hooks |+| 3 | [pai-core-install](../../Packs/pai-core-install/) | Skills + Identity + Architecture | Hooks, History |+| 4 | [pai-prompting-skill](../../Packs/pai-prompting-skill/) | Meta-prompting & templates | Core |+| 5 | [pai-voice-system](../../Packs/pai-voice-system/) | Voice notifications (optional) | Hooks, Core |+| 6 | [pai-agents-skill](../../Packs/pai-agents-skill/) | Dynamic agent composition (optional) | Core, Voice (optional) |+| 7 | [pai-art-skill](../../Packs/pai-art-skill/) | Visual content generation (optional) | Core |+| 8 | [pai-observability-server](../../Packs/pai-observability-server/) | Multi-agent monitoring (optional) | Hooks |+| 9 | [pai-upgrades-skill](../../Packs/pai-upgrades-skill/) | Track and implement system upgrades (optional) | Core |+| 10 | [pai-browser-skill](../../Packs/pai-browser-skill/) | Browser automation (optional) | Core |### How to Install PacksGive each pack directory to your AI and ask it to install:```-"Install the kai-hook-system pack from PAI/Packs/kai-hook-system/"+"Install the pai-hook-system pack from PAI/Packs/pai-hook-system/"```The AI will:@@ -213,15 +217,15 @@ mv ~/.claude-BACKUP ~/.claude- `VERIFY.md` - Mandatory verification checklist- `src/` - Actual source code files (TypeScript, YAML, etc.)-For example, `kai-hook-system` provides an entire event-driven automation framework with all code files ready to copy.+For example, `pai-hook-system` provides an entire event-driven automation framework with all code files ready to copy.-**Bundles** are curated combinations of packs designed to work together. The Kai Bundle is 8 packs that form a complete AI infrastructure (4 required + 4 optional).+**Bundles** are curated combinations of packs designed to work together. The Official PAI Bundle is 10 packs that form a complete AI infrastructure (4 required + 6 optional).---## The 14 Founding Principles-The Kai system embeds these principles from [PAI](https://danielmiessler.com/blog/personal-ai-infrastructure):+The PAI system embeds these principles from [Personal AI Infrastructure](https://danielmiessler.com/blog/personal-ai-infrastructure):1. **Clear Thinking + Prompting is King** - Good prompts come from clear thinking2. **Scaffolding > Model** - Architecture matters more than which model@@ -231,22 +235,29 @@ The Kai system embeds these principles from [PAI](https://danielmiessler.com/blo6. **UNIX Philosophy** - Do one thing well, make tools composable7. **ENG / SRE Principles** - Treat AI infrastructure like production software8. **CLI as Interface** - Command-line is faster and more reliable-9. **Goal → Code → CLI → Prompts → Agents** - The decision hierarchy+9. **Goal -> Code -> CLI -> Prompts -> Agents** - The decision hierarchy10. **Meta / Self Update System** - Encode learnings so you never forget11. **Custom Skill Management** - Modular capabilities that route intelligently12. **Custom History System** - Everything worth knowing gets captured13. **Custom Agent Personalities** - Different work needs different approaches-14. **Science as Cognitive Loop** - Hypothesis → Experiment → Measure → Iterate+14. **Science as Cognitive Loop** - Hypothesis -> Experiment -> Measure -> Iterate---## Changelog+### 2.1.0 - 2026-01-08+- **Rebranded to PAI:** All packs renamed from pai-* to pai-* for consistency with project name+- **New Pack:** Added pai-upgrades-skill for tracking Anthropic ecosystem updates+- **New Pack:** Added pai-browser-skill for web automation and verification+- **Bundle renamed:** "Kai Bundle" -> "Official PAI Bundle"+- **Origin preserved:** Bundle documentation notes extraction from Daniel Miessler's Kai system+### 2.0.0 - 2025-12-31- **Directory-based Packs:** All packs migrated from single markdown files to directory structure- **New Pack Format:** Each pack now contains README.md, INSTALL.md, VERIFY.md, and src/ directory- **Actual Code Files:** Source code now in real .ts, .yaml, .hbs files (not embedded in markdown)-- **Four New Packs:** Added kai-prompting-skill, kai-agents-skill, kai-art-skill, kai-observability-server+- **Four New Packs:** Added pai-prompting-skill, pai-agents-skill, pai-art-skill, pai-observability-server- **Improved Installation:** AI agents copy actual files instead of extracting from markdown blocks### 1.2.0 - 2025-12-30@@ -271,4 +282,4 @@ The Kai system embeds these principles from [PAI](https://danielmiessler.com/blo## Credits**Author:** Daniel Miessler-**Origin:** Extracted from production Kai system (2024-2025)+**Origin:** Extracted from production Kai system (2024-2026)diff --git a/Bundles/Kai/install.ts b/Bundles/Official/install.tssimilarity index 100%rename from Bundles/Kai/install.tsrename to Bundles/Official/install.tsdiff --git a/Bundles/Kai/kai.png b/Bundles/Official/pai-bundle.pngsimilarity index 100%rename from Bundles/Kai/kai.pngrename to Bundles/Official/pai-bundle.pngdiff --git a/Bundles/README.md b/Bundles/README.mdindex 66e938d4..a751b164 100644--- a/Bundles/README.md+++ b/Bundles/README.md@@ -65,7 +65,7 @@ A **bundle** is a curated collection of PAI packs designed to work together as a- `VERIFY.md` - Mandatory verification checklist- `src/` - Actual source code files (TypeScript, YAML, etc.)-For example, `kai-hook-system` provides an entire event-driven automation framework with all code files ready to copy.+For example, `pai-hook-system` provides an entire event-driven automation framework with all code files ready to copy.**Bundles** are combinations of packs that work exceptionally well together—a harmonious system from a single author or unified around a single theme. The packs in a bundle were designed to integrate seamlessly, creating emergent capabilities greater than the sum of their parts.diff --git a/INSTALL.md b/INSTALL.mdindex e1a001eb..92592e52 100644--- a/INSTALL.md+++ b/INSTALL.md@@ -94,17 +94,17 @@ Explain the concepts of Bundles and Packs:> Bundles are curated collections of packs that work well together. Instead of choosing packs one-by-one, a bundle gives you a complete, tested experience.**Ask: How would you like to proceed?**-- **Install the Kai Bundle** (Recommended) — The complete PAI experience with all core capabilities+- **Install the PAI Bundle** (Recommended) — The complete PAI experience with all core capabilities- **Browse individual packs** — Choose specific capabilities you want- **Minimal install** — Just the basics to get started----#### Phase 4: The Kai Bundle (If Selected)+#### Phase 4: The PAI Bundle (If Selected)-If they chose the Kai Bundle, explain what's included:+If they chose the PAI Bundle, explain what's included:-**The Kai Bundle includes:**+**The PAI Bundle includes:**| Pack | What It Does ||------|--------------|@@ -114,7 +114,7 @@ If they chose the Kai Bundle, explain what's included:| **Voice System** | Spoken notifications via text-to-speech || **Browser Skill** | Web automation for testing and verification |-**Ask: Ready to install the Kai Bundle?**+**Ask: Ready to install the PAI Bundle?**- Yes, install everything- Tell me more about each pack first- I want to customize which packs to include@@ -131,11 +131,11 @@ For each pack being installed:4. **Confirm success** before moving to the next pack**Installation order matters.** Install in this sequence:-1. kai-hook-system (foundation)-2. kai-core-install (identity and routing)-3. kai-history-system (memory)-4. kai-voice-system (optional)-5. kai-browser-skill (optional)+1. pai-hook-system (foundation)+2. pai-core-install (identity and routing)+3. pai-history-system (memory)+4. pai-voice-system (optional)+5. pai-browser-skill (optional)---@@ -180,8 +180,8 @@ If you prefer to install PAI yourself without AI assistance:git clone https://github.com/danielmiessler/PAI.gitcd PAI-# Run the Kai Bundle installer-cd Bundles/Kai+# Run the PAI Bundle installer+cd Bundles/Officialbun run install.ts```@@ -197,7 +197,7 @@ Each pack in `Packs/` has its own installation:```bash# Example: Install just the history system-cd Packs/kai-history-system+cd Packs/pai-history-system# Read INSTALL.md and follow instructions# Or give the directory to your AI```diff --git a/PACKS.md b/PACKS.mdindex 3503a56a..ea42e027 100644--- a/PACKS.md+++ b/PACKS.md@@ -75,7 +75,7 @@ Skill packs are invoked BY the AI when it detects relevant triggers.System packs are installed BY humans and provide infrastructure. They are NOT incomplete for lacking SKILL.md - that's by design.-**System packs:** kai-hook-system, kai-history-system, kai-voice-system, kai-observability-server+**System packs:** pai-hook-system, pai-history-system, pai-voice-system, pai-observability-server---@@ -88,7 +88,7 @@ System packs are installed BY humans and provide infrastructure. They are NOT in- Agent orchestration (multi-agent coordination)- Hook systems (event-driven automation)-**Example:** The Kai History System pack adds automatic context-tracking with 4 hooks, 3 library files, and complete settings.json configuration.+**Example:** The PAI History System pack adds automatic context-tracking with 4 hooks, 3 library files, and complete settings.json configuration.### Skill Packs@@ -255,23 +255,23 @@ Browse all packs: [Packs/](Packs/)| Pack | Type | Description ||------|------|-------------|-| [kai-hook-system](Packs/kai-hook-system.md) | Foundation | Event-driven automation framework for hook-based capabilities |-| [kai-history-system](Packs/kai-history-system.md) | Infrastructure | Automatic context-tracking for all work, decisions, and learnings |-| [kai-core-install](Packs/kai-core-install.md) | Core | Skills + Identity + Architecture - complete foundation pack |-| [kai-voice-system](Packs/kai-voice-system.md) | Notifications | Voice output with ElevenLabs TTS and prosody enhancement |-| [kai-observability-server](Packs/kai-observability-server.md) | Observability | Real-time multi-agent monitoring dashboard |+| [pai-hook-system](Packs/pai-hook-system.md) | Foundation | Event-driven automation framework for hook-based capabilities |+| [pai-history-system](Packs/pai-history-system.md) | Infrastructure | Automatic context-tracking for all work, decisions, and learnings |+| [pai-core-install](Packs/pai-core-install.md) | Core | Skills + Identity + Architecture - complete foundation pack |+| [pai-voice-system](Packs/pai-voice-system.md) | Notifications | Voice output with ElevenLabs TTS and prosody enhancement |+| [pai-observability-server](Packs/pai-observability-server.md) | Observability | Real-time multi-agent monitoring dashboard |### Skill Packs| Pack | Type | Description ||------|------|-------------|-| [kai-art-skill](Packs/kai-art-skill.md) | Skill | Visual content generation with charcoal architectural sketch aesthetic |-| [kai-agents-skill](Packs/kai-agents-skill.md) | Skill | Dynamic agent composition with specialized personalities and voices |-| [kai-prompting-skill](Packs/kai-prompting-skill.md) | Skill | Meta-prompting system for programmatic prompt generation |+| [pai-art-skill](Packs/pai-art-skill.md) | Skill | Visual content generation with charcoal architectural sketch aesthetic |+| [pai-agents-skill](Packs/pai-agents-skill.md) | Skill | Dynamic agent composition with specialized personalities and voices |+| [pai-prompting-skill](Packs/pai-prompting-skill.md) | Skill | Meta-prompting system for programmatic prompt generation |**Installation order:** hooks → history → core-install → voice → observability (optional) → skill packs-**Or install the complete [Kai Bundle](Bundles/Kai/)** which handles ordering automatically.+**Or install the complete [PAI Bundle](Bundles/Official/)** which handles ordering automatically.---diff --git a/PLATFORM.md b/PLATFORM.mdindex 36c0e05b..ff7bca6a 100644--- a/PLATFORM.md+++ b/PLATFORM.md@@ -23,18 +23,18 @@ This document tracks all platform-specific code and dependencies across PAI, pro**Critical Blockers:**1. ✅ `sed -i ''` syntax (macOS BSD vs GNU sed)- - **File:** `Packs/kai-voice-system/INSTALL.md` line 337+ - **File:** `Packs/pai-voice-system/INSTALL.md` line 337- **Fix:** Platform-aware sed with USERNAME fallback- **Status:** Fixed with conditional `uname -s` detection2. ✅ `/opt/homebrew/bin` hardcoded in PATH- - **Files:** `kai-observability-server/src/observability/manage.sh:8`, `kai-observability-server.md:1316`+ - **Files:** `pai-observability-server/src/observability/manage.sh:8`, `pai-observability-server.md:1316`- **Fix:** Conditional PATH based on directory existence- **Status:** Fixed with `[ -d "/opt/homebrew/bin" ]` check**Auto-Start Feature Parity:**3. ✅ LaunchAgent plist only (no Linux alternative)- - **File:** `Packs/kai-voice-system/INSTALL.md` Step 9+ - **File:** `Packs/pai-voice-system/INSTALL.md` Step 9- **Fix:** Added systemd user service for Linux- **Status:** Linux now has full auto-start support@@ -50,7 +50,7 @@ This document tracks all platform-specific code and dependencies across PAI, pro**Documentation:**6. ✅ VERIFY.md misleading "requires modifications" warning- - **File:** `Packs/kai-voice-system/VERIFY.md` lines 11-13+ - **File:** `Packs/pai-voice-system/VERIFY.md` lines 11-13- **Fix:** Updated to reflect Linux is fully supported- **Status:** Documentation now accurate@@ -60,7 +60,7 @@ This document tracks all platform-specific code and dependencies across PAI, pro**Audio Playback (Fixed in PR #285 - Google TTS):**17. ✅ afplay calls conditionally executed- - **File:** `Packs/kai-voice-system/src/voice/server.ts:286-336`+ - **File:** `Packs/pai-voice-system/src/voice/server.ts:286-336`- **Status:** Runtime platform detection via `process.platform`- **Implementation:** macOS uses afplay, Linux auto-detects mpg123/mpv/snap@@ -87,7 +87,7 @@ This document tracks all platform-specific code and dependencies across PAI, pro**Documentation Inconsistencies:**7. 🔮 Platform check mentions paplay but code doesn't use it- - **File:** `Packs/kai-voice-system/INSTALL.md` platform check+ - **File:** `Packs/pai-voice-system/INSTALL.md` platform check- **Impact:** Minor - doesn't block functionality- **Fix:** Either add paplay support or remove from docs- **Priority:** Low - mpg123/mpv work finediff --git a/Packs/README.md b/Packs/README.mdindex 41409f90..8928673e 100644--- a/Packs/README.md+++ b/Packs/README.md@@ -168,15 +168,15 @@ PAI System| Pack | Version | Category | Description ||------|---------|----------|-------------|-| [**kai-hook-system**](kai-hook-system/) | 1.0.0 | Foundation | Event-driven automation framework - the foundation for all hook-based capabilities |-| [**kai-history-system**](kai-history-system/) | 1.0.0 | Infrastructure | Granular context-tracking that captures all work, decisions, and learnings automatically |-| [**kai-core-install**](kai-core-install/) | 1.0.0 | Core | Skills + Identity + Architecture - the complete foundation with routing, response format, and tracking |-| [**kai-voice-system**](kai-voice-system/) | 1.1.0 | Notifications | Voice notifications with ElevenLabs TTS and prosody enhancement for natural speech |-| [**kai-observability-server**](kai-observability-server/) | 1.0.0 | Observability | Real-time multi-agent monitoring dashboard with WebSocket streaming |-| [**kai-art-skill**](kai-art-skill/) | 1.0.0 | Creativity | Visual content generation with Excalidraw hand-drawn aesthetic - diagrams, comics, illustrations |-| [**kai-agents-skill**](kai-agents-skill/) | 1.0.0 | Delegation | Dynamic agent composition - create custom agents with unique personalities, voices, and trait combinations |-| [**kai-prompting-skill**](kai-prompting-skill/) | 1.0.0 | Methodology | Meta-prompting system with Handlebars templates, Claude 4.x best practices, and the Ultimate Prompt Template |-| [**kai-browser-skill**](kai-browser-skill/) | 1.2.0 | Automation | Debug-first browser automation with Playwright - always-on diagnostics, session auto-start, 99% token savings |+| [**pai-hook-system**](pai-hook-system/) | 1.0.0 | Foundation | Event-driven automation framework - the foundation for all hook-based capabilities |+| [**pai-history-system**](pai-history-system/) | 1.0.0 | Infrastructure | Granular context-tracking that captures all work, decisions, and learnings automatically |+| [**pai-core-install**](pai-core-install/) | 1.0.0 | Core | Skills + Identity + Architecture - the complete foundation with routing, response format, and tracking |+| [**pai-voice-system**](pai-voice-system/) | 1.1.0 | Notifications | Voice notifications with ElevenLabs TTS and prosody enhancement for natural speech |+| [**pai-observability-server**](pai-observability-server/) | 1.0.0 | Observability | Real-time multi-agent monitoring dashboard with WebSocket streaming |+| [**pai-art-skill**](pai-art-skill/) | 1.0.0 | Creativity | Visual content generation with Excalidraw hand-drawn aesthetic - diagrams, comics, illustrations |+| [**pai-agents-skill**](pai-agents-skill/) | 1.0.0 | Delegation | Dynamic agent composition - create custom agents with unique personalities, voices, and trait combinations |+| [**pai-prompting-skill**](pai-prompting-skill/) | 1.0.0 | Methodology | Meta-prompting system with Handlebars templates, Claude 4.x best practices, and the Ultimate Prompt Template |+| [**pai-browser-skill**](pai-browser-skill/) | 1.2.0 | Automation | Debug-first browser automation with Playwright - always-on diagnostics, session auto-start, 99% token savings |---@@ -185,15 +185,15 @@ PAI SystemPacks have dependencies. Install in this order:```-1. kai-hook-system ← Foundation (no dependencies)-2. kai-history-system ← Depends on hooks-3. kai-core-install ← Depends on hooks, history-4. kai-prompting-skill ← Depends on core-install-5. kai-voice-system ← Depends on hooks, core-install-6. kai-agents-skill ← Depends on core-install, optional voice-system-7. kai-art-skill ← Depends on core-install-8. kai-browser-skill ← Optional, standalone (only needs Bun + Playwright)-9. kai-observability-server ← Optional, depends on hooks+1. pai-hook-system ← Foundation (no dependencies)+2. pai-history-system ← Depends on hooks+3. pai-core-install ← Depends on hooks, history+4. pai-prompting-skill ← Depends on core-install+5. pai-voice-system ← Depends on hooks, core-install+6. pai-agents-skill ← Depends on core-install, optional voice-system+7. pai-art-skill ← Depends on core-install+8. pai-browser-skill ← Optional, standalone (only needs Bun + Playwright)+9. pai-observability-server ← Optional, depends on hooks```**Or install the complete [Kai Bundle](../Bundles/Kai/)** which handles ordering automatically.@@ -207,7 +207,7 @@ Packs have dependencies. Install in this order:Give the pack directory to your AI agent:```-Install the kai-hook-system pack from PAI/Packs/kai-hook-system/.+Install the pai-hook-system pack from PAI/Packs/pai-hook-system/.Use PAI_DIR="~/.config/pai" and DA="MyAI".```@@ -290,7 +290,7 @@ Every pack in this directory must be:If you have existing single-file packs:-1. Create directory with pack name (e.g., `kai-hook-system/`)+1. Create directory with pack name (e.g., `pai-hook-system/`)2. Extract frontmatter and overview sections to `README.md`3. Extract installation steps to `INSTALL.md`4. Extract verification steps to `VERIFY.md`diff --git a/Packs/icons/kai-art-skill.png b/Packs/icons/pai-art-skill.pngsimilarity index 100%rename from Packs/icons/kai-art-skill.pngrename to Packs/icons/pai-art-skill.pngdiff --git a/Packs/icons/kai-core-install.png b/Packs/icons/pai-core-install.pngsimilarity index 100%rename from Packs/icons/kai-core-install.pngrename to Packs/icons/pai-core-install.pngdiff --git a/Packs/icons/kai-history-system.png b/Packs/icons/pai-history-system.pngsimilarity index 100%rename from Packs/icons/kai-history-system.pngrename to Packs/icons/pai-history-system.pngdiff --git a/Packs/icons/kai-hook-system.png b/Packs/icons/pai-hook-system.pngsimilarity index 100%rename from Packs/icons/kai-hook-system.pngrename to Packs/icons/pai-hook-system.pngdiff --git a/Packs/icons/kai-observability-server-v2.png b/Packs/icons/pai-observability-server-v2.pngsimilarity index 100%rename from Packs/icons/kai-observability-server-v2.pngrename to Packs/icons/pai-observability-server-v2.pngdiff --git a/Packs/icons/kai-prompting-skill.png b/Packs/icons/pai-prompting-skill.pngsimilarity index 100%rename from Packs/icons/kai-prompting-skill.pngrename to Packs/icons/pai-prompting-skill.pngdiff --git a/Packs/icons/kai-skill-system-v3.png b/Packs/icons/pai-skill-system-v3.pngsimilarity index 100%rename from Packs/icons/kai-skill-system-v3.pngrename to Packs/icons/pai-skill-system-v3.pngdiff --git a/Packs/icons/pai-upgrades-skill.png b/Packs/icons/pai-upgrades-skill.pngnew file mode 100644index 00000000..2fdf39beBinary files /dev/null and b/Packs/icons/pai-upgrades-skill.png differdiff --git a/Packs/icons/kai-voice-system-v2.png b/Packs/icons/pai-voice-system-v2.pngsimilarity index 100%rename from Packs/icons/kai-voice-system-v2.pngrename to Packs/icons/pai-voice-system-v2.pngdiff --git a/Packs/kai-history-system/src/lib/metadata-extraction.ts b/Packs/kai-history-system/src/lib/metadata-extraction.tsdeleted file mode 100644index ab5aa940..00000000--- a/Packs/kai-history-system/src/lib/metadata-extraction.ts+++ /dev/null@@ -1,75 +0,0 @@-// $PAI_DIR/hooks/lib/metadata-extraction.ts-// Extract agent instance metadata from Task tool calls--export interface AgentInstanceMetadata {- agent_instance_id?: string;- agent_type?: string;- instance_number?: number;- parent_session_id?: string;- parent_task_id?: string;-}--/**- * Extract agent instance ID from Task tool input- */-export function extractAgentInstanceId(- toolInput: any,- description?: string-): AgentInstanceMetadata {- const result: AgentInstanceMetadata = {};-- // Strategy 1: Extract from description [agent-type-N]- if (description) {- const descMatch = description.match(/\[([a-z-]+-researcher)-(\d+)\]/);- if (descMatch) {- result.agent_type = descMatch[1];- result.instance_number = parseInt(descMatch[2], 10);- result.agent_instance_id = `${result.agent_type}-${result.instance_number}`;- }- }-- // Strategy 2: Extract from prompt [AGENT_INSTANCE: ...]- if (!result.agent_instance_id && toolInput?.prompt && typeof toolInput.prompt === 'string') {- const promptMatch = toolInput.prompt.match(/\[AGENT_INSTANCE:\s*([^\]]+)\]/);- if (promptMatch) {- result.agent_instance_id = promptMatch[1].trim();- const parts = result.agent_instance_id.match(/^([a-z-]+)-(\d+)$/);- if (parts) {- result.agent_type = parts[1];- result.instance_number = parseInt(parts[2], 10);- }- }- }-- // Strategy 3: Fallback to subagent_type- if (!result.agent_type && toolInput?.subagent_type) {- result.agent_type = toolInput.subagent_type;- }-- return result;-}--/**- * Enrich event with agent metadata- */-export function enrichEventWithAgentMetadata(- event: any,- toolInput: any,- description?: string-): any {- const metadata = extractAgentInstanceId(toolInput, description);- const enrichedEvent = { ...event };-- if (metadata.agent_instance_id) enrichedEvent.agent_instance_id = metadata.agent_instance_id;- if (metadata.agent_type) enrichedEvent.agent_type = metadata.agent_type;- if (metadata.instance_number !== undefined) enrichedEvent.instance_number = metadata.instance_number;-- return enrichedEvent;-}--/**- * Check if a tool call is spawning a subagent- */-export function isAgentSpawningCall(toolName: string, toolInput: any): boolean {- return toolName === 'Task' && toolInput?.subagent_type !== undefined;-}diff --git a/Packs/kai-hook-system/src/lib/observability.ts b/Packs/kai-hook-system/src/lib/observability.tsdeleted file mode 100644index 2683be6f..00000000--- a/Packs/kai-hook-system/src/lib/observability.ts+++ /dev/null@@ -1,58 +0,0 @@-// $PAI_DIR/hooks/lib/observability.ts-// Sends hook events to observability dashboards--export interface ObservabilityEvent {- source_app: string;- session_id: string;- hook_event_type: 'PreToolUse' | 'PostToolUse' | 'UserPromptSubmit' | 'Notification' | 'Stop' | 'SubagentStop' | 'SessionStart' | 'SessionEnd' | 'PreCompact';- timestamp: string;- transcript_path?: string;- summary?: string;- tool_name?: string;- tool_input?: any;- tool_output?: any;- agent_type?: string;- model?: string;- [key: string]: any;-}--/**- * Send event to observability dashboard- * Fails silently if dashboard is not running - doesn't block hook execution- */-export async function sendEventToObservability(event: ObservabilityEvent): Promise<void> {- const dashboardUrl = process.env.PAI_OBSERVABILITY_URL || 'http://localhost:4000/events';-- try {- const response = await fetch(dashboardUrl, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- 'User-Agent': 'PAI-Hook/1.0'- },- body: JSON.stringify(event),- });-- if (!response.ok) {- // Log error but don't throw - dashboard may be offline- console.error(`Observability server returned status: ${response.status}`);- }- } catch (error) {- // Fail silently - dashboard may not be running- // This is intentional - hooks should never fail due to observability issues- }-}--/**- * Helper to get current timestamp in ISO format- */-export function getCurrentTimestamp(): string {- return new Date().toISOString();-}--/**- * Helper to get source app name from environment- */-export function getSourceApp(): string {- return process.env.PAI_SOURCE_APP || process.env.DA || 'PAI';-}diff --git a/Packs/kai-observability-server/src/hooks/capture-all-events.ts b/Packs/kai-observability-server/src/hooks/capture-all-events.tsdeleted file mode 100644index fa335be9..00000000--- a/Packs/kai-observability-server/src/hooks/capture-all-events.ts+++ /dev/null@@ -1,148 +0,0 @@-#!/usr/bin/env bun-// $PAI_DIR/hooks/capture-all-events.ts-// Captures ALL Claude Code hook events to JSONL--import { readFileSync, appendFileSync, mkdirSync, existsSync, writeFileSync } from 'fs';-import { join } from 'path';-import { homedir } from 'os';-import { enrichEventWithAgentMetadata, isAgentSpawningCall } from './lib/metadata-extraction';--interface HookEvent {- source_app: string;- session_id: string;- hook_event_type: string;- payload: Record<string, any>;- timestamp: number;- timestamp_local: string;-}--function getLocalTimestamp(): string {- const date = new Date();- const tz = process.env.TIME_ZONE || Intl.DateTimeFormat().resolvedOptions().timeZone;-- try {- const localDate = new Date(date.toLocaleString('en-US', { timeZone: tz }));- const year = localDate.getFullYear();- const month = String(localDate.getMonth() + 1).padStart(2, '0');- const day = String(localDate.getDate()).padStart(2, '0');- const hours = String(localDate.getHours()).padStart(2, '0');- const minutes = String(localDate.getMinutes()).padStart(2, '0');- const seconds = String(localDate.getSeconds()).padStart(2, '0');- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;- } catch {- return new Date().toISOString();- }-}--function getEventsFilePath(): string {- const paiDir = process.env.PAI_DIR || join(homedir(), '.config', 'pai');- const now = new Date();- const tz = process.env.TIME_ZONE || Intl.DateTimeFormat().resolvedOptions().timeZone;- const localDate = new Date(now.toLocaleString('en-US', { timeZone: tz }));-- const year = localDate.getFullYear();- const month = String(localDate.getMonth() + 1).padStart(2, '0');- const day = String(localDate.getDate()).padStart(2, '0');-- const monthDir = join(paiDir, 'history', 'raw-outputs', `${year}-${month}`);-- if (!existsSync(monthDir)) {- mkdirSync(monthDir, { recursive: true });- }-- return join(monthDir, `${year}-${month}-${day}_all-events.jsonl`);-}--function getSessionMappingFile(): string {- const paiDir = process.env.PAI_DIR || join(homedir(), '.config', 'pai');- return join(paiDir, 'agent-sessions.json');-}--function getAgentForSession(sessionId: string): string {- try {- const mappingFile = getSessionMappingFile();- if (existsSync(mappingFile)) {- const mappings = JSON.parse(readFileSync(mappingFile, 'utf-8'));- return mappings[sessionId] || process.env.DA || 'main';- }- } catch {- // Ignore errors- }- return process.env.DA || 'main';-}--function setAgentForSession(sessionId: string, agentName: string): void {- try {- const mappingFile = getSessionMappingFile();- let mappings: Record<string, string> = {};-- if (existsSync(mappingFile)) {- mappings = JSON.parse(readFileSync(mappingFile, 'utf-8'));- }-- mappings[sessionId] = agentName;- writeFileSync(mappingFile, JSON.stringify(mappings, null, 2), 'utf-8');- } catch {- // Silently fail- }-}--async function main() {- try {- const args = process.argv.slice(2);- const eventTypeIndex = args.indexOf('--event-type');-- if (eventTypeIndex === -1) {- console.error('Missing --event-type argument');- process.exit(0);- }-- const eventType = args[eventTypeIndex + 1];- const stdinData = await Bun.stdin.text();- const hookData = JSON.parse(stdinData);-- const sessionId = hookData.session_id || 'main';- let agentName = getAgentForSession(sessionId);-- // Update agent mapping based on event type- if (hookData.tool_name === 'Task' && hookData.tool_input?.subagent_type) {- agentName = hookData.tool_input.subagent_type;- setAgentForSession(sessionId, agentName);- } else if (eventType === 'SubagentStop' || eventType === 'Stop') {- agentName = process.env.DA || 'main';- setAgentForSession(sessionId, agentName);- } else if (process.env.CLAUDE_CODE_AGENT) {- agentName = process.env.CLAUDE_CODE_AGENT;- setAgentForSession(sessionId, agentName);- } else if (hookData.agent_type) {- agentName = hookData.agent_type;- setAgentForSession(sessionId, agentName);- }-- let event: HookEvent = {- source_app: agentName,- session_id: hookData.session_id || 'main',- hook_event_type: eventType,- payload: hookData,- timestamp: Date.now(),- timestamp_local: getLocalTimestamp()- };-- // Enrich with agent instance metadata for Task calls- if (isAgentSpawningCall(hookData.tool_name, hookData.tool_input)) {- event = enrichEventWithAgentMetadata(event, hookData.tool_input, hookData.description);- }-- // Append to events file- const eventsFile = getEventsFilePath();- const jsonLine = JSON.stringify(event) + '\n';- appendFileSync(eventsFile, jsonLine, 'utf-8');-- } catch (error) {- console.error('Event capture error:', error);- }-- process.exit(0);-}--main();diff --git a/Packs/kai-observability-server/src/observability/manage.sh b/Packs/kai-observability-server/src/observability/manage.shdeleted file mode 100644index f753d62e..00000000--- a/Packs/kai-observability-server/src/observability/manage.sh+++ /dev/null@@ -1,113 +0,0 @@-#!/bin/bash-# $PAI_DIR/observability/manage.sh-# Observability Dashboard Manager--SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"--# Ensure bun is in PATH-# Only add Homebrew path if it exists (macOS-specific)-if [ -d "/opt/homebrew/bin" ]; then- export PATH="$HOME/.bun/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"-else- export PATH="$HOME/.bun/bin:/usr/local/bin:$PATH"-fi--case "${1:-}" in- start)- if lsof -Pi :4000 -sTCP:LISTEN -t >/dev/null 2>&1; then- echo "Already running. Use: manage.sh restart"- exit 1- fi-- # Start server- cd "$SCRIPT_DIR/apps/server"- bun run dev >/dev/null 2>&1 &- SERVER_PID=$!-- # Wait for server- for i in {1..10}; do- curl -s http://localhost:4000/health >/dev/null 2>&1 && break- sleep 1- done-- # Start client- cd "$SCRIPT_DIR/apps/client"- bun run dev >/dev/null 2>&1 &- CLIENT_PID=$!-- # Wait for client- for i in {1..10}; do- curl -s http://localhost:5172 >/dev/null 2>&1 && break- sleep 1- done-- echo "Observability running at http://localhost:5172"-- cleanup() {- kill $SERVER_PID $CLIENT_PID 2>/dev/null- exit 0- }- trap cleanup INT- wait $SERVER_PID $CLIENT_PID- ;;-- stop)- SERVER_PID=$(lsof -ti :4000 2>/dev/null)- CLIENT_PID=$(lsof -ti :5172 2>/dev/null)-- [ -n "$SERVER_PID" ] && kill -9 $SERVER_PID 2>/dev/null- [ -n "$CLIENT_PID" ] && kill -9 $CLIENT_PID 2>/dev/null-- pkill -9 -f "observability/apps/(server|client)" 2>/dev/null-- sleep 0.5- echo "Observability stopped"- ;;-- restart)- echo "Restarting..."- "$0" stop 2>/dev/null- sleep 2- exec "$0" start- ;;-- status)- if lsof -Pi :4000 -sTCP:LISTEN -t >/dev/null 2>&1; then- echo "Running at http://localhost:5172"- else- echo "Not running"- fi- ;;-- start-detached)- if lsof -Pi :4000 -sTCP:LISTEN -t >/dev/null 2>&1; then- echo "Already running. Use: manage.sh restart"- exit 1- fi-- cd "$SCRIPT_DIR/apps/server"- nohup bun run dev >/dev/null 2>&1 &- disown-- for i in {1..10}; do- curl -s http://localhost:4000/health >/dev/null 2>&1 && break- sleep 1- done-- cd "$SCRIPT_DIR/apps/client"- nohup bun run dev >/dev/null 2>&1 &- disown-- for i in {1..10}; do- curl -s http://localhost:5172 >/dev/null 2>&1 && break- sleep 1- done-- echo "Observability running at http://localhost:5172"- ;;-- *)- echo "Usage: manage.sh {start|stop|restart|status|start-detached}"- exit 1- ;;-esacdiff --git a/Packs/kai-voice-system/src/hooks/stop-hook-voice.ts b/Packs/kai-voice-system/src/hooks/stop-hook-voice.tsdeleted file mode 100644index f894b710..00000000--- a/Packs/kai-voice-system/src/hooks/stop-hook-voice.ts+++ /dev/null@@ -1,190 +0,0 @@-#!/usr/bin/env bun-// $PAI_DIR/hooks/stop-hook-voice.ts-// Main agent voice notification with prosody enhancement--import { readFileSync } from 'fs';-import { enhanceProsody, cleanForSpeech, getVoiceId } from './lib/prosody-enhancer';--interface NotificationPayload {- title: string;- message: string;- voice_enabled: boolean;- priority?: 'low' | 'normal' | 'high';- voice_id: string;-}--interface HookInput {- session_id: string;- transcript_path: string;- hook_event_name: string;-}--/**- * Convert Claude content to plain text- */-function contentToText(content: unknown): string {- if (typeof content === 'string') return content;- if (Array.isArray(content)) {- return content- .map(c => {- if (typeof c === 'string') return c;- if (c?.text) return c.text;- if (c?.content) return contentToText(c.content);- return '';- })- .join(' ')- .trim();- }- return '';-}--/**- * Extract completion message with prosody enhancement- */-function extractCompletion(text: string, agentType: string = 'pai'): string {- // Remove system-reminder tags- text = text.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, '');-- // Look for COMPLETED section- const patterns = [- /🎯\s*\*{0,2}COMPLETED:?\*{0,2}\s*(.+?)(?:\n|$)/i,- /\*{0,2}COMPLETED:?\*{0,2}\s*(.+?)(?:\n|$)/i- ];-- for (const pattern of patterns) {- const match = text.match(pattern);- if (match && match[1]) {- let completed = match[1].trim();-- // Clean agent tags- completed = completed.replace(/^\[AGENT:\w+\]\s*/i, '');-- // Clean for speech- completed = cleanForSpeech(completed);-- // Enhance with prosody- completed = enhanceProsody(completed, agentType);-- return completed;- }- }-- return 'Completed task';-}--/**- * Read last assistant message from transcript- */-function getLastAssistantMessage(transcriptPath: string): string {- try {- const content = readFileSync(transcriptPath, 'utf-8');- const lines = content.trim().split('\n');-- let lastAssistantMessage = '';-- for (const line of lines) {- if (line.trim()) {- try {- const entry = JSON.parse(line);- if (entry.type === 'assistant' && entry.message?.content) {- const text = contentToText(entry.message.content);- if (text) {- lastAssistantMessage = text;- }- }- } catch {- // Skip invalid JSON lines- }- }- }-- return lastAssistantMessage;- } catch (error) {- console.error('Error reading transcript:', error);- return '';- }-}--/**- * Send notification to voice server- */-async function sendNotification(payload: NotificationPayload): Promise<void> {- const serverUrl = process.env.PAI_VOICE_SERVER || 'http://localhost:8888/notify';-- try {- const response = await fetch(serverUrl, {- method: 'POST',- headers: { 'Content-Type': 'application/json' },- body: JSON.stringify(payload),- });-- if (!response.ok) {- console.error('Voice server error:', response.statusText);- }- } catch (error) {- // Fail silently - voice server may not be running- console.error('Voice notification failed (server may be offline):', error);- }-}--async function main() {- let hookInput: HookInput | null = null;-- try {- const decoder = new TextDecoder();- const reader = Bun.stdin.stream().getReader();- let input = '';-- const timeoutPromise = new Promise<void>((resolve) => {- setTimeout(() => resolve(), 500);- });-- const readPromise = (async () => {- while (true) {- const { done, value } = await reader.read();- if (done) break;- input += decoder.decode(value, { stream: true });- }- })();-- await Promise.race([readPromise, timeoutPromise]);-- if (input.trim()) {- hookInput = JSON.parse(input);- }- } catch (error) {- console.error('Error reading hook input:', error);- }-- // Extract completion from transcript- let completion = 'Completed task';- const agentType = 'pai'; // Main agent is your PAI-- if (hookInput?.transcript_path) {- const lastMessage = getLastAssistantMessage(hookInput.transcript_path);- if (lastMessage) {- completion = extractCompletion(lastMessage, agentType);- }- }-- // Get voice ID for this agent- const voiceId = getVoiceId(agentType);-- // Send voice notification- const payload: NotificationPayload = {- title: 'PAI',- message: completion,- voice_enabled: true,- priority: 'normal',- voice_id: voiceId- };-- await sendNotification(payload);-- process.exit(0);-}--main().catch((error) => {- console.error('Stop hook error:', error);- process.exit(0);-});diff --git a/Packs/kai-voice-system/src/hooks/subagent-stop-hook-voice.ts b/Packs/kai-voice-system/src/hooks/subagent-stop-hook-voice.tsdeleted file mode 100644index 21830193..00000000--- a/Packs/kai-voice-system/src/hooks/subagent-stop-hook-voice.ts+++ /dev/null@@ -1,249 +0,0 @@-#!/usr/bin/env bun-// $PAI_DIR/hooks/subagent-stop-hook-voice.ts-// Subagent voice notification with personality-specific delivery--import { readFileSync, existsSync } from 'fs';-import { join, dirname } from 'path';-import { readdirSync, statSync } from 'fs';-import { enhanceProsody, cleanForSpeech, getVoiceId } from './lib/prosody-enhancer';--interface NotificationPayload {- title: string;- message: string;- voice_enabled: boolean;- voice_id: string;-}--async function delay(ms: number): Promise<void> {- return new Promise(resolve => setTimeout(resolve, ms));-}--async function findTaskResult(transcriptPath: string, maxAttempts: number = 2): Promise<{- result: string | null;- agentType: string | null;- description: string | null;-}> {- let actualTranscriptPath = transcriptPath;-- for (let attempt = 0; attempt < maxAttempts; attempt++) {- if (attempt > 0) {- await delay(200);- }-- if (!existsSync(actualTranscriptPath)) {- const dir = dirname(transcriptPath);- if (existsSync(dir)) {- const files = readdirSync(dir)- .filter(f => f.startsWith('agent-') && f.endsWith('.jsonl'))- .map(f => ({ name: f, mtime: statSync(join(dir, f)).mtime }))- .sort((a, b) => b.mtime.getTime() - a.mtime.getTime());-- if (files.length > 0) {- actualTranscriptPath = join(dir, files[0].name);- }- }-- if (!existsSync(actualTranscriptPath)) {- continue;- }- }-- try {- const transcript = readFileSync(actualTranscriptPath, 'utf-8');- const lines = transcript.trim().split('\n');-- for (let i = lines.length - 1; i >= 0; i--) {- try {- const entry = JSON.parse(lines[i]);-- if (entry.type === 'assistant' && entry.message?.content) {- for (const content of entry.message.content) {- if (content.type === 'tool_use' && content.name === 'Task') {- const toolInput = content.input;- const description = toolInput?.description || null;-- for (let j = i + 1; j < lines.length; j++) {- const resultEntry = JSON.parse(lines[j]);- if (resultEntry.type === 'user' && resultEntry.message?.content) {- for (const resultContent of resultEntry.message.content) {- if (resultContent.type === 'tool_result' && resultContent.tool_use_id === content.id) {- let taskOutput: string;- if (typeof resultContent.content === 'string') {- taskOutput = resultContent.content;- } else if (Array.isArray(resultContent.content)) {- taskOutput = resultContent.content- .filter((item: any) => item.type === 'text')- .map((item: any) => item.text)- .join('\n');- } else {- continue;- }-- const agentType = toolInput?.subagent_type || 'default';- return { result: taskOutput, agentType, description };- }- }- }- }- }- }- }- } catch (e) {- // Skip invalid lines- }- }- } catch (e) {- // Will retry- }- }-- return { result: null, agentType: null, description: null };-}--function extractCompletionMessage(taskOutput: string): { message: string | null; agentType: string | null } {- // Look for COMPLETED section with agent tag- const agentPatterns = [- /🎯\s*COMPLETED:\s*\[AGENT:(\w+[-\w]*)\]\s*(.+?)(?:\n|$)/is,- /COMPLETED:\s*\[AGENT:(\w+[-\w]*)\]\s*(.+?)(?:\n|$)/is,- /🎯.*COMPLETED.*\[AGENT:(\w+[-\w]*)\]\s*(.+?)(?:\n|$)/is,- ];-- for (const pattern of agentPatterns) {- const match = taskOutput.match(pattern);- if (match && match[1] && match[2]) {- const agentType = match[1].toLowerCase();- let message = match[2].trim();-- // Clean for speech- message = cleanForSpeech(message);-- // Enhance with prosody- message = enhanceProsody(message, agentType);-- // Format: "AgentName completed [message]"- const agentName = agentType.charAt(0).toUpperCase() + agentType.slice(1);-- // Don't prepend "completed" for greetings or questions- const isGreeting = /^(hey|hello|hi|greetings)/i.test(message);- const isQuestion = message.includes('?');-- const fullMessage = (isGreeting || isQuestion)- ? message- : `${agentName} completed ${message}`;-- return { message: fullMessage, agentType };- }- }-- // Fallback patterns- const genericPatterns = [- /🎯\s*COMPLETED:\s*(.+?)(?:\n|$)/i,- /COMPLETED:\s*(.+?)(?:\n|$)/i,- ];-- for (const pattern of genericPatterns) {- const match = taskOutput.match(pattern);- if (match && match[1]) {- let message = match[1].trim();- message = cleanForSpeech(message);-- if (message.length > 5) {- return { message, agentType: null };- }- }- }-- return { message: null, agentType: null };-}--async function sendNotification(payload: NotificationPayload): Promise<void> {- const serverUrl = process.env.PAI_VOICE_SERVER || 'http://localhost:8888/notify';-- try {- const response = await fetch(serverUrl, {- method: 'POST',- headers: { 'Content-Type': 'application/json' },- body: JSON.stringify(payload),- });-- if (!response.ok) {- console.error('Voice server error:', response.statusText);- }- } catch (error) {- // Fail silently- }-}--async function main() {- let input = '';- try {- const decoder = new TextDecoder();- const reader = Bun.stdin.stream().getReader();-- const timeoutPromise = new Promise<void>((resolve) => {- setTimeout(() => resolve(), 500);- });-- const readPromise = (async () => {- while (true) {- const { done, value } = await reader.read();- if (done) break;- input += decoder.decode(value, { stream: true });- }- })();-- await Promise.race([readPromise, timeoutPromise]);- } catch (e) {- process.exit(0);- }-- if (!input) {- process.exit(0);- }-- let transcriptPath: string;- try {- const parsed = JSON.parse(input);- transcriptPath = parsed.transcript_path;- } catch (e) {- process.exit(0);- }-- if (!transcriptPath) {- process.exit(0);- }-- // Find task result- const { result: taskOutput, agentType } = await findTaskResult(transcriptPath);-- if (!taskOutput) {- process.exit(0);- }-- // Extract completion message- const { message: completionMessage, agentType: extractedAgentType } = extractCompletionMessage(taskOutput);-- if (!completionMessage) {- process.exit(0);- }-- // Determine agent type- const finalAgentType = extractedAgentType || agentType || 'default';-- // Get voice ID for this agent type- const voiceId = getVoiceId(finalAgentType);-- // Send voice notification- const agentName = finalAgentType.charAt(0).toUpperCase() + finalAgentType.slice(1);-- await sendNotification({- title: agentName,- message: completionMessage,- voice_enabled: true,- voice_id: voiceId- });-- process.exit(0);-}--main().catch(console.error);diff --git a/Packs/kai-voice-system/src/voice/server.ts b/Packs/kai-voice-system/src/voice/server.tsdeleted file mode 100644index 4336732c..00000000--- a/Packs/kai-voice-system/src/voice/server.ts+++ /dev/null@@ -1,526 +0,0 @@-#!/usr/bin/env bun-// $PAI_DIR/voice-server/server.ts-// Voice notification server with multi-provider TTS support-// Supports: Google Cloud TTS, ElevenLabs-// Platforms: macOS, Linux--import { serve } from "bun";-import { spawn } from "child_process";-import { homedir } from "os";-import { join } from "path";-import { existsSync, readFileSync } from "fs";--// Load .env from PAI directory (single source of truth for all API keys)-const paiDir = process.env.PAI_DIR || join(homedir(), '.config', 'pai');-const envPath = join(paiDir, '.env');-if (existsSync(envPath)) {- const envContent = await Bun.file(envPath).text();- envContent.split('\n').forEach(line => {- const [key, value] = line.split('=');- if (key && value && !key.startsWith('#')) {- process.env[key.trim()] = value.trim();- }- });-}--const PORT = parseInt(process.env.PAI_VOICE_PORT || "8888");--// =============================================================================-// TTS Provider Configuration-// =============================================================================-// Options: "google" | "elevenlabs" (default: elevenlabs for backward compatibility)-const TTS_PROVIDER = (process.env.TTS_PROVIDER || 'elevenlabs').toLowerCase();--// ElevenLabs Configuration-const ELEVENLABS_API_KEY = process.env.ELEVENLABS_API_KEY;-const DEFAULT_ELEVENLABS_VOICE = process.env.ELEVENLABS_VOICE_ID || "s3TPKV1kjDlVtZbl4Ksh";--// Google Cloud TTS Configuration-// Free tier: 4M chars/month (Standard), 1M chars/month (WaveNet/Neural2)-// This is ~800x more than ElevenLabs' free tier-const GOOGLE_API_KEY = process.env.GOOGLE_API_KEY;-const GOOGLE_TTS_VOICE = process.env.GOOGLE_TTS_VOICE || "en-US-Neural2-J";--// Validate provider configuration-if (TTS_PROVIDER === 'elevenlabs' && !ELEVENLABS_API_KEY) {- console.error(`⚠️ ELEVENLABS_API_KEY not found in ${envPath}`);- console.error('Add: ELEVENLABS_API_KEY=your_key_here to $PAI_DIR/.env');- console.error('Or switch to Google TTS: TTS_PROVIDER=google');-}--if (TTS_PROVIDER === 'google' && !GOOGLE_API_KEY) {- console.error(`⚠️ GOOGLE_API_KEY not found in ${envPath}`);- console.error('Add: GOOGLE_API_KEY=your_key_here to $PAI_DIR/.env');- console.error('Note: Enable Cloud Text-to-Speech API in Google Cloud Console');-}--// Default voice based on provider-const DEFAULT_VOICE_ID = TTS_PROVIDER === 'google' ? GOOGLE_TTS_VOICE : DEFAULT_ELEVENLABS_VOICE;--// Voice configuration types-interface VoiceConfig {- voice_id: string;- voice_name: string;- stability: number;- similarity_boost: number;- description: string;-}--interface VoicesConfig {- default_volume?: number;- voices: Record<string, VoiceConfig>;-}--// 13 Emotional Presets - Prosody System-const EMOTIONAL_PRESETS: Record<string, { stability: number; similarity_boost: number }> = {- 'excited': { stability: 0.7, similarity_boost: 0.9 },- 'celebration': { stability: 0.65, similarity_boost: 0.85 },- 'insight': { stability: 0.55, similarity_boost: 0.8 },- 'creative': { stability: 0.5, similarity_boost: 0.75 },- 'success': { stability: 0.6, similarity_boost: 0.8 },- 'progress': { stability: 0.55, similarity_boost: 0.75 },- 'investigating': { stability: 0.6, similarity_boost: 0.85 },- 'debugging': { stability: 0.55, similarity_boost: 0.8 },- 'learning': { stability: 0.5, similarity_boost: 0.75 },- 'pondering': { stability: 0.65, similarity_boost: 0.8 },- 'focused': { stability: 0.7, similarity_boost: 0.85 },- 'caution': { stability: 0.4, similarity_boost: 0.6 },- 'urgent': { stability: 0.3, similarity_boost: 0.9 },-};--// Load voice configuration-let voicesConfig: VoicesConfig | null = null;-try {- const voicesPath = join(paiDir, 'config', 'voice-personalities.json');- if (existsSync(voicesPath)) {- const voicesContent = readFileSync(voicesPath, 'utf-8');- voicesConfig = JSON.parse(voicesContent);- console.log('✅ Loaded voice personalities from config');- }-} catch (error) {- console.warn('⚠️ Failed to load voice personalities, using defaults');-}--// Extract emotional marker from message-function extractEmotionalMarker(message: string): { cleaned: string; emotion?: string } {- const emojiToEmotion: Record<string, string> = {- '💥': 'excited', '🎉': 'celebration', '💡': 'insight', '🎨': 'creative',- '✨': 'success', '📈': 'progress', '🔍': 'investigating', '🐛': 'debugging',- '📚': 'learning', '🤔': 'pondering', '🎯': 'focused', '⚠️': 'caution', '🚨': 'urgent'- };-- const emotionMatch = message.match(/\[(💥|🎉|💡|🎨|✨|📈|🔍|🐛|📚|🤔|🎯|⚠️|🚨)\s+(\w+)\]/);- if (emotionMatch) {- const emoji = emotionMatch[1];- const emotionName = emotionMatch[2].toLowerCase();- if (emojiToEmotion[emoji] === emotionName) {- return {- cleaned: message.replace(emotionMatch[0], '').trim(),- emotion: emotionName- };- }- }- return { cleaned: message };-}--// Get voice configuration by voice ID or agent name-function getVoiceConfig(identifier: string): VoiceConfig | null {- if (!voicesConfig) return null;- if (voicesConfig.voices[identifier]) return voicesConfig.voices[identifier];- for (const config of Object.values(voicesConfig.voices)) {- if (config.voice_id === identifier) return config;- }- return null;-}--// Sanitize input for TTS - allow natural speech, block dangerous characters-function sanitizeForSpeech(input: string): string {- return input- .replace(/<script/gi, '')- .replace(/\.\.\//g, '')- .replace(/[;&|><`$\\]/g, '')- .replace(/\*\*([^*]+)\*\*/g, '$1')- .replace(/\*([^*]+)\*/g, '$1')- .replace(/`([^`]+)`/g, '$1')- .replace(/#{1,6}\s+/g, '')- .trim()- .substring(0, 500);-}--// Validate input-function validateInput(input: any): { valid: boolean; error?: string; sanitized?: string } {- if (!input || typeof input !== 'string') {- return { valid: false, error: 'Invalid input type' };- }- if (input.length > 500) {- return { valid: false, error: 'Message too long (max 500 characters)' };- }- const sanitized = sanitizeForSpeech(input);- if (!sanitized || sanitized.length === 0) {- return { valid: false, error: 'Message contains no valid content after sanitization' };- }- return { valid: true, sanitized };-}--// =============================================================================-// TTS Providers-// =============================================================================--// ElevenLabs TTS Generation-async function generateSpeechElevenLabs(- text: string,- voiceId: string,- voiceSettings?: { stability: number; similarity_boost: number }-): Promise<ArrayBuffer> {- if (!ELEVENLABS_API_KEY) {- throw new Error('ElevenLabs API key not configured');- }-- const url = `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`;- const settings = voiceSettings || { stability: 0.5, similarity_boost: 0.5 };-- const response = await fetch(url, {- method: 'POST',- headers: {- 'Accept': 'audio/mpeg',- 'Content-Type': 'application/json',- 'xi-api-key': ELEVENLABS_API_KEY,- },- body: JSON.stringify({- text: text,- model_id: 'eleven_turbo_v2_5',- voice_settings: settings,- }),- });-- if (!response.ok) {- const errorText = await response.text();- throw new Error(`ElevenLabs API error: ${response.status} - ${errorText}`);- }-- return await response.arrayBuffer();-}--// Google Cloud TTS Generation-// Free tier: 4M chars/month (Standard), 1M chars/month (WaveNet/Neural2)-async function generateSpeechGoogle(- text: string,- voice?: string-): Promise<ArrayBuffer> {- if (!GOOGLE_API_KEY) {- throw new Error('Google API key not configured. Add GOOGLE_API_KEY to your .env file.');- }-- const voiceName = voice || GOOGLE_TTS_VOICE;- // Extract language code from voice name (e.g., "en-US" from "en-US-Neural2-J")- const languageCode = voiceName.split('-').slice(0, 2).join('-');-- const url = `https://texttospeech.googleapis.com/v1/text:synthesize?key=${GOOGLE_API_KEY}`;-- const response = await fetch(url, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- },- body: JSON.stringify({- input: { text },- voice: {- languageCode,- name: voiceName,- },- audioConfig: {- audioEncoding: 'MP3',- speakingRate: 1.0,- pitch: 0,- },- }),- });-- if (!response.ok) {- const errorText = await response.text();- throw new Error(`Google TTS API error: ${response.status} - ${errorText}`);- }-- const data = await response.json();-- // Google returns base64-encoded audio in the 'audioContent' field- if (!data.audioContent) {- throw new Error('Google TTS: No audio content in response');- }-- // Decode base64 to ArrayBuffer- const binaryString = atob(data.audioContent);- const bytes = new Uint8Array(binaryString.length);- for (let i = 0; i < binaryString.length; i++) {- bytes[i] = binaryString.charCodeAt(i);- }- return bytes.buffer;-}--// Unified speech generation - routes to the configured provider-async function generateSpeech(- text: string,- voiceId: string,- voiceSettings?: { stability: number; similarity_boost: number }-): Promise<ArrayBuffer> {- if (TTS_PROVIDER === 'google') {- return generateSpeechGoogle(text, voiceId);- } else {- return generateSpeechElevenLabs(text, voiceId, voiceSettings);- }-}--// Get volume setting from config (defaults to 0.8 = 80%)-function getVolumeSetting(): number {- if (voicesConfig && typeof voicesConfig.default_volume === 'number') {- const vol = voicesConfig.default_volume;- if (vol >= 0 && vol <= 1) return vol;- }- return 0.8;-}--// =============================================================================-// Cross-Platform Audio Playback-// =============================================================================--// Play audio - supports macOS (afplay) and Linux (mpg123, mpv)-async function playAudio(audioBuffer: ArrayBuffer): Promise<void> {- const tempFile = `/tmp/voice-${Date.now()}.mp3`;- await Bun.write(tempFile, audioBuffer);- const volume = getVolumeSetting();-- return new Promise((resolve, reject) => {- let player: string;- let args: string[];-- if (process.platform === 'darwin') {- // macOS: use afplay- player = '/usr/bin/afplay';- args = ['-v', volume.toString(), tempFile];- } else {- // Linux: try mpg123 first, then mpv- if (existsSync('/usr/bin/mpg123')) {- player = '/usr/bin/mpg123';- args = ['-q', tempFile];- } else if (existsSync('/usr/bin/mpv')) {- player = '/usr/bin/mpv';- args = ['--no-terminal', '--volume=' + (volume * 100), tempFile];- } else if (existsSync('/snap/bin/mpv')) {- player = '/snap/bin/mpv';- args = ['--no-terminal', '--volume=' + (volume * 100), tempFile];- } else {- console.warn('⚠️ No audio player found. Install mpg123 or mpv for audio playback.');- spawn('/bin/rm', [tempFile]);- resolve();- return;- }- }-- const proc = spawn(player, args);-- proc.on('error', (error) => {- console.error('Error playing audio:', error);- spawn('/bin/rm', [tempFile]);- reject(error);- });-- proc.on('exit', (code) => {- spawn('/bin/rm', [tempFile]); // Clean up temp file- if (code === 0 || code === null) {- resolve();- } else {- reject(new Error(`${player} exited with code ${code}`));- }- });- });-}--// =============================================================================-// Cross-Platform Notifications-// =============================================================================--// Send notification with voice-async function sendNotification(- title: string,- message: string,- voiceEnabled = true,- voiceId: string | null = null-) {- const titleValidation = validateInput(title);- const messageValidation = validateInput(message);-- if (!titleValidation.valid) throw new Error(`Invalid title: ${titleValidation.error}`);- if (!messageValidation.valid) throw new Error(`Invalid message: ${messageValidation.error}`);-- const safeTitle = titleValidation.sanitized!;- let safeMessage = messageValidation.sanitized!;-- // Extract emotional marker if present- const { cleaned, emotion } = extractEmotionalMarker(safeMessage);- safeMessage = cleaned;-- // Generate and play voice- const apiKeyConfigured = TTS_PROVIDER === 'google' ? GOOGLE_API_KEY : ELEVENLABS_API_KEY;- if (voiceEnabled && apiKeyConfigured) {- try {- const voice = voiceId || DEFAULT_VOICE_ID;- const voiceConfig = getVoiceConfig(voice);-- // Determine voice settings (priority: emotional > personality > defaults)- let voiceSettings = { stability: 0.5, similarity_boost: 0.5 };-- if (emotion && EMOTIONAL_PRESETS[emotion]) {- voiceSettings = EMOTIONAL_PRESETS[emotion];- console.log(`🎭 Emotion: ${emotion}`);- } else if (voiceConfig) {- voiceSettings = {- stability: voiceConfig.stability,- similarity_boost: voiceConfig.similarity_boost- };- console.log(`👤 Personality: ${voiceConfig.description}`);- }-- console.log(`🎙️ Generating speech (voice: ${voice}, stability: ${voiceSettings.stability})`);-- const audioBuffer = await generateSpeech(safeMessage, voice, voiceSettings);- await playAudio(audioBuffer);- } catch (error) {- console.error("Failed to generate/play speech:", error);- }- }-- // Display desktop notification (platform-aware)- try {- if (process.platform === 'linux') {- // Linux: use notify-send- spawn('/usr/bin/notify-send', [safeTitle, safeMessage]);- } else if (process.platform === 'darwin') {- // macOS: use osascript- const escapedTitle = safeTitle.replace(/\\/g, '\\\\').replace(/"/g, '\\"');- const escapedMessage = safeMessage.replace(/\\/g, '\\\\').replace(/"/g, '\\"');- const script = `display notification "${escapedMessage}" with title "${escapedTitle}" sound name ""`;- spawn('/usr/bin/osascript', ['-e', script]);- }- } catch (error) {- console.error("Notification display error:", error);- }-}--// Rate limiting-const requestCounts = new Map<string, { count: number; resetTime: number }>();-const RATE_LIMIT = 10;-const RATE_WINDOW = 60000;--function checkRateLimit(ip: string): boolean {- const now = Date.now();- const record = requestCounts.get(ip);-- if (!record || now > record.resetTime) {- requestCounts.set(ip, { count: 1, resetTime: now + RATE_WINDOW });- return true;- }-- if (record.count >= RATE_LIMIT) return false;- record.count++;- return true;-}--// Start HTTP server-const server = serve({- port: PORT,- async fetch(req) {- const url = new URL(req.url);- const clientIp = req.headers.get('x-forwarded-for') || 'localhost';-- const corsHeaders = {- "Access-Control-Allow-Origin": "http://localhost",- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",- "Access-Control-Allow-Headers": "Content-Type"- };-- if (req.method === "OPTIONS") {- return new Response(null, { headers: corsHeaders, status: 204 });- }-- if (!checkRateLimit(clientIp)) {- return new Response(- JSON.stringify({ status: "error", message: "Rate limit exceeded" }),- { headers: { ...corsHeaders, "Content-Type": "application/json" }, status: 429 }- );- }-- // Main notification endpoint- if (url.pathname === "/notify" && req.method === "POST") {- try {- const data = await req.json();- const title = data.title || "PAI Notification";- const message = data.message || "Task completed";- const voiceEnabled = data.voice_enabled !== false;- const voiceId = data.voice_id || data.voice_name || null;-- if (voiceId && typeof voiceId !== 'string') {- throw new Error('Invalid voice_id');- }-- console.log(`📨 Notification: "${title}" - "${message.substring(0, 50)}..."`);-- await sendNotification(title, message, voiceEnabled, voiceId);-- return new Response(- JSON.stringify({ status: "success", message: "Notification sent" }),- { headers: { ...corsHeaders, "Content-Type": "application/json" }, status: 200 }- );- } catch (error: any) {- console.error("Notification error:", error);- return new Response(- JSON.stringify({ status: "error", message: error.message || "Internal server error" }),- { headers: { ...corsHeaders, "Content-Type": "application/json" }, status: error.message?.includes('Invalid') ? 400 : 500 }- );- }- }-- // Health check endpoint- if (url.pathname === "/health") {- const providerInfo = TTS_PROVIDER === 'google'- ? { name: 'Google Cloud TTS', configured: !!GOOGLE_API_KEY, voice: GOOGLE_TTS_VOICE }- : { name: 'ElevenLabs', configured: !!ELEVENLABS_API_KEY, voice: DEFAULT_ELEVENLABS_VOICE };-- return new Response(- JSON.stringify({- status: "healthy",- port: PORT,- platform: process.platform,- tts_provider: providerInfo.name,- default_voice: providerInfo.voice,- api_key_configured: providerInfo.configured,- providers: {- active: TTS_PROVIDER,- google: { configured: !!GOOGLE_API_KEY, voice: GOOGLE_TTS_VOICE },- elevenlabs: { configured: !!ELEVENLABS_API_KEY, voice: DEFAULT_ELEVENLABS_VOICE }- }- }),- { headers: { ...corsHeaders, "Content-Type": "application/json" }, status: 200 }- );- }-- return new Response("PAI Voice Server - POST to /notify", {- headers: corsHeaders,- status: 200- });- },-});--// Startup logs-console.log(`🚀 Voice Server running on port ${PORT}`);-console.log(`🖥️ Platform: ${process.platform}`);-console.log(`🎙️ TTS Provider: ${TTS_PROVIDER === 'google' ? 'Google Cloud TTS' : 'ElevenLabs'}`);-console.log(`🗣️ Default voice: ${DEFAULT_VOICE_ID}`);-console.log(`📡 POST to http://localhost:${PORT}/notify`);-console.log(`🔒 Security: CORS restricted to localhost, rate limiting enabled`);-if (TTS_PROVIDER === 'google') {- console.log(`🔑 Google API Key: ${GOOGLE_API_KEY ? '✅ Configured' : '❌ Missing'}`);- console.log(`💰 Free tier: 4M chars/month (Standard), 1M chars/month (Neural2)`);-} else {- console.log(`🔑 ElevenLabs API Key: ${ELEVENLABS_API_KEY ? '✅ Configured' : '❌ Missing'}`);-}-console.log(`💡 Switch providers: TTS_PROVIDER=google or TTS_PROVIDER=elevenlabs in .env`);diff --git a/Packs/kai-agents-skill/INSTALL.md b/Packs/pai-agents-skill/INSTALL.mdsimilarity index 93%rename from Packs/kai-agents-skill/INSTALL.mdrename to Packs/pai-agents-skill/INSTALL.mdindex 188ee865..2f18a3cf 100644--- a/Packs/kai-agents-skill/INSTALL.md+++ b/Packs/pai-agents-skill/INSTALL.md@@ -4,8 +4,8 @@- **Bun runtime**: `curl -fsSL https://bun.sh/install | bash`- **Claude Code** (or compatible agent system)-- **kai-core-install** pack installed (provides skill routing)-- **Optional**: kai-voice-system pack for voice notifications+- **pai-core-install** pack installed (provides skill routing)+- **Optional**: pai-voice-system pack for voice notifications## Pre-Installation: System Analysis@@ -24,9 +24,9 @@ fi# 3. Check dependenciesif [ -f "$PAI_CHECK/skills/CORE/SKILL.md" ]; then- echo "kai-core-install: INSTALLED"+ echo "pai-core-install: INSTALLED"else- echo "Warning: kai-core-install not found (required)"+ echo "Warning: pai-core-install not found (required)"fi```@@ -84,7 +84,7 @@ bun add yaml handlebars### Step 4: Configure Voice IDs (Optional)-If using kai-voice-system, edit `Traits.yaml` to replace placeholder voice IDs:+If using pai-voice-system, edit `Traits.yaml` to replace placeholder voice IDs:```bash# Edit voice mappings with your TTS provider's voice IDsdiff --git a/Packs/kai-agents-skill/README.md b/Packs/pai-agents-skill/README.mdsimilarity index 100%rename from Packs/kai-agents-skill/README.mdrename to Packs/pai-agents-skill/README.mddiff --git a/Packs/kai-agents-skill/VERIFY.md b/Packs/pai-agents-skill/VERIFY.mdsimilarity index 100%rename from Packs/kai-agents-skill/VERIFY.mdrename to Packs/pai-agents-skill/VERIFY.mddiff --git a/Packs/kai-agents-skill/src/skills/Agents/AgentPersonalities.md b/Packs/pai-agents-skill/src/skills/Agents/AgentPersonalities.mdsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/AgentPersonalities.mdrename to Packs/pai-agents-skill/src/skills/Agents/AgentPersonalities.mddiff --git a/Packs/kai-agents-skill/src/skills/Agents/Data/Traits.yaml b/Packs/pai-agents-skill/src/skills/Agents/Data/Traits.yamlsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Data/Traits.yamlrename to Packs/pai-agents-skill/src/skills/Agents/Data/Traits.yamldiff --git a/Packs/kai-agents-skill/src/skills/Agents/SKILL.md b/Packs/pai-agents-skill/src/skills/Agents/SKILL.mdsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/SKILL.mdrename to Packs/pai-agents-skill/src/skills/Agents/SKILL.mddiff --git a/Packs/kai-agents-skill/src/skills/Agents/Templates/DynamicAgent.hbs b/Packs/pai-agents-skill/src/skills/Agents/Templates/DynamicAgent.hbssimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Templates/DynamicAgent.hbsrename to Packs/pai-agents-skill/src/skills/Agents/Templates/DynamicAgent.hbsdiff --git a/Packs/kai-agents-skill/src/skills/Agents/Tools/AgentFactory.ts b/Packs/pai-agents-skill/src/skills/Agents/Tools/AgentFactory.tssimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Tools/AgentFactory.tsrename to Packs/pai-agents-skill/src/skills/Agents/Tools/AgentFactory.tsdiff --git a/Packs/kai-agents-skill/src/skills/Agents/Workflows/CreateCustomAgent.md b/Packs/pai-agents-skill/src/skills/Agents/Workflows/CreateCustomAgent.mdsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Workflows/CreateCustomAgent.mdrename to Packs/pai-agents-skill/src/skills/Agents/Workflows/CreateCustomAgent.mddiff --git a/Packs/kai-agents-skill/src/skills/Agents/Workflows/ListTraits.md b/Packs/pai-agents-skill/src/skills/Agents/Workflows/ListTraits.mdsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Workflows/ListTraits.mdrename to Packs/pai-agents-skill/src/skills/Agents/Workflows/ListTraits.mddiff --git a/Packs/kai-agents-skill/src/skills/Agents/Workflows/SpawnParallelAgents.md b/Packs/pai-agents-skill/src/skills/Agents/Workflows/SpawnParallelAgents.mdsimilarity index 100%rename from Packs/kai-agents-skill/src/skills/Agents/Workflows/SpawnParallelAgents.mdrename to Packs/pai-agents-skill/src/skills/Agents/Workflows/SpawnParallelAgents.mddiff --git a/Packs/kai-art-skill/INSTALL.md b/Packs/pai-art-skill/INSTALL.mdsimilarity index 99%rename from Packs/kai-art-skill/INSTALL.mdrename to Packs/pai-art-skill/INSTALL.mdindex 6fc46d92..fa81e5b6 100644--- a/Packs/kai-art-skill/INSTALL.md+++ b/Packs/pai-art-skill/INSTALL.md@@ -116,7 +116,7 @@ if [ ! -f "$PAI_DIR/.env" ]; then# GOOGLE_API_KEY=your_google_api_key_here# For GPT-image-1 (OpenAI)-# OPENAI_API_KEY=sk-your_openai_key_here+# OPENAI_API_KEY=your_openai_api_key_here# For background removal# REMOVEBG_API_KEY=your_removebg_key_herediff --git a/Packs/kai-art-skill/README.md b/Packs/pai-art-skill/README.mdsimilarity index 98%rename from Packs/kai-art-skill/README.mdrename to Packs/pai-art-skill/README.mdindex b665be45..b28a39c6 100644--- a/Packs/kai-art-skill/README.md+++ b/Packs/pai-art-skill/README.md@@ -1,6 +1,6 @@---name: Kai Art Skill-pack-id: danielmiessler-kai-art-skill-core-v1.1.0+pack-id: danielmiessler-pai-art-skill-core-v1.1.0version: 1.1.0author: danielmiesslerdescription: Visual content generation with Excalidraw hand-drawn aesthetic - technical diagrams, comics, editorial illustrationsdiff --git a/Packs/kai-art-skill/VERIFY.md b/Packs/pai-art-skill/VERIFY.mdsimilarity index 100%rename from Packs/kai-art-skill/VERIFY.mdrename to Packs/pai-art-skill/VERIFY.mddiff --git a/Packs/kai-art-skill/src/skills/Art/Aesthetic.md b/Packs/pai-art-skill/src/skills/Art/Aesthetic.mdsimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/Aesthetic.mdrename to Packs/pai-art-skill/src/skills/Art/Aesthetic.mddiff --git a/Packs/kai-art-skill/src/skills/Art/SKILL.md b/Packs/pai-art-skill/src/skills/Art/SKILL.mdsimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/SKILL.mdrename to Packs/pai-art-skill/src/skills/Art/SKILL.mddiff --git a/Packs/kai-art-skill/src/skills/Art/Tools/Generate.ts b/Packs/pai-art-skill/src/skills/Art/Tools/Generate.tssimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/Tools/Generate.tsrename to Packs/pai-art-skill/src/skills/Art/Tools/Generate.tsdiff --git a/Packs/kai-art-skill/src/skills/Art/Workflows/Comics.md b/Packs/pai-art-skill/src/skills/Art/Workflows/Comics.mdsimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/Workflows/Comics.mdrename to Packs/pai-art-skill/src/skills/Art/Workflows/Comics.mddiff --git a/Packs/kai-art-skill/src/skills/Art/Workflows/Essay.md b/Packs/pai-art-skill/src/skills/Art/Workflows/Essay.mdsimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/Workflows/Essay.mdrename to Packs/pai-art-skill/src/skills/Art/Workflows/Essay.mddiff --git a/Packs/kai-art-skill/src/skills/Art/Workflows/TechnicalDiagrams.md b/Packs/pai-art-skill/src/skills/Art/Workflows/TechnicalDiagrams.mdsimilarity index 100%rename from Packs/kai-art-skill/src/skills/Art/Workflows/TechnicalDiagrams.mdrename to Packs/pai-art-skill/src/skills/Art/Workflows/TechnicalDiagrams.mddiff --git a/Packs/kai-browser-skill/INSTALL.md b/Packs/pai-browser-skill/INSTALL.mdsimilarity index 99%rename from Packs/kai-browser-skill/INSTALL.mdrename to Packs/pai-browser-skill/INSTALL.mdindex 76159deb..110e59e6 100644--- a/Packs/kai-browser-skill/INSTALL.md+++ b/Packs/pai-browser-skill/INSTALL.md@@ -188,7 +188,7 @@ mkdir -p $PAI_DIR/skills/Browser/examplesCopy the following files from this pack to your skill directory:```bash-# From kai-browser-skill pack directory+# From pai-browser-skill pack directorycp src/index.ts $PAI_DIR/skills/Browser/src/cp package.json $PAI_DIR/skills/Browser/cp tsconfig.json $PAI_DIR/skills/Browser/diff --git a/Packs/kai-browser-skill/README.md b/Packs/pai-browser-skill/README.mdsimilarity index 98%rename from Packs/kai-browser-skill/README.mdrename to Packs/pai-browser-skill/README.mdindex 21b3aa0d..ef2ad8e5 100644--- a/Packs/kai-browser-skill/README.md+++ b/Packs/pai-browser-skill/README.md@@ -12,7 +12,7 @@ keywords: [browser, playwright, automation, screenshot, web-testing, verificatio---<p align="center">- <img src="icons/kai-browser-skill-v3.png" alt="Kai Browser Skill" width="256">+ <img src="icons/pai-browser-skill-v3.png" alt="Kai Browser Skill" width="256"></p># Browser Skill v1.2.0diff --git a/Packs/kai-browser-skill/SKILL.md b/Packs/pai-browser-skill/SKILL.mdsimilarity index 100%rename from Packs/kai-browser-skill/SKILL.mdrename to Packs/pai-browser-skill/SKILL.mddiff --git a/Packs/kai-browser-skill/Tools/Browse.ts b/Packs/pai-browser-skill/Tools/Browse.tssimilarity index 100%rename from Packs/kai-browser-skill/Tools/Browse.tsrename to Packs/pai-browser-skill/Tools/Browse.tsdiff --git a/Packs/kai-browser-skill/Tools/BrowserSession.ts b/Packs/pai-browser-skill/Tools/BrowserSession.tssimilarity index 100%rename from Packs/kai-browser-skill/Tools/BrowserSession.tsrename to Packs/pai-browser-skill/Tools/BrowserSession.tsdiff --git a/Packs/kai-browser-skill/VERIFY.md b/Packs/pai-browser-skill/VERIFY.mdsimilarity index 100%rename from Packs/kai-browser-skill/VERIFY.mdrename to Packs/pai-browser-skill/VERIFY.mddiff --git a/Packs/kai-browser-skill/Workflows/Extract.md b/Packs/pai-browser-skill/Workflows/Extract.mdsimilarity index 100%rename from Packs/kai-browser-skill/Workflows/Extract.mdrename to Packs/pai-browser-skill/Workflows/Extract.mddiff --git a/Packs/kai-browser-skill/Workflows/Interact.md b/Packs/pai-browser-skill/Workflows/Interact.mdsimilarity index 100%rename from Packs/kai-browser-skill/Workflows/Interact.mdrename to Packs/pai-browser-skill/Workflows/Interact.mddiff --git a/Packs/kai-browser-skill/Workflows/Screenshot.md b/Packs/pai-browser-skill/Workflows/Screenshot.mdsimilarity index 100%rename from Packs/kai-browser-skill/Workflows/Screenshot.mdrename to Packs/pai-browser-skill/Workflows/Screenshot.mddiff --git a/Packs/kai-browser-skill/Workflows/VerifyPage.md b/Packs/pai-browser-skill/Workflows/VerifyPage.mdsimilarity index 100%rename from Packs/kai-browser-skill/Workflows/VerifyPage.mdrename to Packs/pai-browser-skill/Workflows/VerifyPage.mddiff --git a/Packs/kai-browser-skill/examples/comprehensive-test.ts b/Packs/pai-browser-skill/examples/comprehensive-test.tssimilarity index 100%rename from Packs/kai-browser-skill/examples/comprehensive-test.tsrename to Packs/pai-browser-skill/examples/comprehensive-test.tsdiff --git a/Packs/kai-browser-skill/examples/screenshot.ts b/Packs/pai-browser-skill/examples/screenshot.tssimilarity index 100%rename from Packs/kai-browser-skill/examples/screenshot.tsrename to Packs/pai-browser-skill/examples/screenshot.tsdiff --git a/Packs/kai-browser-skill/examples/verify-page.ts b/Packs/pai-browser-skill/examples/verify-page.tssimilarity index 100%rename from Packs/kai-browser-skill/examples/verify-page.tsrename to Packs/pai-browser-skill/examples/verify-page.tsdiff --git a/Packs/kai-browser-skill/icons/kai-browser-skill-v3.png b/Packs/pai-browser-skill/icons/pai-browser-skill-v3.pngsimilarity index 100%rename from Packs/kai-browser-skill/icons/kai-browser-skill-v3.pngrename to Packs/pai-browser-skill/icons/pai-browser-skill-v3.pngdiff --git a/Packs/kai-browser-skill/package.json b/Packs/pai-browser-skill/package.jsonsimilarity index 100%rename from Packs/kai-browser-skill/package.jsonrename to Packs/pai-browser-skill/package.jsondiff --git a/Packs/kai-browser-skill/src/index.ts b/Packs/pai-browser-skill/src/index.tssimilarity index 100%rename from Packs/kai-browser-skill/src/index.tsrename to Packs/pai-browser-skill/src/index.tsdiff --git a/Packs/kai-browser-skill/tsconfig.json b/Packs/pai-browser-skill/tsconfig.jsonsimilarity index 100%rename from Packs/kai-browser-skill/tsconfig.jsonrename to Packs/pai-browser-skill/tsconfig.jsondiff --git a/Packs/kai-core-install/INSTALL.md b/Packs/pai-core-install/INSTALL.mdsimilarity index 97%rename from Packs/kai-core-install/INSTALL.mdrename to Packs/pai-core-install/INSTALL.mdindex 3c98889e..19ad6930 100644--- a/Packs/kai-core-install/INSTALL.md+++ b/Packs/pai-core-install/INSTALL.md@@ -45,7 +45,7 @@ which bun && bun --versionif [ -f "$PAI_CHECK/hooks/lib/observability.ts" ]; thenecho "✓ Hook system is installed (required)"else- echo "❌ Hook system NOT installed - install kai-hook-system first!"+ echo "❌ Hook system NOT installed - install pai-hook-system first!"fi# Check for existing CORE skill@@ -83,7 +83,7 @@ Tell the user what you found:"question": "The hook system is required but not installed. How should I proceed?","multiSelect": false,"options": [- {"label": "Install kai-hook-system first (Recommended)", "description": "I'll install the hook system pack, then continue with CORE"},+ {"label": "Install pai-hook-system first (Recommended)", "description": "I'll install the hook system pack, then continue with CORE"},{"label": "Skip and continue anyway", "description": "CORE will install but session context loading won't work"},{"label": "Abort installation", "description": "Cancel - I'll install dependencies manually"}]@@ -289,7 +289,7 @@ Copy `src/skills/CORE/Workflows/UpdateDocumentation.md` to:```bashbun run $PAI_DIR/Tools/GenerateSkillIndex.tsbun run $PAI_DIR/Tools/PaiArchitecture.ts generate-bun run $PAI_DIR/Tools/PaiArchitecture.ts log-upgrade "Initial kai-core-install v1.1.0 installation"+bun run $PAI_DIR/Tools/PaiArchitecture.ts log-upgrade "Initial pai-core-install v1.1.0 installation"```**Mark todo as completed.**@@ -413,8 +413,8 @@ ls -la $PAI_DIR/skills/CORE/USER/ls -la $PAI_DIR/skills/CORE/SYSTEM/# If missing, manually copy from pack-cp -r /path/to/kai-core-install/src/skills/CORE/USER/* $PAI_DIR/skills/CORE/USER/-cp -r /path/to/kai-core-install/src/skills/CORE/SYSTEM/* $PAI_DIR/skills/CORE/SYSTEM/+cp -r /path/to/pai-core-install/src/skills/CORE/USER/* $PAI_DIR/skills/CORE/USER/+cp -r /path/to/pai-core-install/src/skills/CORE/SYSTEM/* $PAI_DIR/skills/CORE/SYSTEM/```### Skills Not Routingdiff --git a/Packs/kai-core-install/README.md b/Packs/pai-core-install/README.mdsimilarity index 95%rename from Packs/kai-core-install/README.mdrename to Packs/pai-core-install/README.mdindex 5007e275..641879b5 100644--- a/Packs/kai-core-install/README.md+++ b/Packs/pai-core-install/README.md@@ -1,6 +1,6 @@---name: Kai Core Install-pack-id: danielmiessler-kai-core-install-v1.1.0+pack-id: danielmiessler-pai-core-install-v1.1.0version: 1.1.0author: danielmiesslerdescription: Complete PAI core installation - skill routing, identity system, USER/SYSTEM configuration architecture. The foundation pack that makes everything else work.@@ -8,16 +8,16 @@ type: featurepurpose-type: [productivity, automation, development]platform: claude-codedependencies:- - kai-hook-system (required) - Hooks enable session context loading and events- - kai-history-system (optional) - History capture for skill usage and learnings+ - pai-hook-system (required) - Hooks enable session context loading and events+ - pai-history-system (optional) - History capture for skill usage and learningskeywords: [core, identity, skills, routing, architecture, installation, foundation, personality, response-format, principles, user-config, system-config]---<p align="center">- <img src="../icons/kai-core-install.png" alt="Kai Core Install" width="256">+ <img src="../icons/pai-core-install.png" alt="Kai Core Install" width="256"></p>-# Kai Core Install (kai-core-install)+# Kai Core Install (pai-core-install)> The complete foundation for Personal AI Infrastructure - skill routing, identity framework, USER/SYSTEM configuration, and architecture tracking in one unified pack.@@ -182,8 +182,8 @@ keywords: [core, identity, skills, routing, architecture, installation, foundati- **USER/ files:** 15 templates- **SYSTEM/ files:** 17 templates- **Total files created:** 40+-- **Hooks registered:** 0 (uses hook system from kai-hook-system)-- **Dependencies:** kai-hook-system (required), kai-history-system (optional)+- **Hooks registered:** 0 (uses hook system from pai-hook-system)+- **Dependencies:** pai-hook-system (required), pai-history-system (optional)## The 15 Founding Principles@@ -211,9 +211,9 @@ keywords: [core, identity, skills, routing, architecture, installation, foundati## Works Well With-- **kai-hook-system** (required) - Enables automatic CORE loading at session start-- **kai-history-system** - Skills can reference past learnings and capture new ones-- **kai-voice-system** - Response format drives voice output+- **pai-hook-system** (required) - Enables automatic CORE loading at session start+- **pai-history-system** - Skills can reference past learnings and capture new ones+- **pai-voice-system** - Response format drives voice output## Changelogdiff --git a/Packs/kai-core-install/VERIFY.md b/Packs/pai-core-install/VERIFY.mdsimilarity index 100%rename from Packs/kai-core-install/VERIFY.mdrename to Packs/pai-core-install/VERIFY.mddiff --git a/Packs/kai-core-install/src/skills/CORE/SKILL.md b/Packs/pai-core-install/src/skills/CORE/SKILL.mdsimilarity index 100%rename from Packs/kai-core-install/src/skills/CORE/SKILL.mdrename to Packs/pai-core-install/src/skills/CORE/SKILL.mddiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/ACTIONS.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/ACTIONS.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/ACTIONS.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/ACTIONS.mdindex aa213a2f..252b1987 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/ACTIONS.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/ACTIONS.md@@ -9,7 +9,7 @@ workflow patterns with clear goals, verification criteria, and deliverables.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/ACTIONS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/ACTIONS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/ACTIONS.mdCUSTOMIZATION:- Create new actions in ${PAI_DIR}/ACTIONS/diff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/AGENTS.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/AGENTS.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/AGENTS.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/AGENTS.mdindex 3c194506..796468ff 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/AGENTS.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/AGENTS.md@@ -9,7 +9,7 @@ with distinct personalities, traits, and voices.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/AGENTS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/AGENTS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/AGENTS.mdCUSTOMIZATION:- [ ] Define your agent traitsdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/BACKUPS.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/BACKUPS.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/BACKUPS.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/BACKUPS.mdindex 9bae4326..2a75bc60 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/BACKUPS.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/BACKUPS.md@@ -9,7 +9,7 @@ to create them.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/BACKUPS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/BACKUPS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/BACKUPS.mdCUSTOMIZATION:- Adjust paths to match your PAI_DIRdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.mdindex 33d19ae9..2c07081b 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.md@@ -9,7 +9,7 @@ them with AI prompting. The foundational pattern for all PAI systems.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/CLIFIRSTARCHITECTURE.mdCUSTOMIZATION:- Apply this pattern to all new tools and systemsdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.mdindex e8aa3216..65d7e74c 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.md@@ -9,7 +9,7 @@ finding the right documentation file based on user queries.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/DOCUMENTATIONINDEX.mdCUSTOMIZATION:- [ ] Add entries for your custom documentationdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.mdindex 7e00e4a7..29805329 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.md@@ -10,7 +10,7 @@ per-task work directories.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/MEMORYSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/MEMORYSYSTEM.mdCUSTOMIZATION:- Paths use ${PAI_DIR} - replace with your installation directorydiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.mdindex 6de17bc1..a83840c7 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.md@@ -10,7 +10,7 @@ apply to ALL PAI implementations.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/PAISYSTEMARCHITECTURE.mdCUSTOMIZATION:- This file is GENERIC - it applies to all PAI implementationsdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/PIPELINES.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/PIPELINES.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/PIPELINES.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/PIPELINES.mdindex e633e623..445362dc 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/PIPELINES.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/PIPELINES.md@@ -10,7 +10,7 @@ between each step.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/PIPELINES.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/PIPELINES.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/PIPELINES.mdCUSTOMIZATION:- Create new pipelines in ${PAI_DIR}/PIPELINES/diff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/README.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/README.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/README.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/README.mdindex b05f1094..d80e6355 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/README.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/README.md@@ -9,7 +9,7 @@ your AI infrastructure operates - architecture, delegation, hooks, memory, etc.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/README.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/README.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/README.mdCUSTOMIZATION:- [ ] Update based on which system files you've installeddiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.mdindex 925e1dd7..1006dd02 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.md@@ -9,7 +9,7 @@ requests to appropriate providers (Bright Data, Apify, etc.).LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/SCRAPINGREFERENCE.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/SCRAPINGREFERENCE.mdCUSTOMIZATION:- [ ] Configure your scraping providersdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.mdsimilarity index 99%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.mdindex 4bfb842e..4c1a65dc 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.md@@ -9,7 +9,7 @@ naming conventions, and patterns for creating and organizing skills.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/SKILLSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/SKILLSYSTEM.mdCUSTOMIZATION:- This file defines system standards - modify carefullydiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.mdindex 24014b21..eb58a785 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.md@@ -9,7 +9,7 @@ titles with task summaries for visual feedback.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/TERMINALTABS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/TERMINALTABS.mdCUSTOMIZATION:- [ ] Configure stop-hook.ts for your terminaldiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.mdindex a9fde892..de0ee360 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.md@@ -9,7 +9,7 @@ when to use different agent types, and model selection for optimal performance.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/THEDELEGATIONSYSTEM.mdCUSTOMIZATION:- These patterns are generic and apply to all PAI implementationsdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.mdindex beba9c94..88d5c1a6 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.md@@ -9,7 +9,7 @@ Fabric patterns for content analysis, extraction, and transformation.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/THEFABRICSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/THEFABRICSYSTEM.mdCUSTOMIZATION:- [ ] Update patterns with: fabric -Udiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.mdindex d8460efd..691a5b22 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.md@@ -9,7 +9,7 @@ points - session start, tool use, session end.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/THEHOOKSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/THEHOOKSYSTEM.mdCUSTOMIZATION:- [ ] Configure your hooks in settings.jsondiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.mdindex 12e5c025..17a3beb3 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.md@@ -9,7 +9,7 @@ channels - voice, push, desktop, webhooks.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/THENOTIFICATIONSYSTEM.mdCUSTOMIZATION:- [ ] Configure your notification channelsdiff --git a/Packs/kai-core-install/src/skills/CORE/SYSTEM/TOOLS.md b/Packs/pai-core-install/src/skills/CORE/SYSTEM/TOOLS.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/SYSTEM/TOOLS.mdrename to Packs/pai-core-install/src/skills/CORE/SYSTEM/TOOLS.mdindex 9b9b9111..aeab0dab 100644--- a/Packs/kai-core-install/src/skills/CORE/SYSTEM/TOOLS.md+++ b/Packs/pai-core-install/src/skills/CORE/SYSTEM/TOOLS.md@@ -9,7 +9,7 @@ need separate skills. Simple utilities documented here, executed directly.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/SYSTEM/TOOLS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/SYSTEM/TOOLS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/SYSTEM/TOOLS.mdCUSTOMIZATION:- [ ] Add your own CLI toolsdiff --git a/Packs/kai-core-install/src/skills/CORE/SkillSystem.md b/Packs/pai-core-install/src/skills/CORE/SkillSystem.mdsimilarity index 100%rename from Packs/kai-core-install/src/skills/CORE/SkillSystem.mdrename to Packs/pai-core-install/src/skills/CORE/SkillSystem.mddiff --git a/Packs/kai-core-install/src/skills/CORE/USER/ABOUTME.md b/Packs/pai-core-install/src/skills/CORE/USER/ABOUTME.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/ABOUTME.mdrename to Packs/pai-core-install/src/skills/CORE/USER/ABOUTME.mdindex 2e87b381..e5dded40 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/ABOUTME.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/ABOUTME.md@@ -9,7 +9,7 @@ what you care about, and how to represent you authentically.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/ABOUTME.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/ABOUTME.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/ABOUTME.mdCUSTOMIZATION:- [ ] Fill in your personal backgrounddiff --git a/Packs/kai-core-install/src/skills/CORE/USER/ALGOPREFS.md b/Packs/pai-core-install/src/skills/CORE/USER/ALGOPREFS.mdsimilarity index 96%rename from Packs/kai-core-install/src/skills/CORE/USER/ALGOPREFS.mdrename to Packs/pai-core-install/src/skills/CORE/USER/ALGOPREFS.mdindex 214eb78e..02167163 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/ALGOPREFS.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/ALGOPREFS.md@@ -9,7 +9,7 @@ verification requirements, and workflow adjustments.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/ALGOPREFS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/ALGOPREFS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/ALGOPREFS.mdCUSTOMIZATION:- [ ] Add your own behavioral preferencesdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/ART.md b/Packs/pai-core-install/src/skills/CORE/USER/ART.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/ART.mdrename to Packs/pai-core-install/src/skills/CORE/USER/ART.mdindex e620ce80..102461ab 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/ART.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/ART.md@@ -9,7 +9,7 @@ or other visual content. Defines your aesthetic preferences and branding.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/ART.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/ART.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/ART.mdCUSTOMIZATION:- [ ] Define your visual style preferencesdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.md b/Packs/pai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.mdrename to Packs/pai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.mdindex e8b9467a..b6901cef 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.md@@ -10,7 +10,7 @@ and troubleshooting.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/ASSETMANAGEMENT.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/ASSETMANAGEMENT.mdCUSTOMIZATION:- [ ] Replace example entries with your actual web propertiesdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/BASICINFO.md b/Packs/pai-core-install/src/skills/CORE/USER/BASICINFO.mdsimilarity index 96%rename from Packs/kai-core-install/src/skills/CORE/USER/BASICINFO.mdrename to Packs/pai-core-install/src/skills/CORE/USER/BASICINFO.mdindex 5a5636f6..63552797 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/BASICINFO.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/BASICINFO.md@@ -9,7 +9,7 @@ official correspondence, and account management tasks.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/BASICINFO.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/BASICINFO.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/BASICINFO.mdCUSTOMIZATION:- [ ] Replace all [placeholder] values with your actual informationdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/CONTACTS.md b/Packs/pai-core-install/src/skills/CORE/USER/CONTACTS.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/CONTACTS.mdrename to Packs/pai-core-install/src/skills/CORE/USER/CONTACTS.mdindex 36161eb8..fb048412 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/CONTACTS.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/CONTACTS.md@@ -9,7 +9,7 @@ communication tasks, contact lookups, and relationship context.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/CONTACTS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/CONTACTS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/CONTACTS.mdCUSTOMIZATION:- [ ] Replace example entries with your actual contactsdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/CORECONTENT.md b/Packs/pai-core-install/src/skills/CORE/USER/CORECONTENT.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/CORECONTENT.mdrename to Packs/pai-core-install/src/skills/CORE/USER/CORECONTENT.mdindex fc2afc7e..6cd79482 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/CORECONTENT.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/CORECONTENT.md@@ -9,7 +9,7 @@ your canonical work, maintain consistency, and find relevant material.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/CORECONTENT.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/CORECONTENT.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/CORECONTENT.mdCUSTOMIZATION:- [ ] Replace example entries with your actual contentdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/DEFINITIONS.md b/Packs/pai-core-install/src/skills/CORE/USER/DEFINITIONS.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/DEFINITIONS.mdrename to Packs/pai-core-install/src/skills/CORE/USER/DEFINITIONS.mdindex 1fa715a7..9f59ea18 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/DEFINITIONS.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/DEFINITIONS.md@@ -9,7 +9,7 @@ these topics to ensure consistency with your established thinking.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/DEFINITIONS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/DEFINITIONS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/DEFINITIONS.mdCUSTOMIZATION:- [ ] Add your own canonical definitionsdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/IDENTITY.md b/Packs/pai-core-install/src/skills/CORE/USER/IDENTITY.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/USER/IDENTITY.mdrename to Packs/pai-core-install/src/skills/CORE/USER/IDENTITY.mdindex 38e228f3..1a05d1dc 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/IDENTITY.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/IDENTITY.md@@ -10,7 +10,7 @@ to YOUR assistant.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/IDENTITY.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/IDENTITY.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/IDENTITY.mdCUSTOMIZATION:- [ ] Choose a name for your AI assistantdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/README.md b/Packs/pai-core-install/src/skills/CORE/USER/README.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/README.mdrename to Packs/pai-core-install/src/skills/CORE/USER/README.mdindex 674d3a44..6d45ca6b 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/README.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/README.md@@ -10,7 +10,7 @@ life, work, preferences, and goals.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/README.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/README.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/README.mdCUSTOMIZATION:- [ ] Update directory descriptions to match your actual file organizationdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/REMINDERS.md b/Packs/pai-core-install/src/skills/CORE/USER/REMINDERS.mdsimilarity index 95%rename from Packs/kai-core-install/src/skills/CORE/USER/REMINDERS.mdrename to Packs/pai-core-install/src/skills/CORE/USER/REMINDERS.mdindex 50fb13a0..80efe95c 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/REMINDERS.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/REMINDERS.md@@ -9,7 +9,7 @@ tasks, follow-ups, and recurring items.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/REMINDERS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/REMINDERS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/REMINDERS.mdCUSTOMIZATION:- [ ] Add your own reminders using the format belowdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/RESUME.md b/Packs/pai-core-install/src/skills/CORE/USER/RESUME.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/RESUME.mdrename to Packs/pai-core-install/src/skills/CORE/USER/RESUME.mdindex 2e230c45..e8cc7a90 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/RESUME.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/RESUME.md@@ -9,7 +9,7 @@ professional communications.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/RESUME.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/RESUME.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/RESUME.mdCUSTOMIZATION:- [ ] Replace all placeholder values with your actual informationdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.md b/Packs/pai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.mdrename to Packs/pai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.mdindex 24e69008..aa0f1905 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.md@@ -10,7 +10,7 @@ defenses.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/SECURITYSYSTEM.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/SECURITYSYSTEM.mdCUSTOMIZATION:- [ ] Configure permission settings for your setupdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.md b/Packs/pai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.mdsimilarity index 98%rename from Packs/kai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.mdrename to Packs/pai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.mdindex 6ca59fd2..67f37b62 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.md@@ -10,7 +10,7 @@ formats, and workflow patterns.LOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/TECHSTACKPREFERENCES.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/TECHSTACKPREFERENCES.mdCUSTOMIZATION:- [ ] Adjust language preferences to match your stackdiff --git a/Packs/kai-core-install/src/skills/CORE/USER/TELOS.md b/Packs/pai-core-install/src/skills/CORE/USER/TELOS.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/USER/TELOS.mdrename to Packs/pai-core-install/src/skills/CORE/USER/TELOS.mdindex de88093c..8b250cc5 100644--- a/Packs/kai-core-install/src/skills/CORE/USER/TELOS.md+++ b/Packs/pai-core-install/src/skills/CORE/USER/TELOS.md@@ -11,7 +11,7 @@ TELOS (Greek: τέλος) means "end, purpose, goal" - the ultimate aim of sometLOCATION:- Kai (Private): ${PAI_DIR}/skills/CORE/USER/TELOS.md-- PAI Pack: Packs/kai-core-install/src/skills/CORE/USER/TELOS.md+- PAI Pack: Packs/pai-core-install/src/skills/CORE/USER/TELOS.mdCUSTOMIZATION:- [ ] Define your life areasdiff --git a/Packs/kai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.md b/Packs/pai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.mdsimilarity index 97%rename from Packs/kai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.mdrename to Packs/pai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.mdindex ee6d132d..2d72ab9a 100644--- a/Packs/kai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.md+++ b/Packs/pai-core-install/src/skills/CORE/Workflows/UpdateDocumentation.md@@ -82,7 +82,7 @@ bun run $PAI_DIR/Tools/PaiArchitecture.ts generate📋 SUMMARY: Updated PAI Architecture documentation⚡ ACTIONS:- Regenerated Architecture.md- - Logged upgrade: "Installed kai-voice-system v1.0.0"+ - Logged upgrade: "Installed pai-voice-system v1.0.0"- Verified system health✅ RESULTS: Architecture.md now shows 4 packs, 1 bundle📊 STATUS: All systems healthydiff --git a/Packs/kai-core-install/src/skills/CreateSkill/SKILL.md b/Packs/pai-core-install/src/skills/CreateSkill/SKILL.mdsimilarity index 100%rename from Packs/kai-core-install/src/skills/CreateSkill/SKILL.mdrename to Packs/pai-core-install/src/skills/CreateSkill/SKILL.mddiff --git a/Packs/kai-core-install/src/tools/GenerateSkillIndex.ts b/Packs/pai-core-install/src/tools/GenerateSkillIndex.tssimilarity index 100%rename from Packs/kai-core-install/src/tools/GenerateSkillIndex.tsrename to Packs/pai-core-install/src/tools/GenerateSkillIndex.tsdiff --git a/Packs/kai-core-install/src/tools/PaiArchitecture.ts b/Packs/pai-core-install/src/tools/PaiArchitecture.tssimilarity index 100%rename from Packs/kai-core-install/src/tools/PaiArchitecture.tsrename to Packs/pai-core-install/src/tools/PaiArchitecture.tsdiff --git a/Packs/kai-core-install/src/tools/SkillSearch.ts b/Packs/pai-core-install/src/tools/SkillSearch.tssimilarity index 100%rename from Packs/kai-core-install/src/tools/SkillSearch.tsrename to Packs/pai-core-install/src/tools/SkillSearch.tsdiff --git a/Packs/kai-history-system/INSTALL.md b/Packs/pai-history-system/INSTALL.mdsimilarity index 95%rename from Packs/kai-history-system/INSTALL.mdrename to Packs/pai-history-system/INSTALL.mdindex ffbd09ae..d0ba23aa 100644--- a/Packs/kai-history-system/INSTALL.md+++ b/Packs/pai-history-system/INSTALL.md@@ -25,7 +25,7 @@ This pack adds automatic memory to your entire AI infrastructure. The Kai Histor- **Bun runtime**: `curl -fsSL https://bun.sh/install | bash`- **Claude Code** (or compatible agent system with hook support)- **Write access** to `$PAI_DIR/` (or your PAI directory)-- **kai-hook-system Pack** installed (this pack depends on the hook infrastructure)+- **pai-hook-system Pack** installed (this pack depends on the hook infrastructure)---@@ -40,7 +40,7 @@ PAI_CHECK="${PAI_DIR:-$HOME/.config/pai}"if [ -f "$PAI_CHECK/hooks/lib/observability.ts" ]; thenecho "✓ Hook system is installed"else- echo "❌ Hook system NOT installed - install kai-hook-system first!"+ echo "❌ Hook system NOT installed - install pai-hook-system first!"fi# Check hooks directory exists@@ -48,7 +48,7 @@ if [ -d "$PAI_CHECK/hooks" ]; thenecho "✓ Hooks directory exists"ls "$PAI_CHECK/hooks"/*.ts 2>/dev/null | head -5else- echo "❌ Hooks directory missing - install kai-hook-system first!"+ echo "❌ Hooks directory missing - install pai-hook-system first!"fi```diff --git a/Packs/kai-history-system/README.md b/Packs/pai-history-system/README.mdsimilarity index 96%rename from Packs/kai-history-system/README.mdrename to Packs/pai-history-system/README.mdindex 4157daf1..ca4d2750 100644--- a/Packs/kai-history-system/README.md+++ b/Packs/pai-history-system/README.md@@ -1,6 +1,6 @@---name: Kai History System-pack-id: danielmiessler-kai-history-system-core-v1.0.1+pack-id: danielmiessler-pai-history-system-core-v1.0.1version: 1.0.1author: danielmiesslerdescription: Granular context-tracking system for the entire AI infrastructure - captures all work, decisions, and learnings automatically@@ -8,15 +8,15 @@ type: featurepurpose-type: [productivity, automation, development]platform: claude-codedependencies:- - kai-hook-system (required) - History capture depends on hook events+ - pai-hook-system (required) - History capture depends on hook eventskeywords: [history, documentation, memory, capture, hooks, sessions, learnings, automation, context, recovery, debugging]---<p align="center">- <img src="../icons/kai-history-system.png" alt="Kai History System" width="256">+ <img src="../icons/pai-history-system.png" alt="Kai History System" width="256"></p>-# Kai History System (kai-history-system)+# Kai History System (pai-history-system)> Granular context-tracking system for the entire AI infrastructure - captures all work, decisions, and learnings automatically with zero manual effort@@ -38,7 +38,7 @@ keywords: [history, documentation, memory, capture, hooks, sessions, learnings,**Summary:**- **Files created:** 6 + history directory structure- **Hooks registered:** 7 (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit)-- **Dependencies:** kai-hook-system (required)+- **Dependencies:** pai-hook-system (required)## The Problem@@ -207,9 +207,9 @@ See [VERIFY.md](VERIFY.md) for testing and verification procedures.## Related Packs-- **kai-hook-system** - Required foundation; provides the event stream-- **kai-core-install** - Skills can reference past learnings-- **kai-voice-system** - Voice notifications for significant captures+- **pai-hook-system** - Required foundation; provides the event stream+- **pai-core-install** - Skills can reference past learnings+- **pai-voice-system** - Voice notifications for significant captures## Changelogdiff --git a/Packs/kai-history-system/VERIFY.md b/Packs/pai-history-system/VERIFY.mdsimilarity index 100%rename from Packs/kai-history-system/VERIFY.mdrename to Packs/pai-history-system/VERIFY.mddiff --git a/Packs/kai-history-system/config/settings-hooks.json b/Packs/pai-history-system/config/settings-hooks.jsonsimilarity index 100%rename from Packs/kai-history-system/config/settings-hooks.jsonrename to Packs/pai-history-system/config/settings-hooks.jsondiff --git a/Packs/kai-history-system/src/capture-all-events.ts b/Packs/pai-history-system/src/capture-all-events.tssimilarity index 100%rename from Packs/kai-history-system/src/capture-all-events.tsrename to Packs/pai-history-system/src/capture-all-events.tsdiff --git a/Packs/kai-history-system/src/capture-session-summary.ts b/Packs/pai-history-system/src/capture-session-summary.tssimilarity index 100%rename from Packs/kai-history-system/src/capture-session-summary.tsrename to Packs/pai-history-system/src/capture-session-summary.tsdiff --git a/Packs/kai-history-system/src/stop-hook.ts b/Packs/pai-history-system/src/stop-hook.tssimilarity index 100%rename from Packs/kai-history-system/src/stop-hook.tsrename to Packs/pai-history-system/src/stop-hook.tsdiff --git a/Packs/kai-history-system/src/subagent-stop-hook.ts b/Packs/pai-history-system/src/subagent-stop-hook.tssimilarity index 100%rename from Packs/kai-history-system/src/subagent-stop-hook.tsrename to Packs/pai-history-system/src/subagent-stop-hook.tsdiff --git a/Packs/kai-hook-system/INSTALL.md b/Packs/pai-hook-system/INSTALL.mdsimilarity index 100%rename from Packs/kai-hook-system/INSTALL.mdrename to Packs/pai-hook-system/INSTALL.mddiff --git a/Packs/kai-hook-system/README.md b/Packs/pai-hook-system/README.mdsimilarity index 97%rename from Packs/kai-hook-system/README.mdrename to Packs/pai-hook-system/README.mdindex 9b11e8d3..34040bd6 100644--- a/Packs/kai-hook-system/README.md+++ b/Packs/pai-hook-system/README.md@@ -1,6 +1,6 @@---name: Kai Hook System-pack-id: danielmiessler-kai-hook-system-core-v1.0.0+pack-id: danielmiessler-pai-hook-system-core-v1.0.0version: 1.0.0author: danielmiesslerdescription: Event-driven automation framework for Claude Code - the foundation for all hook-based capabilities including security validation, session management, and context injection@@ -12,10 +12,10 @@ keywords: [hooks, automation, events, security, validation, sessions, context, c---<p align="center">- <img src="../icons/kai-hook-system.png" alt="Kai Hook System" width="256">+ <img src="../icons/pai-hook-system.png" alt="Kai Hook System" width="256"></p>-# Kai Hook System (kai-hook-system)+# Kai Hook System (pai-hook-system)> Event-driven automation framework for Claude Code - the foundation for all hook-based capabilities@@ -259,9 +259,9 @@ See [VERIFY.md](VERIFY.md) for testing and verification procedures.## Related Packs-- **kai-history-system** - Uses hooks for capturing session work and learnings-- **kai-voice-system** - Uses hooks for voice notification triggers-- **kai-core-install** - Uses SessionStart hooks for CORE skill context injection+- **pai-history-system** - Uses hooks for capturing session work and learnings+- **pai-voice-system** - Uses hooks for voice notification triggers+- **pai-core-install** - Uses SessionStart hooks for CORE skill context injection## Changelogdiff --git a/Packs/kai-hook-system/VERIFY.md b/Packs/pai-hook-system/VERIFY.mdsimilarity index 100%rename from Packs/kai-hook-system/VERIFY.mdrename to Packs/pai-hook-system/VERIFY.mddiff --git a/Packs/kai-hook-system/config/settings-hooks.json b/Packs/pai-hook-system/config/settings-hooks.jsonsimilarity index 100%rename from Packs/kai-hook-system/config/settings-hooks.jsonrename to Packs/pai-hook-system/config/settings-hooks.jsondiff --git a/Packs/kai-hook-system/src/initialize-session.ts b/Packs/pai-hook-system/src/initialize-session.tssimilarity index 100%rename from Packs/kai-hook-system/src/initialize-session.tsrename to Packs/pai-hook-system/src/initialize-session.tsdiff --git a/Packs/kai-hook-system/src/load-core-context.ts b/Packs/pai-hook-system/src/load-core-context.tssimilarity index 100%rename from Packs/kai-hook-system/src/load-core-context.tsrename to Packs/pai-hook-system/src/load-core-context.tsdiff --git a/Packs/kai-hook-system/src/security-validator.ts b/Packs/pai-hook-system/src/security-validator.tssimilarity index 100%rename from Packs/kai-hook-system/src/security-validator.tsrename to Packs/pai-hook-system/src/security-validator.tsdiff --git a/Packs/kai-hook-system/src/update-tab-titles.ts b/Packs/pai-hook-system/src/update-tab-titles.tssimilarity index 100%rename from Packs/kai-hook-system/src/update-tab-titles.tsrename to Packs/pai-hook-system/src/update-tab-titles.tsdiff --git a/Packs/kai-observability-server/INSTALL.md b/Packs/pai-observability-server/INSTALL.mdsimilarity index 98%rename from Packs/kai-observability-server/INSTALL.mdrename to Packs/pai-observability-server/INSTALL.mdindex 303d0da8..47b69547 100644--- a/Packs/kai-observability-server/INSTALL.md+++ b/Packs/pai-observability-server/INSTALL.md@@ -5,7 +5,7 @@- **Bun runtime**: `curl -fsSL https://bun.sh/install | bash`- **Node.js 18+** (for Vite dev server)- **Claude Code** (or compatible agent system)-- **kai-hook-system** pack installed+- **pai-hook-system** pack installed- **Write access** to `$PAI_DIR/`## Pre-Installation Checks@@ -13,7 +13,7 @@### Verify Hook System```bash-# Check that kai-hook-system is installed+# Check that pai-hook-system is installedls -la $PAI_DIR/hooks/# Should show: security-validator.ts, initialize-session.ts, etc.diff --git a/Packs/kai-observability-server/README.md b/Packs/pai-observability-server/README.mdsimilarity index 97%rename from Packs/kai-observability-server/README.mdrename to Packs/pai-observability-server/README.mdindex d8bf7a38..aa56f8d7 100644--- a/Packs/kai-observability-server/README.md+++ b/Packs/pai-observability-server/README.md@@ -1,13 +1,13 @@---name: Kai Observability Server-pack-id: danielmiessler-kai-observability-server-core-v1.0.0+pack-id: danielmiessler-pai-observability-server-core-v1.0.0version: 1.0.0author: danielmiesslerdescription: Real-time multi-agent activity monitoring dashboard with WebSocket streamingtype: featurepurpose-type: [observability, monitoring, development, debugging]platform: claude-code-dependencies: [kai-hook-system]+dependencies: [pai-hook-system]keywords: [observability, dashboard, monitoring, agents, websocket, streaming, events, debugging, visualization, real-time]---@@ -153,7 +153,7 @@ $PAI_DIR/## Dependencies-- **kai-hook-system** (required) - Provides the hook infrastructure+- **pai-hook-system** (required) - Provides the hook infrastructure- **Bun runtime** - For TypeScript execution- **Node.js 18+** - For Vite dev server@@ -180,8 +180,8 @@ Open http://localhost:5172 to view the dashboard.## Related Packs-- **kai-hook-system** - Required dependency-- **kai-history-system** - Permanent storage of events+- **pai-hook-system** - Required dependency+- **pai-history-system** - Permanent storage of events## Changelogdiff --git a/Packs/kai-observability-server/VERIFY.md b/Packs/pai-observability-server/VERIFY.mdsimilarity index 100%rename from Packs/kai-observability-server/VERIFY.mdrename to Packs/pai-observability-server/VERIFY.mddiff --git a/Packs/kai-observability-server/config/settings-hooks.json b/Packs/pai-observability-server/config/settings-hooks.jsonsimilarity index 100%rename from Packs/kai-observability-server/config/settings-hooks.jsonrename to Packs/pai-observability-server/config/settings-hooks.jsondiff --git a/Packs/kai-observability-server/src/hooks/lib/metadata-extraction.ts b/Packs/pai-observability-server/src/hooks/lib/metadata-extraction.tssimilarity index 100%rename from Packs/kai-observability-server/src/hooks/lib/metadata-extraction.tsrename to Packs/pai-observability-server/src/hooks/lib/metadata-extraction.tsdiff --git a/Packs/kai-observability-server/src/observability/apps/client/index.html b/Packs/pai-observability-server/src/observability/apps/client/index.htmlsimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/index.htmlrename to Packs/pai-observability-server/src/observability/apps/client/index.htmldiff --git a/Packs/kai-observability-server/src/observability/apps/client/package.json b/Packs/pai-observability-server/src/observability/apps/client/package.jsonsimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/package.jsonrename to Packs/pai-observability-server/src/observability/apps/client/package.jsondiff --git a/Packs/kai-observability-server/src/observability/apps/client/postcss.config.js b/Packs/pai-observability-server/src/observability/apps/client/postcss.config.jssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/postcss.config.jsrename to Packs/pai-observability-server/src/observability/apps/client/postcss.config.jsdiff --git a/Packs/kai-observability-server/src/observability/apps/client/src/App.vue b/Packs/pai-observability-server/src/observability/apps/client/src/App.vuesimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/src/App.vuerename to Packs/pai-observability-server/src/observability/apps/client/src/App.vuediff --git a/Packs/kai-observability-server/src/observability/apps/client/src/main.ts b/Packs/pai-observability-server/src/observability/apps/client/src/main.tssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/src/main.tsrename to Packs/pai-observability-server/src/observability/apps/client/src/main.tsdiff --git a/Packs/kai-observability-server/src/observability/apps/client/src/style.css b/Packs/pai-observability-server/src/observability/apps/client/src/style.csssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/src/style.cssrename to Packs/pai-observability-server/src/observability/apps/client/src/style.cssdiff --git a/Packs/kai-observability-server/src/observability/apps/client/tailwind.config.js b/Packs/pai-observability-server/src/observability/apps/client/tailwind.config.jssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/tailwind.config.jsrename to Packs/pai-observability-server/src/observability/apps/client/tailwind.config.jsdiff --git a/Packs/kai-observability-server/src/observability/apps/client/vite.config.ts b/Packs/pai-observability-server/src/observability/apps/client/vite.config.tssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/client/vite.config.tsrename to Packs/pai-observability-server/src/observability/apps/client/vite.config.tsdiff --git a/Packs/kai-observability-server/src/observability/apps/server/package.json b/Packs/pai-observability-server/src/observability/apps/server/package.jsonsimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/server/package.jsonrename to Packs/pai-observability-server/src/observability/apps/server/package.jsondiff --git a/Packs/kai-observability-server/src/observability/apps/server/src/file-ingest.ts b/Packs/pai-observability-server/src/observability/apps/server/src/file-ingest.tssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/server/src/file-ingest.tsrename to Packs/pai-observability-server/src/observability/apps/server/src/file-ingest.tsdiff --git a/Packs/kai-observability-server/src/observability/apps/server/src/index.ts b/Packs/pai-observability-server/src/observability/apps/server/src/index.tssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/server/src/index.tsrename to Packs/pai-observability-server/src/observability/apps/server/src/index.tsdiff --git a/Packs/kai-observability-server/src/observability/apps/server/src/types.ts b/Packs/pai-observability-server/src/observability/apps/server/src/types.tssimilarity index 100%rename from Packs/kai-observability-server/src/observability/apps/server/src/types.tsrename to Packs/pai-observability-server/src/observability/apps/server/src/types.tsdiff --git a/Packs/kai-prompting-skill/INSTALL.md b/Packs/pai-prompting-skill/INSTALL.mdsimilarity index 95%rename from Packs/kai-prompting-skill/INSTALL.mdrename to Packs/pai-prompting-skill/INSTALL.mdindex 65f4c55a..633caf82 100644--- a/Packs/kai-prompting-skill/INSTALL.md+++ b/Packs/pai-prompting-skill/INSTALL.md@@ -4,7 +4,7 @@- **Bun runtime**: `curl -fsSL https://bun.sh/install | bash`- **Claude Code** (or compatible agent system)-- **kai-core-install Pack** installed (required for Skills directory)+- **pai-core-install Pack** installed (required for Skills directory)## Step 1: Create Directory Structure@@ -40,7 +40,7 @@ bun init -ybun add handlebars yaml```-## Step 4: Generate Skill Index (If Using kai-core-install)+## Step 4: Generate Skill Index (If Using pai-core-install)```bashbun run $PAI_DIR/Tools/GenerateSkillIndex.ts@@ -49,7 +49,7 @@ bun run $PAI_DIR/Tools/GenerateSkillIndex.ts## Step 5: Update Architecture```bash-bun run $PAI_DIR/Tools/PaiArchitecture.ts log-upgrade "Installed kai-prompting-skill v1.0.0" pack+bun run $PAI_DIR/Tools/PaiArchitecture.ts log-upgrade "Installed pai-prompting-skill v1.0.0" packbun run $PAI_DIR/Tools/PaiArchitecture.ts generate```diff --git a/Packs/kai-prompting-skill/README.md b/Packs/pai-prompting-skill/README.mdsimilarity index 95%rename from Packs/kai-prompting-skill/README.mdrename to Packs/pai-prompting-skill/README.mdindex 96e28735..273deb09 100644--- a/Packs/kai-prompting-skill/README.md+++ b/Packs/pai-prompting-skill/README.md@@ -1,6 +1,6 @@---name: Kai Prompting Skill-pack-id: danielmiessler-kai-prompting-skill-v1.0.0+pack-id: danielmiessler-pai-prompting-skill-v1.0.0version: 1.0.0author: danielmiesslerdescription: Meta-prompting system for dynamic prompt generation using Handlebars templates, Claude 4.x best practices, and the Fabric pattern system. Includes the Ultimate Prompt Template, five core primitives (Roster, Voice, Structure, Briefing, Gate), and CLI tools for rendering and validation.@@ -8,12 +8,12 @@ type: featurepurpose-type: [productivity, development, automation]platform: claude-codedependencies:- - kai-core-install (required) - Skills directory structure and routing- - kai-hook-system (optional) - For session startup context loading+ - pai-core-install (required) - Skills directory structure and routing+ - pai-hook-system (optional) - For session startup context loadingkeywords: [prompting, templates, handlebars, meta-prompting, prompt-engineering, fabric, claude-4, context-engineering, templating]----# Kai Prompting Skill (kai-prompting-skill)+# Kai Prompting Skill (pai-prompting-skill)> Prompts that write prompts. Meta-prompting enables dynamic composition where structure is fixed but content is parameterized.@@ -42,7 +42,7 @@ This Pack provides a complete prompt engineering system:## Architecture```-kai-prompting-skill/+pai-prompting-skill/├── README.md # This file├── INSTALL.md # Installation instructions├── VERIFY.md # Verification checklistdiff --git a/Packs/kai-prompting-skill/VERIFY.md b/Packs/pai-prompting-skill/VERIFY.mdsimilarity index 100%rename from Packs/kai-prompting-skill/VERIFY.mdrename to Packs/pai-prompting-skill/VERIFY.mddiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/SKILL.md b/Packs/pai-prompting-skill/src/skills/Prompting/SKILL.mdsimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/SKILL.mdrename to Packs/pai-prompting-skill/src/skills/Prompting/SKILL.mddiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Standards.md b/Packs/pai-prompting-skill/src/skills/Prompting/Standards.mdsimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Standards.mdrename to Packs/pai-prompting-skill/src/skills/Prompting/Standards.mddiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Briefing.hbs b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Briefing.hbssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Briefing.hbsrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Briefing.hbsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Gate.hbs b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Gate.hbssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Gate.hbsrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Gate.hbsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Roster.hbs b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Roster.hbssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Roster.hbsrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Roster.hbsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Structure.hbs b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Structure.hbssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Structure.hbsrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Structure.hbsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Voice.hbs b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Voice.hbssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/Primitives/Voice.hbsrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/Primitives/Voice.hbsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Templates/README.md b/Packs/pai-prompting-skill/src/skills/Prompting/Templates/README.mdsimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Templates/README.mdrename to Packs/pai-prompting-skill/src/skills/Prompting/Templates/README.mddiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Tools/RenderTemplate.ts b/Packs/pai-prompting-skill/src/skills/Prompting/Tools/RenderTemplate.tssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Tools/RenderTemplate.tsrename to Packs/pai-prompting-skill/src/skills/Prompting/Tools/RenderTemplate.tsdiff --git a/Packs/kai-prompting-skill/src/skills/Prompting/Tools/ValidateTemplate.ts b/Packs/pai-prompting-skill/src/skills/Prompting/Tools/ValidateTemplate.tssimilarity index 100%rename from Packs/kai-prompting-skill/src/skills/Prompting/Tools/ValidateTemplate.tsrename to Packs/pai-prompting-skill/src/skills/Prompting/Tools/ValidateTemplate.tsdiff --git a/Packs/pai-upgrades-skill/INSTALL.md b/Packs/pai-upgrades-skill/INSTALL.mdnew file mode 100644index 00000000..0968e5ae--- /dev/null+++ b/Packs/pai-upgrades-skill/INSTALL.md@@ -0,0 +1,165 @@+# PAI Upgrades Skill Installation++> **FOR AI AGENTS:** Follow these steps in order. Complete each step fully before proceeding.++---++## Prerequisites++- pai-core-install must be installed (provides skills directory structure)+- [yt-dlp](https://github.com/yt-dlp/yt-dlp) for YouTube monitoring (optional)++---++## Installation Steps++### Step 1: Create Directory Structure++```bash+mkdir -p ~/.claude/skills/Upgrades/{Workflows,Tools,State}+mkdir -p ~/.claude/SKILLCUSTOMIZATIONS/Upgrades+```++### Step 2: Copy Skill Files++Copy all files from `src/skills/Upgrades/` to `~/.claude/skills/Upgrades/`:++```bash+# From this pack's src directory+cp -r src/skills/Upgrades/* ~/.claude/skills/Upgrades/+```++**Files to copy:**+- `SKILL.md` - Main skill routing+- `sources.json` - Anthropic sources configuration+- `youtube-channels.json` - Base channels (empty)+- `Workflows/Anthropic.md` - Anthropic check workflow+- `Workflows/YouTube.md` - YouTube monitoring workflow+- `Workflows/ReleaseNotesDeepDive.md` - Deep research workflow+- `Tools/Anthropic.ts` - Source checking tool++### Step 3: Initialize State Directory++Create empty state files:++```bash+echo '{"last_check_timestamp": null, "sources": {}}' > ~/.claude/skills/Upgrades/State/last-check.json+echo '{"last_check_timestamp": null, "channels": {}}' > ~/.claude/skills/Upgrades/State/youtube-videos.json+```++### Step 4: Set Up YouTube Customization (Optional)++Create your personal YouTube channels file:++```bash+cat > ~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json << 'EOF'+{+ "_customization": {+ "description": "Your personal YouTube channels for AI development content",+ "merge_strategy": "append"+ },+ "channels": [+ {+ "name": "Indy Dev Dan",+ "channel_id": "@indydevdan",+ "url": "https://www.youtube.com/@indydevdan",+ "priority": "HIGH",+ "description": "Claude Code tutorials and AI development"+ }+ ]+}+EOF+```++Add more channels by editing this file.++### Step 5: Create Customization Extension Manifest (Optional)++```bash+cat > ~/.claude/SKILLCUSTOMIZATIONS/Upgrades/EXTEND.yaml << 'EOF'+# Extension manifest for Upgrades skill customization+skill: Upgrades+version: 1.0.0+files:+ - youtube-channels.json # Your personal YouTube channels+EOF+```++### Step 6: Install yt-dlp (Optional, for YouTube Monitoring)++```bash+# macOS+brew install yt-dlp++# Or via pip+pip install yt-dlp+```++### Step 7: Verify Installation++Run the verification checklist in `VERIFY.md`.++---++## Post-Installation++### Add More YouTube Channels++Edit your customization file:+```bash+~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json+```++Add channels in this format:+```json+{+ "name": "Channel Name",+ "channel_id": "@channelhandle",+ "url": "https://www.youtube.com/@channelhandle",+ "priority": "HIGH",+ "description": "What this channel covers"+}+```++### Test the Skill++```+"Check for Anthropic updates"+"Any new videos from my YouTube channels?"+"Deep dive the latest Claude Code release notes"+```++---++## Troubleshooting++### "yt-dlp not found"++Install yt-dlp:+```bash+brew install yt-dlp+```++### State files not updating++Check permissions:+```bash+ls -la ~/.claude/skills/Upgrades/State/+```++### YouTube channels not loading++Verify customization file exists:+```bash+cat ~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json+```++---++## Next Steps++After installation:+1. Add your preferred YouTube channels to the customization file+2. Run "check for updates" to test Anthropic monitoring+3. Run "check YouTube" to test channel monitoring+4. Use "deep dive release notes" after major Claude Code releasesdiff --git a/Packs/pai-upgrades-skill/README.md b/Packs/pai-upgrades-skill/README.mdnew file mode 100644index 00000000..379aba12--- /dev/null+++ b/Packs/pai-upgrades-skill/README.md@@ -0,0 +1,183 @@+---+name: PAI Upgrades Skill+pack-id: danielmiessler-pai-upgrades-skill-v1.0.0+version: 1.0.0+author: danielmiessler+description: Monitor Anthropic ecosystem (30+ sources) and AI development YouTube channels for updates that can improve your PAI infrastructure. Includes deep research workflows that spawn parallel agents to find documentation and generate prioritized upgrade recommendations.+type: feature+purpose-type: [productivity, research, automation]+platform: claude-code+dependencies:+ - pai-core-install (required) - Skills directory structure and routing+ - pai-hook-system (optional) - For automated startup checks+keywords: [upgrades, anthropic, claude-code, monitoring, changelog, youtube, release-notes, research, automation]+---++# PAI Upgrades Skill (pai-upgrades-skill)++> Stay ahead of Claude Code, MCP, and Anthropic ecosystem updates. Monitor 30+ official sources and AI development YouTube channels, then get prioritized recommendations for your system.++> **Installation:** This pack is designed for AI-assisted installation. Give this directory to your AI and ask it to install using the wizard in `INSTALL.md`. The installation dynamically adapts to your system state.++---++## What This Pack Does++**Anthropic Ecosystem Monitoring (30+ Sources)**+- Official blogs: Anthropic News, Alignment Science, Research+- GitHub repos: claude-code, skills, MCP, SDKs, cookbooks, courses+- Changelogs: Claude Code CHANGELOG, API release notes, MCP changelog+- Documentation: Claude docs, API docs, MCP spec, MCP registry+- Community: Discord server activity++**YouTube Channel Monitoring**+- Configurable channel list via customization layer+- Automatic new video detection+- Transcript extraction for analysis+- Prioritized by channel importance++**Release Notes Deep Dive**+- Parse `/release-notes` output+- Spawn parallel research agents per feature+- Search GitHub, docs, blogs for deeper documentation+- Generate prioritized upgrade roadmap with citations++**The Core Value:** Never miss an important Claude Code feature. Get actionable upgrade recommendations mapped to your specific system architecture.++## Architecture++```+pai-upgrades-skill/+├── README.md # This file+├── INSTALL.md # Installation instructions+├── VERIFY.md # Verification checklist+└── src/+ └── skills/+ └── Upgrades/+ ├── SKILL.md # Main skill routing+ ├── sources.json # 30+ Anthropic sources+ ├── youtube-channels.json # Base channels (empty)+ ├── Workflows/+ │ ├── Anthropic.md # Check Anthropic updates+ │ ├── YouTube.md # Check YouTube channels+ │ └── ReleaseNotesDeepDive.md # Deep research workflow+ ├── Tools/+ │ └── Anthropic.ts # Source checking tool+ └── State/+ └── (runtime state files)+```++## Workflow Routing++| Workflow | Trigger | Purpose |+|----------|---------|---------|+| **Anthropic** | "check Anthropic", "new Claude features" | Check all official sources |+| **YouTube** | "check YouTube", "new videos" | Monitor configured channels |+| **ReleaseNotesDeepDive** | "analyze release notes", "deep dive features" | Research each feature in depth |+| **All** | "check for updates", "check upgrades" | Run both Anthropic + YouTube |++## The Problem This Solves++### Without This Skill++1. **Missing Features** - Claude Code ships updates constantly, you miss most of them+2. **Manual Checking** - Have to manually visit 30+ sources+3. **No Context** - Release notes lack implementation details+4. **No Prioritization** - All features seem equally important+5. **No System Mapping** - No connection between features and your architecture++### With This Skill++1. **Automated Monitoring** - All sources checked with one command+2. **Deep Research** - Parallel agents find documentation you'd never find+3. **Prioritized Roadmap** - HIGH/MEDIUM/ASPIRATIONAL categorization+4. **System Integration** - Features mapped to your specific PAI components+5. **Customizable Sources** - Add your own YouTube channels via customization layer++## Customization Layer++Personal YouTube channels are configured via the skill customization layer, NOT in the skill itself:++```+~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json+```++Example customization:+```json+{+ "_customization": {+ "description": "Your personal YouTube channels",+ "merge_strategy": "append"+ },+ "channels": [+ {+ "name": "Indy Dev Dan",+ "channel_id": "@indydevdan",+ "url": "https://www.youtube.com/@indydevdan",+ "priority": "HIGH",+ "description": "Claude Code tutorials and AI development"+ }+ ]+}+```++## Quick Start++```bash+# Check all Anthropic sources+"check for Anthropic updates"++# Check YouTube channels for new videos+"any new AI development videos?"++# Deep dive on release notes+"deep dive the latest Claude Code release notes"+```++## Sources Monitored++### Blogs & News (4)+- Anthropic Main Blog+- Alignment Science Blog+- Research Page+- Transformer Circuits++### GitHub Repositories (9+)+- anthropics/claude-code+- anthropics/skills+- modelcontextprotocol/modelcontextprotocol+- modelcontextprotocol/docs+- anthropics/claude-cookbooks+- anthropics/anthropic-sdk-python+- anthropics/anthropic-sdk-typescript+- anthropics/courses+- anthropics/claude-quickstarts++### Changelogs (4)+- Claude Code CHANGELOG.md+- Claude Docs Release Notes+- API Release Notes+- MCP Changelog++### Documentation (6)+- Claude Docs (docs.claude.com)+- Anthropic API Docs (docs.anthropic.com)+- MCP Docs (modelcontextprotocol.io)+- MCP Specification (spec.modelcontextprotocol.io)+- MCP Registry+- Skills Documentation++## Credits++- **Author:** Daniel Miessler+- **Origin:** Extracted from production Kai system (2024-2026)+- **License:** MIT++## Changelog++### 1.0.0 - 2026-01-08+- Initial release+- 30+ Anthropic sources configured+- YouTube monitoring with customization layer+- ReleaseNotesDeepDive workflow for parallel research+- State tracking to avoid duplicate notificationsdiff --git a/Packs/pai-upgrades-skill/VERIFY.md b/Packs/pai-upgrades-skill/VERIFY.mdnew file mode 100644index 00000000..c0ce6702--- /dev/null+++ b/Packs/pai-upgrades-skill/VERIFY.md@@ -0,0 +1,157 @@+# PAI Upgrades Skill Verification++> **FOR AI AGENTS:** Complete this checklist AFTER installation. Every item must pass before declaring the pack installed.++---++## Directory Structure Verification++```bash+# Run these commands and verify output+```++### Check skill directory exists+```bash+ls -la ~/.claude/skills/Upgrades/+```+**Expected:** Directory with SKILL.md, sources.json, youtube-channels.json, Workflows/, Tools/, State/++### Check workflow files+```bash+ls ~/.claude/skills/Upgrades/Workflows/+```+**Expected:** Anthropic.md, YouTube.md, ReleaseNotesDeepDive.md++### Check tools+```bash+ls ~/.claude/skills/Upgrades/Tools/+```+**Expected:** Anthropic.ts++### Check state directory+```bash+ls ~/.claude/skills/Upgrades/State/+```+**Expected:** last-check.json, youtube-videos.json++---++## File Content Verification++### SKILL.md contains workflow routing+```bash+grep "Workflow Routing" ~/.claude/skills/Upgrades/SKILL.md+```+**Expected:** Match found++### sources.json contains Anthropic sources+```bash+grep "anthropic.com" ~/.claude/skills/Upgrades/sources.json+```+**Expected:** Multiple matches (blogs, docs, etc.)++### State files are valid JSON+```bash+python3 -c "import json; json.load(open('$HOME/.claude/skills/Upgrades/State/last-check.json'))" && echo "Valid JSON"+python3 -c "import json; json.load(open('$HOME/.claude/skills/Upgrades/State/youtube-videos.json'))" && echo "Valid JSON"+```+**Expected:** "Valid JSON" for both++---++## Customization Layer Verification (Optional)++### Check customization directory exists+```bash+ls ~/.claude/SKILLCUSTOMIZATIONS/Upgrades/+```+**Expected:** youtube-channels.json (if configured)++### Check customization file is valid JSON+```bash+python3 -c "import json; json.load(open('$HOME/.claude/skills/CORE/USER/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json'))" && echo "Valid JSON"+```+**Expected:** "Valid JSON"++---++## Functional Verification++### Test Anthropic workflow trigger+Ask your AI:+```+"What sources does the Upgrades skill monitor?"+```+**Expected:** Lists Anthropic sources (blogs, GitHub repos, changelogs, docs)++### Test sources.json parsing+```bash+cat ~/.claude/skills/Upgrades/sources.json | python3 -c "import json,sys; d=json.load(sys.stdin); print(f'Blogs: {len(d.get(\"blogs\", []))}'); print(f'GitHub Repos: {len(d.get(\"github_repos\", []))}'); print(f'Changelogs: {len(d.get(\"changelogs\", []))}'); print(f'Documentation: {len(d.get(\"documentation\", []))}')"+```+**Expected:** Non-zero counts for each category++---++## Installation Checklist++Mark each item as complete:++```markdown+## PAI Upgrades Skill Installation Verification++### Directory Structure+- [ ] ~/.claude/skills/Upgrades/ exists+- [ ] SKILL.md present+- [ ] sources.json present+- [ ] youtube-channels.json present+- [ ] Workflows/ directory with 3 files+- [ ] Tools/ directory with Anthropic.ts+- [ ] State/ directory with 2 JSON files++### File Integrity+- [ ] SKILL.md contains workflow routing table+- [ ] sources.json contains 30+ sources+- [ ] State files are valid JSON++### Customization (Optional)+- [ ] SKILLCUSTOMIZATIONS/Upgrades/ directory exists+- [ ] youtube-channels.json contains your channels++### Functional+- [ ] AI recognizes "check for updates" trigger+- [ ] AI can list monitored sources+```++---++## Verification Complete++When all items pass:++1. **Confirm to user:** "PAI Upgrades Skill installation verified successfully"+2. **Recommend:** "Run 'check for updates' to test the full workflow"+3. **Note:** Customization layer is optional - channels can be added later++---++## Troubleshooting++### Files missing after copy+Re-run the copy command:+```bash+cp -r src/skills/Upgrades/* ~/.claude/skills/Upgrades/+```++### Invalid JSON in state files+Recreate them:+```bash+echo '{"last_check_timestamp": null, "sources": {}}' > ~/.claude/skills/Upgrades/State/last-check.json+echo '{"last_check_timestamp": null, "channels": {}}' > ~/.claude/skills/Upgrades/State/youtube-videos.json+```++### Skill not routing correctly+Verify SKILL.md frontmatter is intact:+```bash+head -5 ~/.claude/skills/Upgrades/SKILL.md+```+Should show valid YAML frontmatter with name and description.diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/SKILL.md b/Packs/pai-upgrades-skill/src/skills/Upgrades/SKILL.mdnew file mode 100644index 00000000..b570e2d1--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/SKILL.md@@ -0,0 +1,127 @@+---+name: Upgrades+description: Track PAI upgrade opportunities. USE WHEN upgrades, improvement tracking. SkillSearch('upgrades') for docs.+---++# Upgrades++Monitor Anthropic ecosystem AND AI development YouTube channels for updates that can improve PAI infrastructure.+++## Voice Notification++**When executing a workflow, do BOTH:**++1. **Send voice notification**:+ ```bash+ curl -s -X POST http://localhost:8888/notify \+ -H "Content-Type: application/json" \+ -d '{"message": "Running the WORKFLOWNAME workflow from the Upgrades skill"}' \+ > /dev/null 2>&1 &+ ```++2. **Output text notification**:+ ```+ Running the **WorkflowName** workflow from the **Upgrades** skill...+ ```++**Full documentation:** `~/.claude/skills/CORE/SkillNotifications.md`++## Workflow Routing++**When executing a workflow, output this notification directly:**++```+Running the **WorkflowName** workflow from the **Upgrades** skill...+```++| Workflow | Trigger | File |+|----------|---------|------|+| **Anthropic** | "check Anthropic", "new Claude features" | `Workflows/Anthropic.md` |+| **YouTube** | "check YouTube", "new videos" | `Workflows/YouTube.md` |+| **ReleaseNotesDeepDive** | "analyze release notes", "deep dive features", "/release-notes analysis" | `Workflows/ReleaseNotesDeepDive.md` |+| **All** | "check for updates", "check upgrades" | Run both workflows |++## Examples++**Example 1: Full ecosystem check**+```+User: "check for updates"+→ Invokes All workflow+→ Runs Anthropic workflow then YouTube workflow+→ Reports Anthropic changes + new YouTube videos with transcripts+```++**Example 2: Anthropic only**+```+User: "any new Claude Code features?"+→ Invokes Anthropic workflow+→ Runs Anthropic.ts tool+→ Returns prioritized update report+```++**Example 3: YouTube only**+```+User: "any new videos from Indy Dev Dan?"+→ Invokes YouTube workflow+→ Checks channels, uses VideoTranscript skill for transcripts+→ Shows new videos with transcripts+```++**Example 4: Deep dive on release notes**+```+User: "deep dive the latest release notes"+→ Invokes ReleaseNotesDeepDive workflow+→ Runs /release-notes to capture features+→ Launches parallel research agents for each feature+→ Researches GitHub, docs, blog for each feature+→ Maps to PAI architecture opportunities+→ Outputs prioritized upgrade roadmap with citations+```++## Anthropic Monitoring (30+ sources)++**Sources Monitored:**+1. **Blogs & News** (4) - Main blog, Alignment, Research, Interpretability+2. **GitHub Repositories** (21+) - claude-code, skills, MCP, SDKs, cookbooks+3. **Changelogs** (5) - Claude Code CHANGELOG, releases, docs notes+4. **Documentation** (6) - Claude docs, API docs, MCP docs, spec, registry+5. **Community** (1) - Discord server++## YouTube Monitoring++YouTube channels are configured via the **Skill Customization Layer**.+See `~/.claude/SKILLCUSTOMIZATIONS/Upgrades/` for user-specific channels.++**Features:**+- Detection of new videos via yt-dlp+- Transcript extraction via **VideoTranscript** skill+- State tracking to avoid duplicate processing+- User-customizable channel list (add your own channels via customization layer)++## Tool Reference++| Tool | Purpose |+|------|---------|+| `tools/Anthropic.ts` | Check Anthropic sources |++## Configuration++**Base Skill Files:**+- `sources.json` - Anthropic sources config (30+ sources)+- `youtube-channels.json` - Base YouTube channels (empty - uses customization)+- `state/last-check.json` - Anthropic state+- `state/youtube-videos.json` - YouTube state++**User Customizations** (`~/.claude/SKILLCUSTOMIZATIONS/Upgrades/`):+- `EXTEND.yaml` - Extension manifest+- `youtube-channels.json` - User's personal YouTube channels++Use `bun ~/.claude/skills/CORE/Tools/LoadSkillConfig.ts` to load configs with customizations merged.++## Integration++Uses **VideoTranscript** skill for transcript extraction:+```bash+bun ~/.claude/skills/CORE/Tools/GetTranscript.ts "<youtube-url>"+```diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/Tools/Anthropic.ts b/Packs/pai-upgrades-skill/src/skills/Upgrades/Tools/Anthropic.tsnew file mode 100755index 00000000..3401ad2a--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/Tools/Anthropic.ts@@ -0,0 +1,879 @@+#!/usr/bin/env bun++/**+ * Check Anthropic Changes - Comprehensive Update Monitoring+ *+ * Monitors 30+ official Anthropic sources for updates and provides+ * AI-powered recommendations for improving PAI infrastructure.+ *+ * Usage:+ * /check-anthropic-changes # Check last 7 days+ * /check-anthropic-changes 14 # Check last 14 days+ * /check-anthropic-changes --force # Force check all (ignore state)+ *+ * Sources Monitored:+ * - 4 blogs/news sites+ * - 9 GitHub repositories (commits + releases)+ * - 4 changelog pages+ * - 6 documentation sites+ * - 1 community channel (manual reference)+ *+ * Output:+ * - Prioritized report (HIGH/MEDIUM/LOW)+ * - Actionable recommendations+ * - Links to all changes+ */++import { readFileSync, writeFileSync, existsSync } from 'fs';+import { createHash } from 'crypto';+import { join } from 'path';+import { homedir } from 'os';++// Types+interface Source {+ name: string;+ url?: string;+ owner?: string;+ repo?: string;+ priority: 'HIGH' | 'MEDIUM' | 'LOW';+ type: string;+ check_commits?: boolean;+ check_releases?: boolean;+ check_issues?: boolean;+ note?: string;+}++interface Sources {+ blogs: Source[];+ github_repos: Source[];+ changelogs: Source[];+ documentation: Source[];+ community: Source[];+}++interface Update {+ source: string;+ category: string;+ type: 'commit' | 'release' | 'blog' | 'changelog' | 'docs' | 'community';+ title: string;+ url: string;+ date: string;+ summary?: string;+ hash?: string;+ sha?: string;+ version?: string;+ priority: 'HIGH' | 'MEDIUM' | 'LOW';+ recommendation?: string;+}++interface State {+ last_check_timestamp: string;+ sources: Record<string, {+ last_hash?: string;+ last_title?: string;+ last_sha?: string;+ last_version?: string;+ last_checked: string;+ }>;+}++// Config+const HOME = homedir();+const SKILL_DIR = join(HOME, '.claude', 'skills', 'Upgrades');+const STATE_DIR = join(SKILL_DIR, 'state');+const STATE_FILE = join(STATE_DIR, 'last-check.json');+const SOURCES_FILE = join(SKILL_DIR, 'sources.json');++// Parse args+const args = process.argv.slice(2);+const daysArg = args.find(a => !a.startsWith('--'));+const DAYS = daysArg ? parseInt(daysArg) : 30; // Default to 30 days for comprehensive review+const FORCE = args.includes('--force');+const LOG_DIR = join(SKILL_DIR, 'logs');+const LOG_FILE = join(LOG_DIR, 'run-history.jsonl');++// Utilities+function hash(content: string): string {+ return createHash('md5').update(content).digest('hex');+}++function loadSources(): Sources {+ try {+ return JSON.parse(readFileSync(SOURCES_FILE, 'utf-8'));+ } catch (error) {+ console.error('❌ Failed to load sources.json:', error);+ process.exit(1);+ }+}++function loadState(): State {+ if (!existsSync(STATE_FILE)) {+ return {+ last_check_timestamp: new Date(Date.now() - DAYS * 24 * 60 * 60 * 1000).toISOString(),+ sources: {}+ };+ }++ try {+ return JSON.parse(readFileSync(STATE_FILE, 'utf-8'));+ } catch (error) {+ console.warn('⚠️ Failed to load state, starting fresh:', error);+ return {+ last_check_timestamp: new Date(Date.now() - DAYS * 24 * 60 * 60 * 1000).toISOString(),+ sources: {}+ };+ }+}++function saveState(state: State): void {+ try {+ writeFileSync(STATE_FILE, JSON.stringify(state, null, 2), 'utf-8');+ } catch (error) {+ console.error('❌ Failed to save state:', error);+ }+}++function logRun(updatesFound: number, high: number, medium: number, low: number): void {+ try {+ const { mkdirSync, appendFileSync, existsSync } = require('fs');++ if (!existsSync(LOG_DIR)) {+ mkdirSync(LOG_DIR, { recursive: true });+ }++ const logEntry = {+ timestamp: new Date().toISOString(),+ days_checked: DAYS,+ forced: FORCE,+ updates_found: updatesFound,+ high_priority: high,+ medium_priority: medium,+ low_priority: low+ };++ appendFileSync(LOG_FILE, JSON.stringify(logEntry) + '\n', 'utf-8');+ } catch (error) {+ console.warn('⚠️ Failed to log run:', error);+ }+}++function getLastRunInfo(): { days_ago: number, last_timestamp: string } | null {+ try {+ if (!existsSync(LOG_FILE)) return null;++ const logs = readFileSync(LOG_FILE, 'utf-8').trim().split('\n');+ if (logs.length === 0) return null;++ const lastLog = JSON.parse(logs[logs.length - 1]);+ const lastTime = new Date(lastLog.timestamp);+ const now = new Date();+ const daysAgo = Math.floor((now.getTime() - lastTime.getTime()) / (1000 * 60 * 60 * 24));++ return {+ days_ago: daysAgo,+ last_timestamp: lastLog.timestamp+ };+ } catch (error) {+ return null;+ }+}++// Fetching functions+async function fetchBlog(source: Source, state: State): Promise<Update[]> {+ try {+ const response = await fetch(source.url!);+ if (!response.ok) {+ console.warn(`⚠️ Failed to fetch ${source.name}: ${response.status}`);+ return [];+ }++ const html = await response.text();+ const contentHash = hash(html.substring(0, 5000)); // Hash first 5KB++ const stateKey = `blog_${source.name.toLowerCase().replace(/\s+/g, '_')}`;+ const lastHash = state.sources[stateKey]?.last_hash;++ if (!FORCE && lastHash === contentHash) {+ return []; // No changes+ }++ // Extract title from HTML (basic parsing)+ const titleMatch = html.match(/<h1[^>]*>(.*?)<\/h1>/i) || html.match(/<title>(.*?)<\/title>/i);+ const title = titleMatch ? titleMatch[1].replace(/<[^>]+>/g, '').trim() : 'Latest update';++ return [{+ source: source.name,+ category: 'blog',+ type: 'blog',+ title: `${source.name}: ${title}`,+ url: source.url!,+ date: new Date().toISOString().split('T')[0],+ hash: contentHash,+ priority: source.priority,+ summary: `New content detected on ${source.name}`+ }];++ } catch (error) {+ console.warn(`⚠️ Error fetching blog ${source.name}:`, error);+ return [];+ }+}++async function fetchGitHubRepo(source: Source, state: State): Promise<Update[]> {+ const updates: Update[] = [];+ const token = process.env.GITHUB_TOKEN || '';+ const headers: Record<string, string> = {+ 'Accept': 'application/vnd.github.v3+json',+ 'User-Agent': 'PAI-Anthropic-Monitor'+ };+ if (token) headers['Authorization'] = `token ${token}`;++ try {+ // Check commits+ if (source.check_commits) {+ const since = new Date(Date.now() - DAYS * 24 * 60 * 60 * 1000).toISOString();+ const url = `https://api.github.com/repos/${source.owner}/${source.repo}/commits?since=${since}&per_page=10`;++ const response = await fetch(url, { headers });+ if (response.ok) {+ const commits = await response.json() as any[];++ const stateKey = `github_${source.repo}_commits`;+ const lastSha = state.sources[stateKey]?.last_sha;++ for (const commit of commits) {+ if (FORCE || commit.sha !== lastSha) {+ updates.push({+ source: source.name,+ category: 'github',+ type: 'commit',+ title: commit.commit.message.split('\n')[0],+ url: commit.html_url,+ date: commit.commit.author.date.split('T')[0],+ sha: commit.sha,+ priority: source.priority,+ summary: `Commit by ${commit.commit.author.name}`+ });+ }+ if (commit.sha === lastSha) break;+ }+ }+ }++ // Check releases+ if (source.check_releases) {+ const url = `https://api.github.com/repos/${source.owner}/${source.repo}/releases?per_page=5`;++ const response = await fetch(url, { headers });+ if (response.ok) {+ const releases = await response.json() as any[];++ const stateKey = `github_${source.repo}_releases`;+ const lastVersion = state.sources[stateKey]?.last_version;++ for (const release of releases) {+ if (FORCE || release.tag_name !== lastVersion) {+ updates.push({+ source: source.name,+ category: 'github',+ type: 'release',+ title: `${release.tag_name}: ${release.name || 'New Release'}`,+ url: release.html_url,+ date: release.published_at.split('T')[0],+ version: release.tag_name,+ priority: source.priority,+ summary: release.body ? release.body.substring(0, 200) + '...' : 'See release notes'+ });+ }+ if (release.tag_name === lastVersion) break;+ }+ }+ }++ } catch (error) {+ console.warn(`⚠️ Error fetching GitHub repo ${source.name}:`, error);+ }++ return updates;+}++async function fetchChangelog(source: Source, state: State): Promise<Update[]> {+ try {+ const response = await fetch(source.url!);+ if (!response.ok) {+ console.warn(`⚠️ Failed to fetch ${source.name}: ${response.status}`);+ return [];+ }++ const content = await response.text();+ const contentHash = hash(content.substring(0, 3000)); // Hash first 3KB++ const stateKey = `changelog_${source.name.toLowerCase().replace(/\s+/g, '_')}`;+ const lastHash = state.sources[stateKey]?.last_hash;++ if (!FORCE && lastHash === contentHash) {+ return []; // No changes+ }++ // Extract first version/section+ const versionMatch = content.match(/##?\s*(v?[\d.]+|[\w\s]+)\s*\n/i);+ const title = versionMatch ? versionMatch[1] : 'Latest update';++ return [{+ source: source.name,+ category: 'changelog',+ type: 'changelog',+ title: `${source.name}: ${title}`,+ url: source.url!,+ date: new Date().toISOString().split('T')[0],+ hash: contentHash,+ priority: source.priority,+ summary: 'Changelog updated with new entries'+ }];++ } catch (error) {+ console.warn(`⚠️ Error fetching changelog ${source.name}:`, error);+ return [];+ }+}++async function fetchDocs(source: Source, state: State): Promise<Update[]> {+ try {+ const response = await fetch(source.url!);+ if (!response.ok) {+ console.warn(`⚠️ Failed to fetch ${source.name}: ${response.status}`);+ return [];+ }++ const html = await response.text();+ const contentHash = hash(html.substring(0, 3000)); // Hash first 3KB++ const stateKey = `docs_${source.name.toLowerCase().replace(/\s+/g, '_')}`;+ const lastHash = state.sources[stateKey]?.last_hash;++ if (!FORCE && lastHash === contentHash) {+ return []; // No changes+ }++ return [{+ source: source.name,+ category: 'documentation',+ type: 'docs',+ title: `${source.name}: Documentation updated`,+ url: source.url!,+ date: new Date().toISOString().split('T')[0],+ hash: contentHash,+ priority: source.priority,+ summary: 'Documentation page has been updated'+ }];++ } catch (error) {+ console.warn(`⚠️ Error fetching docs ${source.name}:`, error);+ return [];+ }+}++// Recommendation engine - PAI PAI ecosystem focused+function generateRecommendation(update: Update): string {+ const { source, type, title, category } = update;+ const titleLower = title.toLowerCase();++ // SKILLS - Critical for PAI's skill system+ if (titleLower.includes('skill') || titleLower.includes('skills')) {+ return `**PAI Impact:** CRITICAL for skills ecosystem\n` ++ `**Why:** PAI's entire infrastructure is built on skills - any changes to skill patterns, specifications, or examples directly affect how we build and organize PAI's capabilities.\n` ++ `**Action:** Review immediately and update PAI's skill templates/patterns if new conventions emerge. Check if new skill categories or capabilities can be adopted.`;+ }++ // MCP - Core infrastructure+ if (titleLower.includes('mcp') || source.toLowerCase().includes('mcp')) {+ return `**PAI Impact:** HIGH - MCP infrastructure enhancement\n` ++ `**Why:** PAI uses MCP servers for chrome-devtools, brightdata, Ref docs, content access, and Stripe. Changes to MCP spec/docs affect our integrations.\n` ++ `**Action:** Assess compatibility with existing MCP servers in .mcp.json. Look for new MCP capabilities to expand PAI's tooling.`;+ }++ // Commands/Slash Commands+ if (titleLower.includes('command') || titleLower.includes('slash command')) {+ return `**PAI Impact:** HIGH - Command system update\n` ++ `**Why:** PAI uses slash commands extensively (~/.claude/Commands/). Changes affect our command architecture and user workflows.\n` ++ `**Action:** Review for new command patterns or capabilities. Update PAI's command templates if conventions change.`;+ }++ // Agents/Hooks+ if (titleLower.includes('agent') || titleLower.includes('hook')) {+ return `**PAI Impact:** HIGH - Agent/Hook system change\n` ++ `**Why:** PAI uses agents (researcher, engineer, architect, etc.) and hooks (load-context, stop-hook) as core infrastructure components.\n` ++ `**Action:** Check if this affects PAI's agent definitions or hook configurations. Test existing agent workflows.`;+ }++ // Claude Code releases+ if (type === 'release' && source.includes('claude-code')) {+ return `**PAI Impact:** CRITICAL - Core platform update\n` ++ `**Why:** PAI runs on Claude Code - releases may include new features, breaking changes, or performance improvements.\n` ++ `**Action:** Review changelog carefully. Test PAI's critical workflows. Update skills/commands if APIs changed.`;+ }++ // MCP releases+ if (type === 'release' && source.includes('MCP')) {+ return `**PAI Impact:** HIGH - MCP protocol update\n` ++ `**Why:** MCP protocol changes may require updates to server implementations or client integrations.\n` ++ `**Action:** Check MCP server compatibility. Look for new transports, authentication methods, or capabilities to adopt.`;+ }++ // Plugin/Marketplace+ if (titleLower.includes('plugin') || titleLower.includes('marketplace')) {+ return `**PAI Impact:** MEDIUM - Ecosystem expansion\n` ++ `**Why:** Plugin/marketplace features could provide new capabilities to integrate into PAI's toolkit.\n` ++ `**Action:** Explore available plugins. Assess if any solve current PAI limitations or add valuable features.`;+ }++ // Cookbooks/Quickstarts/Courses - Implementation patterns+ if (source.includes('cookbook') || source.includes('quickstart') || source.includes('courses')) {+ return `**PAI Impact:** MEDIUM - Implementation patterns\n` ++ `**Why:** Cookbooks/examples show best practices and patterns we can adopt in PAI's codebase.\n` ++ `**Action:** Review for reusable patterns, especially around skills, agents, or Claude Code features. Extract learnings for PAI.`;+ }++ // GitHub commits+ if (category === 'github' && type === 'commit') {+ return `**PAI Impact:** LOW-MEDIUM - Code pattern review\n` ++ `**Why:** Commits may reveal implementation details, bug fixes, or patterns useful for PAI development.\n` ++ `**Action:** Skim commit for code patterns. Low priority unless it touches skills/MCP/commands directly.`;+ }++ // Documentation+ if (titleLower.includes('doc') || type === 'docs') {+ return `**PAI Impact:** MEDIUM - Capability discovery\n` ++ `**Why:** Doc updates often reveal new features or best practices not yet in PAI.\n` ++ `**Action:** Review for new Claude Code features, API capabilities, or configuration options to leverage.`;+ }++ // SDK releases+ if (source.includes('sdk')) {+ return `**PAI Impact:** LOW - SDK update\n` ++ `**Why:** SDK updates are less relevant since PAI uses Claude Code CLI, not raw API SDKs.\n` ++ `**Action:** Note for reference. Only investigate if mentions features relevant to PAI's agent implementations.`;+ }++ // Blog posts+ if (type === 'blog') {+ return `**PAI Impact:** LOW-MEDIUM - Awareness\n` ++ `**Why:** Blogs announce new features and directions that may eventually affect PAI.\n` ++ `**Action:** Skim for strategic announcements about Claude Code, Skills, or MCP. Track for future planning.`;+ }++ // Generic+ return `**PAI Impact:** LOW - General awareness\n` ++ `**Why:** May have indirect relevance to PAI ecosystem.\n` ++ `**Action:** Review if time permits. Low impact on PAI's core functionality.`;+}++function assessRelevance(update: Update): 'HIGH' | 'MEDIUM' | 'LOW' {+ const titleLower = update.title.toLowerCase();++ // HIGH relevance keywords+ const highKeywords = ['skill', 'mcp', 'command', 'agent', 'hook', 'breaking', 'claude code'];+ if (highKeywords.some(k => titleLower.includes(k))) {+ return 'HIGH';+ }++ // Upgrade priority for key repos+ if (update.source.includes('claude-code') || update.source.includes('MCP')) {+ if (update.type === 'release') return 'HIGH';+ if (update.priority === 'HIGH') return 'HIGH';+ return 'MEDIUM';+ }++ // LOW relevance keywords+ const lowKeywords = ['typo', 'fix typo', 'readme', 'test', 'minor'];+ if (lowKeywords.some(k => titleLower.includes(k))) {+ return 'LOW';+ }++ // Default to source priority+ return update.priority;+}++// Generate narrative analysis focused on PAI ecosystem+function generateNarrative(updates: Update[]): string {+ const high = updates.filter(u => u.priority === 'HIGH');+ const medium = updates.filter(u => u.priority === 'MEDIUM');+ const low = updates.filter(u => u.priority === 'LOW');++ // Categorize by theme+ const skillUpdates = updates.filter(u => u.title.toLowerCase().includes('skill') || u.source.toLowerCase().includes('skill'));+ const mcpUpdates = updates.filter(u => u.title.toLowerCase().includes('mcp') || u.source.toLowerCase().includes('mcp'));+ const codeUpdates = updates.filter(u => u.source.includes('claude-code'));+ const cookbookUpdates = updates.filter(u => u.source.includes('cookbook'));+ const docUpdates = updates.filter(u => u.type === 'docs');+ const releases = updates.filter(u => u.type === 'release');++ let narrative = `## 📖 Executive Summary: What This Means for PAI\n\n`;++ // Overall activity+ narrative += `Found **${updates.length} updates** across the Anthropic ecosystem in the monitored period. `;++ if (high.length > 0) {+ narrative += `**${high.length} are HIGH priority** for PAI's infrastructure, `;+ }+ if (medium.length > 0) {+ narrative += `${medium.length} are MEDIUM priority, `;+ }+ if (low.length > 0) {+ narrative += `and ${low.length} are LOW priority.\n\n`;+ }++ // Key themes+ const themes: string[] = [];++ if (skillUpdates.length > 0) {+ themes.push(`**Skills Ecosystem** (${skillUpdates.length} updates)`);+ }+ if (mcpUpdates.length > 0) {+ themes.push(`**MCP Infrastructure** (${mcpUpdates.length} updates)`);+ }+ if (codeUpdates.length > 0) {+ themes.push(`**Claude Code Platform** (${codeUpdates.length} updates)`);+ }+ if (cookbookUpdates.length > 0) {+ themes.push(`**Implementation Examples** (${cookbookUpdates.length} updates)`);+ }+ if (docUpdates.length > 0) {+ themes.push(`**Documentation** (${docUpdates.length} updates)`);+ }++ if (themes.length > 0) {+ narrative += `### 🎯 Key Activity Areas\n\n`;+ themes.forEach(theme => narrative += `- ${theme}\n`);+ narrative += `\n`;+ }++ // Detailed analysis+ narrative += `### 💡 What's Happening\n\n`;++ // Skills analysis (most critical)+ if (skillUpdates.length > 0) {+ const highSkills = skillUpdates.filter(u => u.priority === 'HIGH').length;+ if (highSkills > 0) {+ narrative += `**🔥 CRITICAL: Skills System Activity**\n`;+ narrative += `There are **${highSkills} HIGH-priority skill updates** - this is BIG because PAI's entire architecture is built on the skills system. `;+ narrative += `Any changes to skill patterns, specifications, or conventions could require updates to PAI's ${countSkills()} existing skills. `;++ const skillsRepo = skillUpdates.some(u => u.source === 'skills');+ if (skillsRepo) {+ narrative += `The official skills repository has new activity, suggesting Anthropic is actively developing the skills ecosystem. `;+ }++ const skillDocs = skillUpdates.some(u => u.type === 'docs');+ if (skillDocs) {+ narrative += `Skills documentation has also been updated - check for new patterns or best practices. `;+ }++ narrative += `\n\n**→ Priority Action:** Review all skill updates immediately. Update PAI's skill templates if conventions changed.\n\n`;+ } else {+ narrative += `Skills system has **${skillUpdates.length} updates** but lower priority - likely documentation or minor improvements.\n\n`;+ }+ }++ // MCP analysis (infrastructure)+ if (mcpUpdates.length > 0) {+ const highMcp = mcpUpdates.filter(u => u.priority === 'HIGH').length;+ if (highMcp > 0) {+ narrative += `**🔧 IMPORTANT: MCP Infrastructure Changes**\n`;+ narrative += `**${highMcp} HIGH-priority MCP updates** detected. Since PAI uses MCP servers for chrome-devtools, brightdata, Ref, content, and Stripe, `;+ narrative += `protocol changes could affect our integrations. `;++ const mcpRelease = mcpUpdates.find(u => u.type === 'release');+ if (mcpRelease) {+ narrative += `There's a new MCP release (${mcpRelease.title}) - check for new capabilities or breaking changes. `;+ }++ narrative += `\n\n**→ Priority Action:** Test existing MCP servers. Look for new MCP features to expand PAI's toolkit.\n\n`;+ } else {+ narrative += `MCP has **${mcpUpdates.length} updates** - mostly documentation or minor improvements. Still worth monitoring.\n\n`;+ }+ }++ // Claude Code analysis (platform)+ if (codeUpdates.length > 0) {+ const highCode = codeUpdates.filter(u => u.priority === 'HIGH').length;+ if (highCode > 0) {+ narrative += `**⚡ PLATFORM UPDATE: Claude Code Changes**\n`;+ narrative += `**${highCode} HIGH-priority** Claude Code updates found. Since PAI runs on Claude Code, platform changes can affect everything. `;++ const codeRelease = codeUpdates.find(u => u.type === 'release');+ if (codeRelease) {+ narrative += `New release detected: ${codeRelease.title}. This could include new features, bug fixes, or breaking changes. `;+ }++ narrative += `\n\n**→ Priority Action:** Review changelog. Test PAI's core workflows after updating.\n\n`;+ } else {+ narrative += `Claude Code has **${codeUpdates.length} updates** but lower priority. Likely maintenance commits.\n\n`;+ }+ }++ // Cookbooks/patterns+ if (cookbookUpdates.length > 0) {+ narrative += `**📚 Implementation Patterns**\n`;+ narrative += `**${cookbookUpdates.length} cookbook updates** - these often contain useful patterns and examples. `;+ const skillCookbooks = cookbookUpdates.filter(u => u.title.toLowerCase().includes('skill'));+ if (skillCookbooks.length > 0) {+ narrative += `${skillCookbooks.length} specifically about skills - definitely review these for patterns to adopt in PAI. `;+ }+ narrative += `\n\n`;+ }++ // Documentation+ if (docUpdates.length > 5) {+ narrative += `**📖 Documentation Updates**\n`;+ narrative += `**${docUpdates.length} documentation pages** updated. While less urgent, docs often reveal new capabilities or best practices not yet used in PAI.\n\n`;+ }++ // Releases summary+ if (releases.length > 0) {+ narrative += `### 🎉 Releases Summary\n\n`;+ narrative += `**${releases.length} new releases** published:\n`;+ releases.forEach(r => {+ narrative += `- ${r.source}: ${r.title}\n`;+ });+ narrative += `\n`;+ }++ // Bottom line+ narrative += `### 🎯 Bottom Line for PAI\n\n`;++ if (high.length > 5) {+ narrative += `**High activity period** with ${high.length} high-priority changes. This suggests significant ecosystem development. `;+ narrative += `Focus on the skill and MCP updates first, then work through platform changes.\n\n`;+ } else if (high.length > 0) {+ narrative += `**Moderate activity** with ${high.length} items requiring attention. Not urgent, but should review within the week.\n\n`;+ } else {+ narrative += `**Quiet period** - mostly low-priority updates. Good time to focus on PAI development rather than external changes.\n\n`;+ }++ // Specific call-outs+ const topItems: string[] = [];++ if (skillUpdates.filter(u => u.priority === 'HIGH').length > 0) {+ topItems.push('1. **Skills system updates** - Review immediately, may affect PAI architecture');+ }+ if (mcpUpdates.filter(u => u.priority === 'HIGH').length > 0) {+ topItems.push('2. **MCP changes** - Test existing integrations, look for new capabilities');+ }+ if (codeUpdates.filter(u => u.priority === 'HIGH').length > 0) {+ topItems.push('3. **Claude Code platform** - Review release notes, test workflows');+ }++ if (topItems.length > 0) {+ narrative += `**Recommended Review Order:**\n`;+ topItems.forEach(item => narrative += `${item}\n`);+ narrative += `\n`;+ }++ return narrative;+}++function countSkills(): number {+ // Simple estimate - could be enhanced to actually count skills+ return 20; // Approximate based on PAI's current skill set+}++// Main execution+async function main() {+ console.log('🔍 Checking Anthropic sources for updates...\n');+ console.log(`📅 Date: ${new Date().toISOString().split('T')[0]}`);+ console.log(`⏰ Looking back: ${DAYS} days`);+ console.log(`🔄 Force mode: ${FORCE ? 'Yes' : 'No'}`);++ // Show last run info+ const lastRun = getLastRunInfo();+ if (lastRun) {+ console.log(`📜 Last run: ${lastRun.days_ago} days ago (${lastRun.last_timestamp.split('T')[0]})`);+ } else {+ console.log(`📜 First run - no previous history`);+ }+ console.log();++ // Load configuration and state+ const sources = loadSources();+ const state = loadState();++ console.log(`📊 Last state update: ${state.last_check_timestamp.split('T')[0]}\n`);+ console.log('⚡ Fetching all sources in parallel...\n');++ // Fetch all sources in parallel+ const fetchPromises: Promise<Update[]>[] = [];++ // Blogs+ for (const blog of sources.blogs) {+ fetchPromises.push(fetchBlog(blog, state));+ }++ // GitHub repos+ for (const repo of sources.github_repos) {+ fetchPromises.push(fetchGitHubRepo(repo, state));+ }++ // Changelogs+ for (const changelog of sources.changelogs) {+ fetchPromises.push(fetchChangelog(changelog, state));+ }++ // Documentation+ for (const docs of sources.documentation) {+ fetchPromises.push(fetchDocs(docs, state));+ }++ // Wait for all fetches+ const allUpdatesArrays = await Promise.all(fetchPromises);+ const allUpdates = allUpdatesArrays.flat();++ console.log(`✅ Fetch complete. Found ${allUpdates.length} updates.\n`);++ if (allUpdates.length === 0) {+ console.log('✨ No new updates found. Everything is up to date!\n');+ console.log('📊 STATUS: All monitored sources checked, no changes detected');+ console.log('➡️ NEXT: Check again later or use --force to see all current content');+ console.log('🎯 COMPLETED: Completed Anthropic changes monitoring check');+ return;+ }++ // Enhance updates with recommendations+ for (const update of allUpdates) {+ update.recommendation = generateRecommendation(update);+ const relevance = assessRelevance(update);+ if (relevance !== update.priority) {+ update.priority = relevance; // Override with assessed relevance+ }+ }++ // Sort by priority+ const priorityOrder = { 'HIGH': 0, 'MEDIUM': 1, 'LOW': 2 };+ allUpdates.sort((a, b) => {+ const priorityDiff = priorityOrder[a.priority] - priorityOrder[b.priority];+ if (priorityDiff !== 0) return priorityDiff;+ return new Date(b.date).getTime() - new Date(a.date).getTime();+ });++ // Generate report+ console.log('═'.repeat(80));+ console.log('\n# 🎯 Anthropic Changes Report\n');+ console.log(`📅 Generated: ${new Date().toISOString().split('T')[0]}`);+ console.log(`📊 Period: Last ${DAYS} days`);+ console.log(`🔍 Updates found: ${allUpdates.length}\n`);++ const highPriority = allUpdates.filter(u => u.priority === 'HIGH');+ const mediumPriority = allUpdates.filter(u => u.priority === 'MEDIUM');+ const lowPriority = allUpdates.filter(u => u.priority === 'LOW');++ // Generate and display narrative analysis+ const narrative = generateNarrative(allUpdates);+ console.log(narrative);+ console.log('═'.repeat(80));+ console.log();++ // HIGH PRIORITY+ if (highPriority.length > 0) {+ console.log(`## 🔥 HIGH PRIORITY (${highPriority.length})\n`);+ for (const update of highPriority) {+ console.log(`### [${update.category.toUpperCase()}] ${update.title}\n`);+ console.log(`**Source:** ${update.source}`);+ console.log(`**Date:** ${update.date}`);+ console.log(`**Type:** ${update.type}`);+ console.log(`**Link:** ${update.url}`);+ if (update.summary) console.log(`**Summary:** ${update.summary}`);+ console.log(`\n${update.recommendation}\n`);+ console.log('---\n');+ }+ }++ // MEDIUM PRIORITY+ if (mediumPriority.length > 0) {+ console.log(`## 📌 MEDIUM PRIORITY (${mediumPriority.length})\n`);+ for (const update of mediumPriority) {+ console.log(`### [${update.category.toUpperCase()}] ${update.title}\n`);+ console.log(`**Source:** ${update.source}`);+ console.log(`**Date:** ${update.date}`);+ console.log(`**Link:** ${update.url}`);+ console.log(`\n${update.recommendation}\n`);+ console.log('---\n');+ }+ }++ // LOW PRIORITY+ if (lowPriority.length > 0) {+ console.log(`## 📝 LOW PRIORITY (${lowPriority.length})\n`);+ for (const update of lowPriority) {+ console.log(`- **${update.title}** - [View](${update.url}) - ${update.date}`);+ }+ console.log('\n');+ }++ // Community reminder+ console.log('## 💬 Community Channel\n');+ console.log('**Discord:** https://discord.com/invite/6PPFFzqPDZ');+ console.log('_(Manual check recommended - automated scraping not performed)_\n');++ console.log('═'.repeat(80));+ console.log('\n📊 STATUS: Report generated successfully');+ console.log('➡️ NEXT: Review HIGH priority items and implement relevant recommendations');+ console.log('🎯 COMPLETED: Completed comprehensive Anthropic changes monitoring\n');++ // Update state+ const newState: State = {+ last_check_timestamp: new Date().toISOString(),+ sources: { ...state.sources }+ };++ for (const update of allUpdates) {+ let stateKey = '';++ if (update.category === 'blog') {+ stateKey = `blog_${update.source.toLowerCase().replace(/\s+/g, '_')}`;+ newState.sources[stateKey] = {+ last_hash: update.hash!,+ last_title: update.title,+ last_checked: new Date().toISOString()+ };+ } else if (update.category === 'github' && update.type === 'commit') {+ stateKey = `github_${update.source.toLowerCase().replace(/\s+/g, '_')}_commits`;+ newState.sources[stateKey] = {+ last_sha: update.sha!,+ last_title: update.title,+ last_checked: new Date().toISOString()+ };+ } else if (update.category === 'github' && update.type === 'release') {+ stateKey = `github_${update.source.toLowerCase().replace(/\s+/g, '_')}_releases`;+ newState.sources[stateKey] = {+ last_version: update.version!,+ last_title: update.title,+ last_checked: new Date().toISOString()+ };+ } else if (update.category === 'changelog') {+ stateKey = `changelog_${update.source.toLowerCase().replace(/\s+/g, '_')}`;+ newState.sources[stateKey] = {+ last_hash: update.hash!,+ last_title: update.title,+ last_checked: new Date().toISOString()+ };+ } else if (update.category === 'documentation') {+ stateKey = `docs_${update.source.toLowerCase().replace(/\s+/g, '_')}`;+ newState.sources[stateKey] = {+ last_hash: update.hash!,+ last_title: update.title,+ last_checked: new Date().toISOString()+ };+ }+ }++ saveState(newState);+ console.log('💾 State saved successfully\n');++ // Log this run+ logRun(allUpdates.length, highPriority.length, mediumPriority.length, lowPriority.length);+}++main().catch(error => {+ console.error('❌ Fatal error:', error);+ process.exit(1);+});diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/Anthropic.md b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/Anthropic.mdnew file mode 100644index 00000000..5305b760--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/Anthropic.md@@ -0,0 +1,47 @@+# Anthropic Workflow++Check 30+ official Anthropic sources for updates relevant to PAI infrastructure.++## Process++### Step 1: Run the Anthropic Check Tool++```bash+bun ~/.claude/skills/Upgrades/Tools/Anthropic.ts+```++**Options:**+- No arguments: Check last 30 days (default)+- `14` or `7`: Check last N days+- `--force`: Ignore state, check all sources++### Step 2: Analyze Results++The tool outputs a prioritized report:+- 🔥 **HIGH PRIORITY** - Must-review features/changes for PAI+- 📌 **MEDIUM PRIORITY** - Interesting updates to check+- 📝 **LOW PRIORITY** - FYI information++### Step 3: Provide Recommendations++Based on the output, advise user on:+- What changed and why it matters for PAI+- Which updates to review immediately+- Specific actions to take (e.g., update skills, test new features)++## Sources Monitored++1. **Blogs & News** (4 sources) - Main blog, Alignment, Research, Interpretability+2. **GitHub Repositories** (21+ repos) - claude-code, skills, MCP, SDKs, cookbooks, courses+3. **Changelogs** (5 locations) - Claude Code CHANGELOG, releases, docs notes, MCP changelog+4. **Documentation** (6 sites) - Claude docs, API docs, MCP docs, spec, registry+5. **Community** (1 official) - Discord server++## State Tracking++State is stored in `state/last-check.json`:+- Last check timestamp+- Content hashes for each source+- Last seen commit SHAs, release versions, blog titles++This prevents duplicate reports - only NEW content is shown.diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/ReleaseNotesDeepDive.md b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/ReleaseNotesDeepDive.mdnew file mode 100644index 00000000..a6ee692c--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/ReleaseNotesDeepDive.md@@ -0,0 +1,197 @@+# Release Notes Deep Dive Workflow++Deeply analyze Claude Code `/release-notes` output by researching each feature across multiple authoritative sources, then generate upgrade recommendations for PAI infrastructure.++**Trigger:** "analyze release notes", "deep dive release notes", "research new features"++## Process++### Step 1: Capture Release Notes++Run the `/release-notes` command or use provided release notes content:+```+/release-notes+```++Or accept provided content (YouTube transcript, blog post, changelog).++### Step 2: Extract Features++Parse the release notes to identify individual features:+- New commands/flags+- New skill capabilities+- Hook system changes+- Agent/sub-agent updates+- Performance improvements+- Configuration options+- Breaking changes++### Step 3: Launch Research Agents++**For EACH significant feature, spawn research agents to find deeper documentation.**++Use the BACKGROUNDDELEGATION workflow to launch parallel Intern agents:++```markdown+For each feature:+1. Search Claude Code GitHub repo (anthropics/claude-code)+ - README, CHANGELOG, docs/, examples/+ - Commit messages mentioning the feature+ - Issue discussions++2. Search Anthropic Engineering Blog+ - https://www.anthropic.com/news+ - https://www.anthropic.com/research++3. Search Claude Documentation+ - https://docs.claude.com+ - https://support.claude.com++4. Search Community Resources+ - Claude Developers Discord mentions+ - GitHub Discussions+ - Stack Overflow+```++### Step 4: Synthesize Research++For each feature, compile:+- **Official Documentation** - What Anthropic says about it+- **Implementation Details** - How it works under the hood+- **Use Cases** - Documented examples and patterns+- **Limitations** - Known constraints or caveats+- **Best Practices** - Recommended usage patterns++### Step 5: Map to PAI Architecture++For each researched feature, analyze applicability to:++| PAI Component | Potential Impact |+|---------------|-----------------|+| Skills System | New skill capabilities, context forking |+| Hooks System | New hook types, once triggers, agent-scoped hooks |+| Agent System | New agent types, delegation patterns |+| Workflows | New workflow possibilities |+| Tools | New CLI tools or capabilities |+| Configuration | Settings changes, deny lists |++### Step 6: Generate Upgrade Recommendations++Use the standard priority framework:+- 🔥 **HIGH PRIORITY** - Immediate value, can implement today+- 📌 **MEDIUM PRIORITY** - Good value, requires more work+- 💡 **ASPIRATIONAL** - Future possibilities, research needed++Each recommendation includes:+- Feature being leveraged+- Current PAI gap it fills+- Implementation approach+- Estimated effort+- Dependencies++### Step 7: Output Report++```markdown+# Claude Code Release Deep Dive+**Version:** [version]+**Analysis Date:** [date]++## Executive Summary+[2-3 sentences on major themes and key opportunities]++## Features Researched++### [Feature Name]+**Category:** [hooks/skills/agents/config/etc]+**Official Docs:** [URL if found]++**What It Does:**+[Clear explanation from research]++**Technical Details:**+[Implementation specifics from GitHub/docs]++**PAI Opportunity:**+[How we can use this]++**Implementation:**+- [ ] [Step 1]+- [ ] [Step 2]++---++[Repeat for each feature]++## Prioritized Upgrade Roadmap++### 🔥 HIGH PRIORITY (This Week)+1. [Feature] → [Implementation]+2. [Feature] → [Implementation]++### 📌 MEDIUM PRIORITY (This Month)+1. [Feature] → [Implementation]++### 💡 ASPIRATIONAL (Research Further)+1. [Feature] → [Why interesting]++## Research Sources+- [URLs of authoritative sources consulted]++## Next Steps+- [ ] [Specific action item]+```++## Research Agent Template++When spawning research agents, use this prompt template:++```markdown+Research the following Claude Code feature in depth:++**Feature:** [Feature name]+**Brief:** [What the release notes say]++Search these sources:+1. GitHub: anthropics/claude-code - README, CHANGELOG, docs/, commits+2. Anthropic blog: anthropic.com/news+3. Claude docs: docs.claude.com+4. MCP docs: modelcontextprotocol.io++Find:+- Official documentation or examples+- Implementation details+- Use cases and best practices+- Limitations or caveats+- Related features or dependencies++Return a structured summary with source URLs.+```++## Example Execution++```+User: "analyze the latest Claude Code release"+→ Run /release-notes to get official list+→ Extract 15 features from output+→ Launch 15 research agents in parallel (background)+→ Each agent researches one feature across 4+ sources+→ Collect results when agents complete+→ Map each feature to PAI architecture+→ Generate prioritized upgrade roadmap+→ Output comprehensive report with citations+```++## Integration++**With Other Skills:**+- **Parser** - Extract content from URLs+- **Research** - Deep research on complex features+- **Upgrade** - Apply AnalyzeForUpgrades workflow to findings++**With CORE Workflows:**+- **BACKGROUNDDELEGATION** - Launch parallel research agents+- **GIT** - Commit any upgrades implemented++---++**Last Updated:** 2026-01-08diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/YouTube.md b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/YouTube.mdnew file mode 100644index 00000000..e12def17--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/Workflows/YouTube.md@@ -0,0 +1,99 @@+# YouTube Workflow++Monitor configured YouTube channels for new videos and extract transcripts.++**Note:** Personal YouTube channels are configured via the skill customization layer.+See `~/.claude/SKILLCUSTOMIZATIONS/Upgrades/` for user-specific channels.++## Process++### Step 1: Load Channel Configuration++Load channels using the config loader (merges base + user customizations):+```bash+bun ~/.claude/skills/CORE/Tools/LoadSkillConfig.ts ~/.claude/skills/Upgrades youtube-channels.json+```++### Step 2: Check Each Channel for New Videos++For each channel, use yt-dlp to get recent videos:+```bash+yt-dlp --flat-playlist --dump-json "https://www.youtube.com/@channelhandle/videos" 2>/dev/null | head -5+```++### Step 3: Compare Against State++Read the seen videos state:+```bash+cat ~/.claude/skills/Upgrades/state/youtube-videos.json+```++Compare video IDs to identify NEW videos not in the seen list.++### Step 4: Extract Transcripts for New Videos++For each new video, use the **VideoTranscript** skill:+```bash+bun ~/.claude/skills/CORE/Tools/GetTranscript.ts "<video-url>"+```++### Step 5: Update State++Add the new video IDs to the seen list and save:+- Update `state/youtube-videos.json` with new video IDs+- Keep last 50 videos per channel++### Step 6: Report Results++For each new video, provide:+- Channel name and video title+- Video URL and publish date+- Full transcript text+- Key insights relevant to PAI improvements++## Channels Monitored++Channels are configured via the skill customization layer:+- **Base skill**: `~/.claude/skills/Upgrades/youtube-channels.json` (empty - for PAI generic channels if any)+- **User customization**: `~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json`++The config loader merges both, so user channels are automatically included.++## Adding New Channels++Edit your customization file at `~/.claude/SKILLCUSTOMIZATIONS/Upgrades/youtube-channels.json`:++```json+{+ "_customization": {+ "description": "Your personal YouTube channels",+ "merge_strategy": "append"+ },+ "channels": [+ {+ "name": "Channel Name",+ "channel_id": "@channelhandle",+ "url": "https://www.youtube.com/@channelhandle",+ "priority": "HIGH",+ "description": "What this channel covers"+ }+ ]+}+```++## State File Format++`state/youtube-videos.json`:+```json+{+ "last_check_timestamp": "2025-12-01T10:00:00Z",+ "channels": {+ "Indy Dev Dan": {+ "last_video_id": "abc123",+ "last_video_title": "Video Title",+ "last_checked": "2025-12-01T10:00:00Z",+ "seen_videos": ["abc123", "def456", "ghi789"]+ }+ }+}+```diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/sources.json b/Packs/pai-upgrades-skill/src/skills/Upgrades/sources.jsonnew file mode 100644index 00000000..b242016f--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/sources.json@@ -0,0 +1,184 @@+{+ "blogs": [+ {+ "name": "Main News",+ "url": "https://www.anthropic.com/news",+ "priority": "HIGH",+ "type": "blog"+ },+ {+ "name": "Alignment Science Blog",+ "url": "https://alignment.anthropic.com/",+ "priority": "MEDIUM",+ "type": "blog"+ },+ {+ "name": "Research Page",+ "url": "https://www.anthropic.com/research",+ "priority": "MEDIUM",+ "type": "blog"+ },+ {+ "name": "Transformer Circuits",+ "url": "https://transformer-circuits.pub/",+ "priority": "LOW",+ "type": "blog"+ }+ ],+ "github_repos": [+ {+ "name": "claude-code",+ "owner": "anthropics",+ "repo": "claude-code",+ "priority": "HIGH",+ "check_commits": true,+ "check_releases": true,+ "check_issues": false+ },+ {+ "name": "skills",+ "owner": "anthropics",+ "repo": "skills",+ "priority": "HIGH",+ "check_commits": true,+ "check_releases": true,+ "check_issues": false+ },+ {+ "name": "MCP Specification",+ "owner": "modelcontextprotocol",+ "repo": "modelcontextprotocol",+ "priority": "HIGH",+ "check_commits": true,+ "check_releases": true,+ "check_issues": false+ },+ {+ "name": "MCP Docs",+ "owner": "modelcontextprotocol",+ "repo": "docs",+ "priority": "MEDIUM",+ "check_commits": true,+ "check_releases": false,+ "check_issues": false+ },+ {+ "name": "claude-cookbooks",+ "owner": "anthropics",+ "repo": "claude-cookbooks",+ "priority": "MEDIUM",+ "check_commits": true,+ "check_releases": false,+ "check_issues": false+ },+ {+ "name": "anthropic-sdk-python",+ "owner": "anthropics",+ "repo": "anthropic-sdk-python",+ "priority": "LOW",+ "check_commits": false,+ "check_releases": true,+ "check_issues": false+ },+ {+ "name": "anthropic-sdk-typescript",+ "owner": "anthropics",+ "repo": "anthropic-sdk-typescript",+ "priority": "MEDIUM",+ "check_commits": false,+ "check_releases": true,+ "check_issues": false+ },+ {+ "name": "courses",+ "owner": "anthropics",+ "repo": "courses",+ "priority": "MEDIUM",+ "check_commits": true,+ "check_releases": false,+ "check_issues": false+ },+ {+ "name": "claude-quickstarts",+ "owner": "anthropics",+ "repo": "claude-quickstarts",+ "priority": "MEDIUM",+ "check_commits": true,+ "check_releases": false,+ "check_issues": false+ }+ ],+ "changelogs": [+ {+ "name": "Claude Code CHANGELOG",+ "url": "https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md",+ "priority": "HIGH",+ "type": "changelog"+ },+ {+ "name": "Claude Docs Release Notes",+ "url": "https://docs.claude.com/en/release-notes/overview",+ "priority": "HIGH",+ "type": "changelog"+ },+ {+ "name": "API Release Notes",+ "url": "https://docs.claude.com/en/release-notes/api",+ "priority": "HIGH",+ "type": "changelog"+ },+ {+ "name": "MCP Changelog",+ "url": "https://modelcontextprotocol.io/specification/2025-06-18/changelog",+ "priority": "HIGH",+ "type": "changelog"+ }+ ],+ "documentation": [+ {+ "name": "Claude Docs Home",+ "url": "https://docs.claude.com",+ "priority": "MEDIUM",+ "type": "docs"+ },+ {+ "name": "Anthropic API Docs",+ "url": "https://docs.anthropic.com",+ "priority": "MEDIUM",+ "type": "docs"+ },+ {+ "name": "MCP Docs",+ "url": "https://modelcontextprotocol.io",+ "priority": "HIGH",+ "type": "docs"+ },+ {+ "name": "MCP Specification",+ "url": "https://spec.modelcontextprotocol.io",+ "priority": "HIGH",+ "type": "docs"+ },+ {+ "name": "MCP Registry",+ "url": "https://registry.modelcontextprotocol.io",+ "priority": "MEDIUM",+ "type": "docs"+ },+ {+ "name": "Skills Documentation",+ "url": "https://support.claude.com/en/articles/12512176-what-are-skills",+ "priority": "HIGH",+ "type": "docs"+ }+ ],+ "community": [+ {+ "name": "Claude Developers Discord",+ "url": "https://discord.com/invite/6PPFFzqPDZ",+ "priority": "MEDIUM",+ "type": "community",+ "note": "Manual check required - no automated scraping"+ }+ ]+}diff --git a/Packs/pai-upgrades-skill/src/skills/Upgrades/youtube-channels.json b/Packs/pai-upgrades-skill/src/skills/Upgrades/youtube-channels.jsonnew file mode 100644index 00000000..de816391--- /dev/null+++ b/Packs/pai-upgrades-skill/src/skills/Upgrades/youtube-channels.json@@ -0,0 +1,3 @@+{+ "channels": []+}diff --git a/Packs/kai-voice-system/INSTALL.md b/Packs/pai-voice-system/INSTALL.mdsimilarity index 97%rename from Packs/kai-voice-system/INSTALL.mdrename to Packs/pai-voice-system/INSTALL.mdindex 4223ec4d..60ed7615 100644--- a/Packs/kai-voice-system/INSTALL.md+++ b/Packs/pai-voice-system/INSTALL.md@@ -8,8 +8,8 @@- **Google Cloud** (recommended): 4M free chars/month - [console.cloud.google.com](https://console.cloud.google.com)- **ElevenLabs**: ~10K free chars/month - [elevenlabs.io](https://elevenlabs.io)- **Required PAI Packs** (install these first):- - `kai-hook-system` - Foundation hook infrastructure- - `kai-core-install` - Skills, identity, and response format+ - `pai-hook-system` - Foundation hook infrastructure+ - `pai-core-install` - Skills, identity, and response format---@@ -94,16 +94,16 @@ echo "=== Checking Required Dependencies ==="# Check hook system (REQUIRED)if [ -f "$PAI_CHECK/hooks/lib/observability.ts" ]; then- echo "✓ kai-hook-system is installed"+ echo "✓ pai-hook-system is installed"else- echo "❌ kai-hook-system NOT installed - REQUIRED!"+ echo "❌ pai-hook-system NOT installed - REQUIRED!"fi# Check core install (REQUIRED)if [ -d "$PAI_CHECK/skills" ] && [ -f "$PAI_CHECK/skills/CORE/SKILL.md" ]; then- echo "✓ kai-core-install is installed"+ echo "✓ pai-core-install is installed"else- echo "❌ kai-core-install NOT installed - REQUIRED!"+ echo "❌ pai-core-install NOT installed - REQUIRED!"fi# Check for TTS API key (either Google or ElevenLabs)@@ -429,7 +429,7 @@ Run the verification checklist in VERIFY.md to confirm everything works.| Error | Solution ||-------|----------|-| `invalid_uid` | Remove quotes from API key in .env: `ELEVENLABS_API_KEY=abc123` not `"abc123"` |+| `invalid_uid` | Remove quotes from API key in .env: `ELEVENLABS_API_KEY=your_key` not `"abc123"` || `quota_exceeded` | Free tier exhausted. Consider switching to Google TTS || `missing_permissions` | Enable TTS permission in ElevenLabs dashboard |diff --git a/Packs/kai-voice-system/README.md b/Packs/pai-voice-system/README.mdsimilarity index 93%rename from Packs/kai-voice-system/README.mdrename to Packs/pai-voice-system/README.mdindex bb806aee..b10c769f 100644--- a/Packs/kai-voice-system/README.md+++ b/Packs/pai-voice-system/README.md@@ -1,6 +1,6 @@---name: Kai Voice System-pack-id: danielmiessler-kai-voice-system-core-v1.3.0+pack-id: danielmiessler-pai-voice-system-core-v1.3.0version: 1.3.0author: danielmiesslerdescription: Voice notification system with multi-provider TTS (Google Cloud or ElevenLabs), prosody enhancement for natural speech, and agent personality-driven voice delivery@@ -8,16 +8,16 @@ type: featurepurpose-type: [notifications, accessibility, automation]platform: macos, linuxdependencies:- - kai-hook-system (required) - Hooks trigger voice notifications- - kai-core-install (required) - Skills, identity, and response format drive voice output+ - pai-hook-system (required) - Hooks trigger voice notifications+ - pai-core-install (required) - Skills, identity, and response format drive voice outputkeywords: [voice, tts, elevenlabs, google-cloud-tts, notifications, prosody, speech, agents, personalities, accessibility]---<p align="center">- <img src="../icons/kai-voice-system-v2.png" alt="Kai Voice System" width="256">+ <img src="../icons/pai-voice-system-v2.png" alt="Kai Voice System" width="256"></p>-# Kai Voice System (kai-voice-system)+# Kai Voice System (pai-voice-system)> Voice notification system with natural speech synthesis and personality-driven delivery@@ -129,7 +129,7 @@ See [Google Cloud TTS voices](https://cloud.google.com/text-to-speech/docs/voice**Summary:**- **Files created:** 7- **Hooks registered:** 2 (Stop, SubagentStop)-- **Dependencies:** kai-hook-system (required), kai-core-install (required)+- **Dependencies:** pai-hook-system (required), pai-core-install (required)- **TTS API key:** Google Cloud API key OR ElevenLabs API key (choose one)## Agent Voice Mapping@@ -170,6 +170,6 @@ The prosody enhancer detects emotional context from message patterns:## Works Well With-- **kai-hook-system** (required) - Hooks trigger voice notifications-- **kai-core-install** (required) - Response format provides 🎯 COMPLETED line-- **kai-history-system** - Complementary functionality+- **pai-hook-system** (required) - Hooks trigger voice notifications+- **pai-core-install** (required) - Response format provides 🎯 COMPLETED line+- **pai-history-system** - Complementary functionalitydiff --git a/Packs/kai-voice-system/VERIFY.md b/Packs/pai-voice-system/VERIFY.mdsimilarity index 100%rename from Packs/kai-voice-system/VERIFY.mdrename to Packs/pai-voice-system/VERIFY.mddiff --git a/Packs/kai-voice-system/config/settings-hooks.json b/Packs/pai-voice-system/config/settings-hooks.jsonsimilarity index 100%rename from Packs/kai-voice-system/config/settings-hooks.jsonrename to Packs/pai-voice-system/config/settings-hooks.jsondiff --git a/Packs/kai-voice-system/config/voice-personalities.json b/Packs/pai-voice-system/config/voice-personalities.jsonsimilarity index 100%rename from Packs/kai-voice-system/config/voice-personalities.jsonrename to Packs/pai-voice-system/config/voice-personalities.jsondiff --git a/Packs/kai-voice-system/src/hooks/lib/prosody-enhancer.ts b/Packs/pai-voice-system/src/hooks/lib/prosody-enhancer.tssimilarity index 100%rename from Packs/kai-voice-system/src/hooks/lib/prosody-enhancer.tsrename to Packs/pai-voice-system/src/hooks/lib/prosody-enhancer.tsdiff --git a/README.md b/README.mdindex 58ec6f95..0cf65b11 100644--- a/README.md+++ b/README.md@@ -112,7 +112,7 @@ The crucial insight: **verifiability is everything**. Most people skip VERIFY. TEvery PAI skill, every workflow, every task implements this algorithm.-> **Coming Soon:** The Universal Algorithm will be released as a standalone Skill Pack with full tooling—effort classification, capability loading, ISC (Ideal State Criteria) management, and visual progress tracking. It will be included in the Kai Bundle.+> **Coming Soon:** The Universal Algorithm will be released as a standalone Skill Pack with full tooling—effort classification, capability loading, ISC (Ideal State Criteria) management, and visual progress tracking. It will be included in the PAI Bundle.### Where Are You on the Journey?@@ -273,7 +273,7 @@ $PAI_DIR/skills/CORE/│ ├── TECHSTACK.md # Your preferences│ └── SECURITY.md # Your security rules└── SYSTEM/ # PAI infrastructure- ├── ARCHITECTURE.md+ ├── PAISYSTEMARCHITECTURE.md├── MEMORYSYSTEM.md├── THEHOOKSYSTEM.md└── ...@@ -335,7 +335,7 @@ PAI doesn't force you into a structure. Everything is customizable at the levelPAI capabilities are distributed as **Packs**—self-contained, AI-installable modules that add specific capabilities to your system.- **Packs** are individual capabilities (e.g., History System, Voice Notifications, Browser Automation)-- **Bundles** are curated collections of packs that work together (e.g., the Kai Bundle)+- **Bundles** are curated collections of packs that work together (e.g., the PAI Bundle)Each pack includes everything needed: code, workflows, installation instructions, and verification tests. Your AI reads the pack and installs it into your system—no manual copying required.@@ -418,7 +418,7 @@ The core mechanism that makes PAI work is the **Hook System**. Claude Code has aThe installation is a two-phase process: **Bootstrapping** (Manual) and **Pack Installation** (AI-Driven).**Phase 1: Bootstrapping (The `install.ts` script)**-The user runs `bun run Bundles/Kai/install.ts`. This script **does not** install the full system. Instead, it:+The user runs `bun run Bundles/Official/install.ts`. This script **does not** install the full system. Instead, it:1. **Creates Directory Structure**: Sets up `~/.claude/` (or `$PAI_DIR`) with folders for `skills`, `hooks`, `history`, etc.2. **Generates Config Files**: Creates `SKILL.md`, `Contacts.md`, and `CoreStack.md` with user preferences (name, timezone).3. **Sets Environment Variables**: Updates `.zshrc` or `.bashrc` with `DA` (Assistant Name), `PAI_DIR`, etc.@@ -428,7 +428,7 @@ The user runs `bun run Bundles/Kai/install.ts`. This script **does not** install**Phase 2: Pack Installation (AI-Driven)**The user is instructed to "give each pack file to your AI". This is where the actual installation happens.-1. **User Action**: The user pastes the content of a pack file (e.g., `Packs/kai-hook-system.md`) into Claude Code.+1. **User Action**: The user pastes the content of a pack file (e.g., `Packs/pai-hook-system.md`) into Claude Code.2. **AI Execution**: The pack file contains natural language instructions and code blocks. The AI reads these instructions and:* **Writes Files**: Creates the TypeScript hook files (e.g., `hooks/security-validator.ts`) and skill definitions.* **Configures System**: Updates `settings.json` to register the new hooks.@@ -452,14 +452,14 @@ Here is what happens when you use PAI:* `hooks/security-validator.ts` runs. It checks if `touch blog.md` is safe.* If safe (Exit Code 0), the command runs.* If unsafe (Exit Code 1+), the command is blocked.-6. **Completion**: The AI finishes the task and updates its memory (via `kai-history-system` hooks).+6. **Completion**: The AI finishes the task and updates its memory (via `pai-history-system` hooks).### 5. Key Components-* **`kai-hook-system`**: The engine room. Provides the event bus and security layer.-* **`kai-core-install`**: The brain. Defines the "CORE" skill, identity, and routing logic.-* **`kai-history-system`**: The memory. Captures session data and learnings.-* **`kai-voice-system`**: (Optional) Adds voice capabilities via ElevenLabs.+* **`pai-hook-system`**: The engine room. Provides the event bus and security layer.+* **`pai-core-install`**: The brain. Defines the "CORE" skill, identity, and routing logic.+* **`pai-history-system`**: The memory. Captures session data and learnings.+* **`pai-voice-system`**: (Optional) Adds voice capabilities via ElevenLabs.---@@ -469,7 +469,7 @@ Here is what happens when you use PAI:| Pack | Version | Category | Description ||---------|---------|----------|-------------|-| [**Kai History System**](Packs/kai-history-system.md) | 1.0.0 | Infrastructure | Automatic context-tracking system that captures all work, decisions, and learnings with zero manual effort |+| [**PAI History System**](Packs/pai-history-system.md) | 1.0.0 | Infrastructure | Automatic context-tracking system that captures all work, decisions, and learnings with zero manual effort |### Skills (Action-Oriented Capabilities)@@ -499,7 +499,7 @@ Here is what happens when you use PAI:| Bundle | Description | Packs | Tier ||--------|-------------|-------|------|-| [**Kai Bundle**](Bundles/Kai/) | The official PAI bundle - complete personal AI infrastructure extracted from Daniel Miessler's production system | 5 | Complete |+| [**PAI Bundle**](Bundles/Official/) | The official PAI bundle - complete personal AI infrastructure extracted from Daniel Miessler's production system | 5 | Complete |### Why Bundles?@@ -509,13 +509,13 @@ Here is what happens when you use PAI:- **Complete experience** - Everything needed for a specific goal- **Interactive wizard** - Guided setup with conflict detection-**The Kai Bundle** is the flagship bundle. Installing all its packs recreates the PAI v1.0 "mirrored system" experience - but through modular, maintainable packs instead of a monolithic copy.+**The PAI Bundle** is the flagship bundle. Installing all its packs recreates the PAI v1.0 "mirrored system" experience - but through modular, maintainable packs instead of a monolithic copy.**Quick install:**```bash# Clone the repo and run the interactive wizardgit clone https://github.com/danielmiessler/PAI.git-cd PAI/Bundles/Kai && bun run install.ts+cd PAI/Bundles/Official && bun run install.ts```[**Learn more about bundles →**](Bundles/)@@ -526,14 +526,14 @@ cd PAI/Bundles/Kai && bun run install.ts> **FOR AI AGENTS:** The entire PAI system is designed to be used by AI. You can read this README to understand how PAI works with its Packs and Bundles. A recommended approach: evaluate the entire system, then interact with your principal and ask them which Bundles or Packs they'd like to install—give them options based on their needs. From there, you should be able to read any Bundle or Pack file (including new ones as they're released) and guide your principal on whether they want to install it.-### Option 1: Install the Complete Kai Bundle (Recommended)+### Option 1: Install the Complete PAI Bundle (Recommended)The fastest way to get started is with the interactive bundle wizard:```bash# Clone the repogit clone https://github.com/danielmiessler/PAI.git-cd PAI/Bundles/Kai+cd PAI/Bundles/Official# Run the interactive wizardbun run install.ts@@ -1001,7 +1001,7 @@ No. That was the mistake of PAI v1.x—trying to install everything at once.PAI v2.0 is modular by design:- **Start with one pack** — History System is a good first choice- **Add more as needed** — Each pack is independent-- **Use the Kai Bundle** if you want the full experience (but even that installs one pack at a time)+- **Use the PAI Bundle** if you want the full experience (but even that installs one pack at a time)- **Cherry-pick** — Read a pack, extract the ideas, adapt them yourselfThere's no "all or nothing." Take what's useful, leave the rest.@@ -1130,7 +1130,7 @@ The packs are extracted from Kai—real capabilities that have been running in p**Updated Documentation**- Packs/README.md updated with v2.0 structure documentation- Bundles/README.md updated with new pack format description-- Bundles/Kai/README.md bumped to v2.0.0 with directory references+- Bundles/Official/README.md bumped to v2.0.0 with directory references**What Changed Per Pack**Each pack directory now contains:@@ -1190,7 +1190,7 @@ v2.0.0 launched the Packs system. v2.0.1 adds:- Platform-agnostic design: works with Claude Code, OpenCode, Gemini Code, GPT-Codex, or custom systems**First Pack Released**-- **Kai History System** (v1.0.0) - Automatic context-tracking for entire AI infrastructure+- **PAI History System** (v1.0.0) - Automatic context-tracking for entire AI infrastructure- Complete implementation: 4 hooks, 3 library files, settings.json configuration**New Documentation**diff --git a/Tools/CheckPAIState.md b/Tools/CheckPAIState.mdindex c0e3fc42..3eb63639 100644--- a/Tools/CheckPAIState.md+++ b/Tools/CheckPAIState.md@@ -167,18 +167,18 @@ cat $PAI_DIR/skills/CORE/SKILL.md 2>/dev/null | head -50----## Comparison: Your Installation vs Kai Bundle+## Comparison: Your Installation vs PAI Bundle-### Available Packs in Kai Bundle+### Available Packs in PAI Bundle| Pack | Version | Purpose | Status ||------|---------|---------|--------|-| kai-hook-system | 1.0.0 | Event-driven automation foundation | ⬜ Check |-| kai-history-system | 1.0.0 | Automatic context capture and organization | ⬜ Check |-| kai-skill-system | 1.0.0 | Capability routing and dynamic loading | ⬜ Check |-| kai-voice-system | 1.1.0 | Voice notifications with ElevenLabs TTS | ⬜ Check |-| kai-identity | 1.0.0 | Personality, response format, principles | ⬜ Check |-| kai-observability-server | 1.0.0 | Real-time multi-agent monitoring | ⬜ Check |+| pai-hook-system | 1.0.0 | Event-driven automation foundation | ⬜ Check |+| pai-history-system | 1.0.0 | Automatic context capture and organization | ⬜ Check |+| pai-skill-system | 1.0.0 | Capability routing and dynamic loading | ⬜ Check |+| pai-voice-system | 1.1.0 | Voice notifications with ElevenLabs TTS | ⬜ Check |+| pai-identity | 1.0.0 | Personality, response format, principles | ⬜ Check |+| pai-observability-server | 1.0.0 | Real-time multi-agent monitoring | ⬜ Check |**Status key:**- ✅ Installed and working@@ -236,14 +236,14 @@ PAI State Check Complete========================INSTALLED (4 packs):- ✅ kai-hook-system v1.0.0 - Working- ✅ kai-history-system v1.0.0 - Working- ✅ kai-skill-system v1.0.0 - Working- ⚠️ kai-voice-system v1.0.0 - Installed but ElevenLabs key missing+ ✅ pai-hook-system v1.0.0 - Working+ ✅ pai-history-system v1.0.0 - Working+ ✅ pai-skill-system v1.0.0 - Working+ ⚠️ pai-voice-system v1.0.0 - Installed but ElevenLabs key missingNOT INSTALLED (2 packs):- ⬜ kai-identity - Would add personality and response format- ⬜ kai-observability-server - Would add agent monitoring dashboard+ ⬜ pai-identity - Would add personality and response format+ ⬜ pai-observability-server - Would add agent monitoring dashboardISSUES FOUND:1. Voice system missing ELEVENLABS_API_KEY in environment@@ -251,13 +251,13 @@ ISSUES FOUND:RECOMMENDATIONS:1. [Quick fix] Add ElevenLabs API key to enable voice notifications- 2. [New pack] Consider kai-identity for consistent response formatting- 3. [Optional] kai-observability-server useful if you run multiple agents+ 2. [New pack] Consider pai-identity for consistent response formatting+ 3. [Optional] pai-observability-server useful if you run multiple agents-SUGGESTED NEXT: kai-identity+SUGGESTED NEXT: pai-identity- All dependencies met (hooks, history, skills installed)- Adds consistent personality and response format- - Installation: Give your AI the kai-identity.md pack file+ - Installation: Give your AI the pai-identity.md pack file```---diff --git a/Tools/PAIBundleTemplate.md b/Tools/PAIBundleTemplate.mdindex 1333eae4..187a013b 100644--- a/Tools/PAIBundleTemplate.md+++ b/Tools/PAIBundleTemplate.md@@ -38,10 +38,10 @@ Bundles/```yaml---# name: (24 words max) Human-readable bundle name-name: The Official PAI (Kai) Bundle+name: The Official PAI Bundle# bundle-id: (format) {author}-{bundle-name}-v{version}-bundle-id: danielmiessler-kai-bundle-v1.0.0+bundle-id: danielmiessler-pai-bundle-v1.0.0# version: (format) SemVer major.minor.patchversion: 1.0.0diff --git a/Tools/PAIPackTemplate.md b/Tools/PAIPackTemplate.mdindex 4547f46d..051cbdb8 100644--- a/Tools/PAIPackTemplate.md+++ b/Tools/PAIPackTemplate.md@@ -91,7 +91,7 @@ A voice system pack MUST include:```yaml---# name: (24 words max) Human-readable pack name-name: Kai History System+name: PAI History System# pack-id: (format) {author}-{pack-name}-{variant}-v{version}pack-id: danielmiessler-history-system-core-v1.0.0@@ -174,14 +174,14 @@ name: Pack Name> **FOR AI AGENTS:** Every pack file MUST include these sections in order. The HTML comments in each section contain detailed instructions - read them and follow them exactly. Replace the example content with your pack's actual content.-Below is the Kai History System pack as the reference implementation demonstrating COMPLETE pack structure.+Below is the PAI History System pack as the reference implementation demonstrating COMPLETE pack structure.```markdown<p align="center">- <img src="icons/history-system.png" alt="Kai History System" width="256">+ <img src="icons/history-system.png" alt="PAI History System" width="256"></p>-# Kai History System+# PAI History System> Granular context-tracking system for the entire AI infrastructure - captures all work, decisions, and learnings automatically with zero manual effort@@ -206,7 +206,7 @@ You are receiving a PAI Pack - a modular upgrade for AI agent systems.**What is a Pack?** See: [Pack System](../README.md#the-journey-pai-v1x--v20)-This pack adds automatic memory to your entire AI infrastructure. The Kai History System is not just about agent outputs - it's a granular context-tracking system for EVERYTHING that happens in your system:+This pack adds automatic memory to your entire AI infrastructure. The PAI History System is not just about agent outputs - it's a granular context-tracking system for EVERYTHING that happens in your system:- **Continuous Learning**: Capture insights as they happen- **Bug Fixing**: Trace exactly what was done when debugging@@ -245,7 +245,7 @@ Example:**Summary:**- **Files created:** 3- **Hooks registered:** 2-- **Dependencies:** kai-hook-system (required)+- **Dependencies:** pai-hook-system (required)-->| Component | File | Purpose |@@ -347,7 +347,7 @@ Every pack MUST explain its architectural innovation:USE VISUAL DIAGRAMS - ASCII art showing the flow is extremely valuable.-EXAMPLE (from kai-skill-system):+EXAMPLE (from pai-skill-system):The skill system has 5 explicit routing layers:1. SKILL.md frontmatter → loaded into system prompt for routing2. SKILL.md body → workflow routing table, loads on invocation@@ -377,7 +377,7 @@ This is NOT optional. If your pack doesn't have interesting architecture,it might not be worth being a pack.-->-The Kai History System solves this through **automatic, hook-based documentation**. Instead of requiring manual effort, it captures work as a byproduct of doing the work.+The PAI History System solves this through **automatic, hook-based documentation**. Instead of requiring manual effort, it captures work as a byproduct of doing the work.**Core Architecture:**@@ -570,9 +570,9 @@ PAI_CHECK="${PAI_DIR:-$HOME/.config/pai}"# Check for required packs (customize for your pack)# Example: Check if hook system is installedif [ -f "$PAI_CHECK/hooks/lib/observability.ts" ]; then- echo "✓ kai-hook-system is installed"+ echo "✓ pai-hook-system is installed"else- echo "⚠️ kai-hook-system not installed (may be required)"+ echo "⚠️ pai-hook-system not installed (may be required)"fi# Add checks for other dependencies your pack needs@@ -1169,7 +1169,7 @@ Format: ### {version} - {YYYY-MM-DD}## File Naming Convention- Pack directories in `Packs/` directory-- kebab-case for directory names: `kai-history-system/`, `kai-hook-system/`+- kebab-case for directory names: `pai-history-system/`, `pai-hook-system/`- Each pack directory contains: `README.md`, `INSTALL.md`, `VERIFY.md`, `src/`- Source files in `src/` use appropriate extensions: `.ts`, `.yaml`, `.hbs`, etc.