3.2 KiB
Code Quality Analyzer Reference
Comprehensive reference guides for code quality analysis, security review, clarity refactoring, and architectural patterns.
Files in This Directory
security-checklist.md
Complete security checklist covering OWASP Top 10, input validation, authentication, cryptography, and data protection with actionable checks.
When to use: Security reviews, pre-deployment audits, vulnerability assessments Coverage: OWASP Top 10, CWE database, common vulnerabilities
clarity-refactoring-rules.md
10 proven refactoring rules for improving code clarity, reducing complexity, and eliminating technical debt without changing behavior.
When to use: Code reviews, refactoring sessions, complexity reduction Key topics: Guard clauses, extract functions, explaining variables, naming conventions
code-quality-metrics.md
Understanding and interpreting code quality metrics including cyclomatic complexity, maintainability index, code duplication, and test coverage.
When to use: Quality assessments, setting standards, tracking improvements Metrics: Complexity, duplication, coverage, maintainability scores
architecture-patterns.md
Best practices for clean architecture, layering, dependency management, and preventing architectural erosion in multi-module codebases.
When to use: Synthesis analysis, architectural reviews, system design Patterns: Layered architecture, dependency injection, circular dependency prevention
analysis-workflows.md
Step-by-step workflows for conducting security reviews, clarity refactorings, and synthesis analysis with practical timelines and checklists.
When to use: Planning code quality initiatives, conducting audits Workflows: Security review process, refactoring workflow, synthesis analysis
Quick Reference
Security Review Process
- Run automated scanners (Bandit, Semgrep)
- Manual code review for OWASP Top 10
- Generate security scorecard
- Prioritize by severity (Critical → High → Medium)
- Fix and verify
- Re-scan to confirm
Clarity Refactoring Process
- Identify complexity hotspots (complexity > 10)
- Apply guard clauses to flatten nesting
- Extract functions for single responsibility
- Add explaining variables for complex logic
- Replace magic numbers with constants
- Measure before/after complexity
Synthesis Analysis Process
- Map module dependencies
- Identify circular dependencies
- Detect architectural violations
- Find code duplication across files
- Check consistency (naming, errors, patterns)
- Enforce architectural standards
Navigation by Use Case
| I need to... | Use this guide... |
|---|---|
| Fix security vulnerabilities | security-checklist.md |
| Reduce code complexity | clarity-refactoring-rules.md |
| Understand quality metrics | code-quality-metrics.md |
| Enforce clean architecture | architecture-patterns.md |
| Plan a code quality audit | analysis-workflows.md |
Return to agent documentation