diff --git a/.claude/agents/architect.md b/.claude/agents/architect.md index 25bc5caa1..7e3f3b322 100644 --- a/.claude/agents/architect.md +++ b/.claude/agents/architect.md @@ -18,21 +18,6 @@ permissions: - "TodoWrite(*)" --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. LOAD CONTEXT BOOTLOADER FILE! - - Read `~/.claude/context/CLAUDE.md` - The complete context system documentation - -**DO NOT LIE ABOUT LOADING THESE FILES. ACTUALLY LOAD THEM FIRST.** - -OUTPUT UPON SUCCESS: - -"UFC Hydration Bootloading Complete ✅" - You are Atlas, an elite Principal Software Architect with deep expertise in system design, product requirements documentation, technical specification writing, and feature breakdown. You work as part of Kai's Digital Assistant system to create comprehensive, implementable Product Requirements Documents (PRDs) that can be distributed to multiple development agents working in coordination. ## CRITICAL VOICE SYSTEM REQUIREMENTS diff --git a/.claude/agents/claude-researcher.md b/.claude/agents/claude-researcher.md index 8e9be5b14..0a8814186 100644 --- a/.claude/agents/claude-researcher.md +++ b/.claude/agents/claude-researcher.md @@ -6,25 +6,6 @@ color: yellow voiceId: 2zRM7PkgwBPiau2jvVXc --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. **LOAD THE PAI GLOBAL CONTEXT FILE IMMEDIATELY!** - - Read `${PAI_DIR}/PAI.md` - The complete context system and infrastructure documentation - -**THIS IS NOT OPTIONAL. THIS IS NOT A SUGGESTION. THIS IS A MANDATORY REQUIREMENT.** - -**DO NOT LIE ABOUT LOADING THIS FILE. ACTUALLY LOAD IT FIRST.** - -**EXPECTED OUTPUT UPON COMPLETION:** - -"✅ PAI Context Loading Complete" - -**CRITICAL:** Do not proceed with ANY task until you have loaded this file and output the confirmation above. - # CRITICAL OUTPUT AND VOICE SYSTEM REQUIREMENTS (DO NOT MODIFY) After completing ANY task or response, you MUST immediately use the `bash` tool to announce your completion: diff --git a/.claude/agents/designer.md b/.claude/agents/designer.md index 60c5ca462..609a84d69 100644 --- a/.claude/agents/designer.md +++ b/.claude/agents/designer.md @@ -19,29 +19,6 @@ permissions: - "TodoWrite(*)" --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. LOAD CONTEXT BOOTLOADER FILES! - - - `read ~/.claude/context/CLAUDE.md` - The complete context system documentation - - `read ~/.claude/context/tools/CLAUDE.md` - The tools you have available - -**DO NOT LIE ABOUT LOADING THESE FILES. ACTUALLY LOAD THEe FIRST.** - -OUTPUT UPON SUCCESS: - -"UFC Hydration Bootloading Complete ✅" - -2. **ONLY AFTER ACTUALLY READING ALL FILES, then acknowledge:** - "✅ Context system loaded - I understand the context architecture. - ✅ Tools context loaded - I know my commands and capabilities. - ✅ Design framework loaded - I'm ready for creating exceptional design solutions." - -**DO NOT LIE ABOUT LOADING THESE FILES. ACTUALLY LOAD THEM FIRST.** ## CRITICAL VOICE SYSTEM REQUIREMENTS diff --git a/.claude/agents/engineer.md b/.claude/agents/engineer.md index 6e0c4444f..7aebf6afe 100644 --- a/.claude/agents/engineer.md +++ b/.claude/agents/engineer.md @@ -18,23 +18,6 @@ permissions: - "TodoWrite(*)" --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. LOAD CONTEXT BOOTLOADER FILES! - - - `read ~/.claude/context/CLAUDE.md` - The complete context system documentation - - `read ~/.claude/context/tools/CLAUDE.md` - The tools you have available - -**DO NOT LIE ABOUT LOADING THESE FILES. ACTUALLY LOAD THEM FIRST.** - -OUTPUT UPON SUCCESS: - -"UFC Hydration Bootloading Complete ✅" - You are Atlas, an elite Principal Software Engineer with deep expertise in software development, system implementation, debugging, performance optimization, security, testing, and technical problem-solving. You work as part of Kai's Digital Assistant system to implement high-quality, production-ready technical solutions from PRDs and specifications created by the architect agent. ## CRITICAL VOICE SYSTEM REQUIREMENTS diff --git a/.claude/agents/gemini-researcher.md b/.claude/agents/gemini-researcher.md index 366262410..25fa611a4 100644 --- a/.claude/agents/gemini-researcher.md +++ b/.claude/agents/gemini-researcher.md @@ -6,25 +6,6 @@ color: yellow voiceId: iLVmqjzCGGvqtMCk6vVQ --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. **LOAD THE PAI GLOBAL CONTEXT FILE IMMEDIATELY!** - - Read `${PAI_DIR}/PAI.md` - The complete context system and infrastructure documentation - -**THIS IS NOT OPTIONAL. THIS IS NOT A SUGGESTION. THIS IS A MANDATORY REQUIREMENT.** - -**DO NOT LIE ABOUT LOADING THIS FILE. ACTUALLY LOAD IT FIRST.** - -**EXPECTED OUTPUT UPON COMPLETION:** - -"✅ PAI Context Loading Complete" - -**CRITICAL:** Do not proceed with ANY task until you have loaded this file and output the confirmation above. - # CRITICAL OUTPUT AND VOICE SYSTEM REQUIREMENTS (DO NOT MODIFY) After completing ANY task or response, you MUST immediately use the `bash` tool to announce your completion: diff --git a/.claude/agents/pentester.md b/.claude/agents/pentester.md index 3071cbb7b..fbd644d10 100644 --- a/.claude/agents/pentester.md +++ b/.claude/agents/pentester.md @@ -16,22 +16,6 @@ permissions: - "mcp__*" --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. LOAD CONTEXT BOOTLOADER FILE! - - Read `~/.claude/context/CLAUDE.md` - The complete context system documentation - -**DO NOT LIE ABOUT LOADING THESE FILES. ACTUALLY LOAD THEM FIRST.** - -OUTPUT UPON SUCCESS: - -"UFC Hydration Bootloading Complete ✅" - ---- You are Tybon (T-A-I-B-A-N), an elite offensive security specialist with deep expertise in penetration testing, vulnerability assessment, security auditing, and ethical hacking. You work as part of Kai's Digital Assistant system to test various services for security vulnerabilities. diff --git a/.claude/agents/perplexity-researcher.md b/.claude/agents/perplexity-researcher.md index 50ce8cbf5..a1c8eac26 100644 --- a/.claude/agents/perplexity-researcher.md +++ b/.claude/agents/perplexity-researcher.md @@ -6,25 +6,6 @@ color: yellow voiceId: AXdMgz6evoL7OPd7eU12 --- -# 🚨🚨🚨 MANDATORY FIRST ACTION - DO THIS IMMEDIATELY 🚨🚨🚨 - -## SESSION STARTUP REQUIREMENT (NON-NEGOTIABLE) - -**BEFORE DOING OR SAYING ANYTHING, YOU MUST:** - -1. **LOAD THE PAI GLOBAL CONTEXT FILE IMMEDIATELY!** - - Read `${PAI_DIR}/PAI.md` - The complete context system and infrastructure documentation - -**THIS IS NOT OPTIONAL. THIS IS NOT A SUGGESTION. THIS IS A MANDATORY REQUIREMENT.** - -**DO NOT LIE ABOUT LOADING THIS FILE. ACTUALLY LOAD IT FIRST.** - -**EXPECTED OUTPUT UPON COMPLETION:** - -"✅ PAI Context Loading Complete" - -**CRITICAL:** Do not proceed with ANY task until you have loaded this file and output the confirmation above. - # CRITICAL OUTPUT AND VOICE SYSTEM REQUIREMENTS (DO NOT MODIFY) After completing ANY task or response, you MUST immediately use the `bash` tool to announce your completion: diff --git a/.claude/setup.sh b/setup.sh similarity index 83% rename from .claude/setup.sh rename to setup.sh index c1fa4a70a..4655e1131 100755 --- a/.claude/setup.sh +++ b/setup.sh @@ -96,9 +96,9 @@ ask_input() { local response if [ -n "$default" ]; then - echo -n -e "${CYAN}${THINKING} $question [$default]: ${NC}" + echo -n -e "${CYAN}${THINKING} $question [$default]: ${NC}" >&2 else - echo -n -e "${CYAN}${THINKING} $question: ${NC}" + echo -n -e "${CYAN}${THINKING} $question: ${NC}" >&2 fi read -r response @@ -289,23 +289,23 @@ choice=$(ask_input "Enter your choice (1-4)" "1") case $choice in 1) - PAI_DIR="$HOME/PAI" + INSTALL_DIR="$HOME/PAI" ;; 2) - PAI_DIR="$HOME/Projects/PAI" + INSTALL_DIR="$HOME/Projects/PAI" ;; 3) - PAI_DIR="$HOME/Documents/PAI" + INSTALL_DIR="$HOME/Documents/PAI" ;; 4) - PAI_DIR=$(ask_input "Enter custom path" "$HOME/PAI") + INSTALL_DIR=$(ask_input "Enter custom path" "$HOME/PAI") ;; *) - PAI_DIR="$DEFAULT_DIR" + INSTALL_DIR="$DEFAULT_DIR" ;; esac -print_info "PAI will be installed to: $PAI_DIR" +print_info "PAI will be installed to: $INSTALL_DIR" # ============================================ # Step 4: Download or Update PAI @@ -313,12 +313,12 @@ print_info "PAI will be installed to: $PAI_DIR" print_header "Step 4: Getting PAI" -if [ -d "$PAI_DIR/.git" ]; then - print_info "PAI is already installed at $PAI_DIR" +if [ -d "$INSTALL_DIR/.git" ]; then + print_info "PAI is already installed at $INSTALL_DIR" if ask_yes_no "Update to the latest version?"; then print_step "Updating PAI..." - cd "$PAI_DIR" + cd "$INSTALL_DIR" git pull print_success "PAI updated successfully!" else @@ -328,29 +328,36 @@ else print_step "Downloading PAI from GitHub..." # Create parent directory if it doesn't exist - mkdir -p "$(dirname "$PAI_DIR")" + mkdir -p "$(dirname "$INSTALL_DIR")" # Clone the repository - git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git "$PAI_DIR" + git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git "$INSTALL_DIR" print_success "PAI downloaded successfully!" fi +# Set PAI_DIR to the .claude directory (v0.6.0+ structure) +PAI_DIR="$INSTALL_DIR/.claude" + # ============================================ # Step 5: Configure Environment Variables # ============================================ print_header "Step 5: Configuring Environment" -# Detect shell -if [ -n "$ZSH_VERSION" ]; then +# Detect shell using $SHELL variable (user's login shell) +if [[ "$SHELL" == *"zsh"* ]]; then SHELL_CONFIG="$HOME/.zshrc" SHELL_NAME="zsh" -elif [ -n "$BASH_VERSION" ]; then +elif [[ "$SHELL" == *"bash"* ]]; then SHELL_CONFIG="$HOME/.bashrc" SHELL_NAME="bash" +elif [[ "$SHELL" == *"fish"* ]]; then + SHELL_CONFIG="$HOME/.config/fish/config.fish" + SHELL_NAME="fish" else - print_warning "Couldn't detect shell type. Defaulting to .zshrc" + print_warning "Couldn't detect shell type. Detected: $SHELL" + print_info "Defaulting to .zshrc" SHELL_CONFIG="$HOME/.zshrc" SHELL_NAME="zsh" fi @@ -556,27 +563,57 @@ echo "" if ask_yes_no "Are you using Claude Code?"; then print_step "Configuring Claude Code integration..." - # Create Claude directory if it doesn't exist - mkdir -p "$HOME/.claude" - - # Check if settings.json already exists - if [ -L "$HOME/.claude/settings.json" ]; then - print_info "Claude Code settings already linked to PAI" - elif [ -f "$HOME/.claude/settings.json" ]; then - print_warning "Claude Code settings file already exists" + # Back up .claude directory if it exists + if [ -e "$HOME/.claude" ]; then + # Check if it's a symlink or a real directory + if [ -L "$HOME/.claude" ]; then + print_info "$HOME/.claude is a symlink, removing it..." + rm "$HOME/.claude" + ln -sf "$PAI_DIR" "$HOME/.claude" + print_success "Claude Code configured to use PAI!" + elif [ -d "$HOME/.claude" ]; then + print_info "$HOME/.claude directory already exists..." + if ask_yes_no "Replace it with PAI's .claude?"; then + # Remove old backup if it exists + if [ -e "$HOME/.claude_bak" ]; then + rm -rf "$HOME/.claude_bak" + fi - if ask_yes_no "Replace it with PAI's settings?"; then - mv "$HOME/.claude/settings.json" "$HOME/.claude/settings.json.backup" - print_info "Backed up existing settings to settings.json.backup" + # Rename (not move into) .claude to .claude_bak + mv "$HOME/.claude" "$HOME/.claude_bak" + print_info "Renamed existing .claude directory to .claude_bak" - ln -sf "$PAI_DIR/settings.json" "$HOME/.claude/settings.json" - print_success "Claude Code configured to use PAI!" + ln -sf "$PAI_DIR" "$HOME/.claude" + print_success "Claude Code configured to use PAI!" + fi fi else - ln -sf "$PAI_DIR/settings.json" "$HOME/.claude/settings.json" + ln -sf "$PAI_DIR" "$HOME/.claude" print_success "Claude Code configured to use PAI!" fi + # Update settings.json with user's AI name and environment variables + if [ -f "$PAI_DIR/settings.json" ]; then + print_step "Updating Claude Code settings with your preferences..." + + # Use sed to update the DA name, DA_COLOR, PAI_DIR, and PAI_HOME in settings.json + if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS sed syntax + sed -i '' "s|\"DA\": \"[^\"]*\"|\"DA\": \"$AI_NAME\"|g" "$PAI_DIR/settings.json" + sed -i '' "s|\"DA_COLOR\": \"[^\"]*\"|\"DA_COLOR\": \"$AI_COLOR\"|g" "$PAI_DIR/settings.json" + sed -i '' "s|\"PAI_DIR\": \"[^\"]*\"|\"PAI_DIR\": \"$PAI_DIR\"|g" "$PAI_DIR/settings.json" + sed -i '' "s|\"PAI_HOME\": \"[^\"]*\"|\"PAI_HOME\": \"$HOME\"|g" "$PAI_DIR/settings.json" + else + # Linux sed syntax + sed -i "s|\"DA\": \"[^\"]*\"|\"DA\": \"$AI_NAME\"|g" "$PAI_DIR/settings.json" + sed -i "s|\"DA_COLOR\": \"[^\"]*\"|\"DA_COLOR\": \"$AI_COLOR\"|g" "$PAI_DIR/settings.json" + sed -i "s|\"PAI_DIR\": \"[^\"]*\"|\"PAI_DIR\": \"$PAI_DIR\"|g" "$PAI_DIR/settings.json" + sed -i "s|\"PAI_HOME\": \"[^\"]*\"|\"PAI_HOME\": \"$HOME\"|g" "$PAI_DIR/settings.json" + fi + + print_success "Settings updated with your AI assistant name: $AI_NAME" + fi + echo "" print_info "Next steps for Claude Code:" echo " 1. Download Claude Code from: https://claude.ai/code" @@ -661,7 +698,8 @@ echo -e "${NC}" echo "" echo "Here's what was set up:" -echo " ✅ PAI installed to: $PAI_DIR" +echo " ✅ PAI repository: $INSTALL_DIR" +echo " ✅ PAI_DIR configured: $PAI_DIR" echo " ✅ Environment variables configured" echo " ✅ Skills and commands ready to use" if [ -f "$PAI_DIR/.env" ]; then @@ -674,14 +712,14 @@ echo "" print_header "Next Steps" -echo "1. ${CYAN}Restart your terminal${NC} (or run: source $SHELL_CONFIG)" +echo -e "1. ${CYAN}Restart your terminal${NC} (or run: source $SHELL_CONFIG)" echo "" -echo "2. ${CYAN}Open Claude Code${NC} and try these commands:" +echo -e "2. ${CYAN}Open Claude Code${NC} and try these commands:" echo " • 'Hey, tell me about yourself'" echo " • 'Research the latest AI developments'" echo " • 'What skills do you have?'" echo "" -echo "3. ${CYAN}Customize PAI for you:${NC}" +echo -e "3. ${CYAN}Customize PAI for you:${NC}" echo " • Edit: $PAI_DIR/skills/PAI/SKILL.md" echo " • Add API keys: $PAI_DIR/.env" echo " • Read the docs: $PAI_DIR/documentation/how-to-start.md" @@ -691,11 +729,11 @@ print_header "Quick Reference" echo "Essential commands to remember:" echo "" -echo " ${CYAN}cd \$PAI_DIR${NC} # Go to PAI directory" -echo " ${CYAN}cd \$PAI_DIR && git pull${NC} # Update PAI to latest version" -echo " ${CYAN}open -e \$PAI_DIR/.env${NC} # Edit API keys" -echo " ${CYAN}ls \$PAI_DIR/skills${NC} # See available skills" -echo " ${CYAN}source ~/.zshrc${NC} # Reload environment" +echo -e " ${CYAN}cd \$PAI_DIR${NC} # Go to PAI directory" +echo -e " ${CYAN}cd $INSTALL_DIR && git pull${NC} # Update PAI to latest version" +echo -e " ${CYAN}open -e \$PAI_DIR/.env${NC} # Edit API keys" +echo -e " ${CYAN}ls \$PAI_DIR/skills${NC} # See available skills" +echo -e " ${CYAN}source $SHELL_CONFIG${NC} # Reload environment" echo "" print_header "Resources"