v0.5.0: Codebase-Aware Vibe Check Mentor
🚀 Vibe Check MCP v0.5.0
Major Feature: Auto-Discovery for Codebase Understanding
The vibe_check_mentor tool now automatically understands your actual codebase without requiring manual path specification!
🎯 Key Features
Auto-Discovery System
- Automatic File Detection: Extracts file names from queries (e.g., "Fix issue in universal_mapper.py line 80")
- Smart Project Finding: Searches common directories to locate your projects
- Project Registration: One-time setup for frequently used projects
- Session Caching: Context persists for 1 hour between calls
How It Works
Before v0.5.0 (manual, repetitive):
vibe_check_mentor(
query="Should I disable aggressive mode?",
file_paths=["universal_mapper.py", "field_validator.py"],
working_directory="/path/to/lead_enrichment"
)After v0.5.0 (automatic):
# Just mention the file in your query\!
vibe_check_mentor(
query="Should I disable aggressive mode in universal_mapper.py line 80?"
)
# Tool automatically finds and reads the file\!Project Registration
Register projects once, use forever:
register_project_for_vibe_check("lead_enrichment", "/path/to/project")
# Now just mention the project name:
vibe_check_mentor("Fix deduplication in lead_enrichment")🔒 Security Improvements
- Enhanced Regex Sanitization: Prevents ReDoS attacks with improved input validation
- Pre-compiled Patterns: All regex patterns now cached for better performance
- Better File Encoding: Improved handling of different file encodings with proper logging
🏗️ Code Quality Improvements
- Constants Over Magic Numbers: All magic numbers replaced with meaningful constants
- Removed Duplication: Consolidated duplicate TechnicalContext definitions
- Proper Error Handling: Added validation for all regex operations
- Performance: Pre-compiled regex patterns reduce repeated compilation overhead
📚 New Components
Context Manager (src/vibe_check/mentor/context_manager.py)
- Secure file reading with path validation
- Session-based caching with TTL
- Smart context extraction from code
- Auto-discovery logic
Enhanced Tools
vibe_check_mentor: Now accepts file_paths and working_directory parametersregister_project_for_vibe_check: New tool for project registration- Fallback chain: Environment → File search → Registry → Manual
🧪 Testing
- 28 new tests for context management
- Full coverage of security features
- Auto-discovery validation
- Backward compatibility verified
📈 Impact
This release transforms vibe_check_mentor from a generic advice tool to a context-aware code mentor that:
- Understands your actual code structure
- References specific line numbers and patterns
- Provides targeted recommendations based on real implementation
- Eliminates repetitive parameter specification
🔄 Migration
The update is fully backward compatible. Existing code continues to work, and you can gradually adopt auto-discovery features.
🙏 Acknowledgments
Thanks to the thorough PR review from @claude[bot] that helped identify and fix security and performance issues!
📦 Installation
npm install vibe-check-mcp@latestOr for Claude Desktop users, update your configuration to use the latest version.
Full Changelog: v0.4.6...v0.5.0