Files
CHORUS/pkg/slurp/intelligence/doc.go
anthonyrawlins 9bdcbe0447 Integrate BACKBEAT SDK and resolve KACHING license validation
Major integrations and fixes:
- Added BACKBEAT SDK integration for P2P operation timing
- Implemented beat-aware status tracking for distributed operations
- Added Docker secrets support for secure license management
- Resolved KACHING license validation via HTTPS/TLS
- Updated docker-compose configuration for clean stack deployment
- Disabled rollback policies to prevent deployment failures
- Added license credential storage (CHORUS-DEV-MULTI-001)

Technical improvements:
- BACKBEAT P2P operation tracking with phase management
- Enhanced configuration system with file-based secrets
- Improved error handling for license validation
- Clean separation of KACHING and CHORUS deployment stacks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 07:56:26 +10:00

68 lines
3.0 KiB
Go

// Package intelligence provides context analysis and generation capabilities for the SLURP system.
//
// This package implements the AI-powered analysis engine that generates contextual understanding
// from filesystem content, code structure, and existing project knowledge. It integrates with
// RAG systems and uses role-specific analysis to create comprehensive context metadata.
//
// Key Features:
// - Intelligent file content analysis and context generation
// - Integration with RAG systems for enhanced context understanding
// - Role-specific context insights and recommendations
// - Project goal alignment assessment and tracking
// - Pattern detection and context template application
// - Multi-language code analysis and understanding
//
// Core Components:
// - IntelligenceEngine: Main interface for context analysis and generation
// - FileAnalyzer: Analyzes individual files for context extraction
// - DirectoryAnalyzer: Analyzes directory structures and patterns
// - PatternDetector: Identifies recurring patterns in codebases
// - GoalAligner: Assesses alignment with project goals
//
// Integration Points:
// - pkg/slurp/context: Uses context types for generated metadata
// - pkg/slurp/temporal: Creates temporal context evolution records
// - pkg/slurp/roles: Applies role-specific analysis and insights
// - External RAG systems: Enhances context with knowledge retrieval
// - Language servers: Integrates with existing language analysis
//
// Example Usage:
//
// engine := intelligence.NewEngine(config, ragClient)
// ctx := context.Background()
//
// // Analyze a file for context generation
// contextNode, err := engine.AnalyzeFile(ctx, "/path/to/file.go", "developer")
// if err != nil {
// log.Fatal(err)
// }
//
// // Generate role-specific insights
// insights, err := engine.GenerateRoleInsights(ctx, contextNode, "architect")
// if err != nil {
// log.Fatal(err)
// }
//
// fmt.Printf("Generated context: %s\n", contextNode.Summary)
// fmt.Printf("Role insights: %v\n", insights)
//
// Leadership Integration:
// This package is designed to be used primarily by the elected CHORUS leader node,
// which has the responsibility for context generation across the cluster. The
// intelligence engine coordinates with the leader election system to ensure
// only authorized nodes perform context generation operations.
//
// Performance Considerations:
// - Concurrent analysis of multiple files with worker pools
// - Caching of analysis results to avoid repeated computation
// - Streaming analysis for large files to manage memory usage
// - Rate limiting for external RAG system integration
// - Prioritized processing based on file importance and frequency
//
// Quality Assurance:
// - Confidence scoring for all generated context
// - Validation against existing context for consistency
// - Feedback integration for continuous improvement
// - Role-specific quality thresholds and filtering
// - Pattern matching against known good examples
package intelligence