Implements a sophisticated multi-tier intelligence system that delivers
contextually relevant insults based on error analysis, command intent,
and user history. This transforms Parrot from random selection to truly
smart, adaptive feedback.
Key Features:
- Error classification: 20+ error types with multi-source analysis
- Semantic tagging: 200+ tagged insults with rich metadata
- Intent parsing: Understands user goals and command complexity
- Multi-factor scoring: 5-factor relevance algorithm with weighted scoring
- Adaptive learning: Tracks history to avoid repetition
- Personality matching: Respects mild/sarcastic/savage preferences
Architecture:
- Tier 5 (NEW): ML-inspired semantic matching with 35%/30%/20%/10%/5%
weighted scoring across tag matching, error matching, context,
novelty, and personality fit
- Falls through gracefully to existing Tiers 4-1 if confidence < 30%
- Persistent history in ~/.parrot/insult_history.json
Components:
- error_classifier.go: Classifies errors from exit codes and patterns
- semantic_tags.go: Tagged insult database with metadata
- intent_parser.go: Extracts command intent and risk analysis
- insult_scorer.go: Multi-factor relevance scoring engine
- insult_history.go: Persistent history tracking with novelty scoring
- smart_fallback.go: Integration layer (Tier 5 addition)
- INTELLIGENCE_README.md: Comprehensive documentation
This creates a truly intelligent system that learns and adapts to deliver
the most appropriate, contextual insult for each failure scenario.
Co-authored-by: mfwolffe <wolffemf@dukes.jmu.edu>
Co-authored-by: espadonne <espadonne@outlook.com>
Parrot now fully supports fish shell alongside bash and zsh!
Changes:
- Created parrot-hook.fish with fish-native syntax and event handlers
- Updated install.go to detect fish and install to ~/.config/fish/conf.d/
- Updated setup.go with fish-specific shell restart instructions
- Updated README.md with fish shell documentation
- Updated parrot-hook.sh to mention fish support
Fish users now get:
- Automatic hook installation to conf.d (auto-sourced by fish)
- Native fish syntax (set -gx, test, functions)
- Post-command execution hooks via fish_postexec event
- Same sassy experience as bash/zsh users
Implementation details:
- Fish hooks use fish_postexec event for command tracking
- Config installed to ~/.config/fish/conf.d/parrot.fish
- OLLAMA_KEEP_ALIVE properly set with fish syntax
- Separate hook file needed due to incompatible syntax