CMP-003low SeverityCode Complexity & Dead Architecture
Unused Imports and Orphaned Files Removed
When AI replaces an approach, it leaves old component files, dead utility functions, and unused imports in the codebase.
1-Click Fix Prompt for Cursor & Claude Code
Review my codebase for "Unused Imports and Orphaned Files Removed" (CMP-003). Issue: When AI replaces an approach, it leaves old component files, dead utility functions, and unused imports in the codebase. Remediation required: Run a linter or knip pass to identify and delete files not imported anywhere in the application. Please: 1. Locate any occurrences of this issue across my repository. 2. Refactor the code to follow production standards without breaking existing functionality. 3. Provide a clear command or step to test and verify the fix.
Why AI Assistants Write This Bug
When AI replaces an approach, it leaves old component files, dead utility functions, and unused imports in the codebase.
AI code generation prioritizes immediate syntax execution over production edge cases. When an assistant hits an undefined variable or strict type error, it frequently takes the path of least resistance rather than implementing standard pre-launch security patterns.
Code Comparison
Common AI Code PatternVulnerable
// Vulnerable AI-generated pattern for: Unused Imports and Orphaned Files Removed
// Problematic pattern: When AI replaces an approach, it leaves old component files, dead utility functions, and unused imports in the codebase.Launch-Ready Fix
// Production-ready fix for: Unused Imports and Orphaned Files Removed
// Recommended remediation: Run a linter or knip pass to identify and delete files not imported anywhere in the application.Remediation & Verification Checklist
Remediation: Run a linter or knip pass to identify and delete files not imported anywhere in the application.
- Search your codebase for pattern matching "Unused Imports and Orphaned Files Removed".
- Apply the recommended remediation: Run a linter or knip pass to identify and delete files not imported anywhere in the application.
- Run local build and test commands to ensure no regressions.
- Verify in your browser or with curl that the issue is resolved.
Audit All 108 Checks in One Click
Checking items one by one takes hours. Let us do it in 2 minutes.
With the Founder Pass ($15 one-time), we automatically scan your repository for this issue, plus all other 107 launch checks across secrets, Stripe webhooks, Supabase RLS, and security headers.