Docs/improve comprehensive documentation - #119
shrutu0929 wants to merge 7 commits into
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
📝 WalkthroughWalkthroughThis PR introduces AI-assisted suppression and triage functionality with pattern learning, local caching, new configuration flags, enhanced parser robustness, comprehensive documentation updates, and workflow trigger changes to use pull_request_target events. Changes
Sequence Diagram(s)sequenceDiagram
participant CA as CodeSmellAnalyzer
participant PM as PatternMatcher
participant PF as PatternFingerprinter
participant O as LLMOrchestrator
participant PL as PatternLearner
participant S as Storage
CA->>CA: analyze() with AI triage enabled
CA->>PF: fingerprint detected issues
PF-->>CA: code_pattern_hash
CA->>PM: check is_suppressed_by_ai()
PM->>S: load cached patterns
S-->>PM: RefactoringPattern with counts
PM-->>CA: suppression status
alt Not Suppressed
CA->>O: evaluate_issues_batch()
O-->>CA: confidence scores
alt Confidence > 0.8
O->>CA: generate_suggestion()
CA->>CA: attach AI fix
else Confidence < 0.3
CA->>CA: suppress issue
CA->>PL: record feedback (suppressed_by_ai)
PL->>S: update pattern counters
end
else Suppressed Cached
CA->>CA: skip LLM call (optimization)
end
CA-->>CA: return analyzed issues with metadata
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This PR addresses several gaps in the current documentation to provide a more comprehensive, accurate, and practical guide for users. All improvements were made directly to existing files without creating new files or directories, keeping the documentation structure clean.
What's Changed
Added Core API References: Expanded
docs/api-reference/overview.mdx
with programmatic usage examples for all major internal subsystems:
CodeSmellAnalyzer and SecurityAnalyzer
AutofixEngine
LLMProvider and PromptManager
RAGSearch
ExtractConstantRefactorer
Added Real-World Recipes: Injected practical, step-by-step implementations into the existing guides:
Added a CI/CD recipe for blocking SQL Injection via GitHub Actions to
docs/guides/code-analysis.mdx
.
Added a python script recipe for running large-scale automated batch refactoring to
docs/guides/refactoring.mdx
.
Updated CLI Commands: Fixed outdated commands in
docs/cli/commands.mdx
to accurately reflect the recent module refactoring:
Added refactron auth login
Added refactron repo init
Expanded Advanced Configuration: Updated
docs/essentials/configuration.mdx
to provide granular, per-analyzer tuning capabilities (e.g., complexity metrics, code smell thresholds, strict security modes) and advanced path exclusion patterns (e.g., rule-specific per_file_ignores).
Motivation and Context
The previous documentation lacked concrete programmatic examples and was missing recent CLI updates. By surfacing the Core Modules API and adding real-world recipes (like the CI integration), developers can now easily integrate Refactron into automated workflows.
Summary by CodeRabbit
Release Notes
New Features
loginfor authentication andinitfor repository initialization.Documentation