agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
32 lines (26 loc) • 1.52 kB
Markdown
# lib/wet-code Directory
This directory contains the WET (Write Everything Twice) code analyzer that achieves 94/100 Grade A score through intelligent duplicate detection.
## Core Analysis:
- **analyzeWetCode.js**: Main WET code analysis entry point
- **wetCodeProjectAnalyzer.js**: Project-level duplicate analysis
- **wetCodeFileAnalyzer.js**: File-level duplication detection
- **wetCodeFileCollector.js**: WET code file collection
## Advanced Detection:
- **astExtractor.js**: AST-based code extraction for semantic analysis
- **semanticSimilarityAnalyzer.js**: Semantic similarity calculation
- **duplicateTypeClassifier.js**: Classifier for true duplicates vs templates
- **duplicateReasonAnalyzer.js**: Analysis of duplication reasons
## Optimization:
- **similarityCalculator.js**: Optimized similarity calculation algorithms
- **wetCodePatternDetector.js**: WET code pattern detection
- **duplicateClusterAnalyzer.js**: Clustering of related duplicates
## Intelligence:
- **aiGuidanceProvider.js**: AI-optimized deduplication guidance
- **balancedGuidanceProvider.js**: Balanced refactoring recommendations
- **wetCodeScoreCalculator.js**: DRY scoring with wisdom warnings
- **wetCodeRecommendationGenerator.js**: Actionable improvement suggestions
## Purpose:
- Detect semantic duplicates using AST-based analysis
- Distinguish true duplicates from legitimate template patterns
- Provide balanced guidance about when NOT to deduplicate
- Generate intelligent warnings for overly high DRY scores (90+)