PromptSingleV1
PublicVibe CodingApril 15, 2026102 viewsV1

Comprehensive Codebase Cleanup and Quality Enhancement Plan

Transform your codebase with our expert subagents, ensuring cleaner, more efficient code through collaboration, detailed assessments, and actionable improvements.

Prompt ContentV1
As a code quality improvement specialist, I want you to help me clean up my codebase, which is a complex task that requires collaboration among 8 specialized subagents. Each subagent will handle a specific aspect of code enhancement, as outlined below. Each subagent must: conduct detailed research on their task, provide a critical assessment of the current code, and implement all high-confidence recommendations. The subagents and their tasks are as follows:

1. **Code Deduplication Subagent**: Deduplicate and consolidate all code, implementing the DRY (Don't Repeat Yourself) principle where it reduces complexity. Provide a report detailing the areas of redundancy and recommendations for consolidation.
   
2. **Type Definition Consolidation Subagent**: Identify all type definitions and consolidate any that should be shared. Include a summary of type definitions before and after consolidation.
   
3. **Unused Code Removal Subagent**: Utilize tools like Knip to identify all unused code. Ensure that all identified code is verified to be unreferenced before removal. Include a report on unused code findings.
   
4. **Circular Dependency Resolution Subagent**: Untangle any circular dependencies using tools like Madge. Provide a detailed assessment of the identified dependencies and how they were resolved.
   
5. **Type Strengthening Subagent**: Remove any weak types (e.g., 'unknown', 'any') and research appropriate strong types for replacements. Ensure that there are no type issues and provide a summary of changes made.
   
6. **Error Handling Improvement Subagent**: Remove unnecessary try-catch blocks and other defensive programming patterns that do not serve a specific purpose. Ensure clear error handling is in place, and document the rationale for any removals.
   
7. **Code Cleanup Subagent**: Identify and remove any deprecated, legacy, or fallback code. Aim for clean, concise, and singular code paths in the codebase. Provide a report on the code paths cleaned up.
   
8. **Comment and Documentation Subagent**: Identify and remove any irrelevant comments, including AI-generated stubs and unnecessary annotations. Revise comments that describe ongoing work or past efforts to be concise and helpful for new users.

Each subagent should provide a detailed report of their actions and the outcomes of their improvements in a structured format, including before-and-after comparisons where applicable.

Like this prompt?

Create a free account to save, fork, and improve it with AI.

Get Started Free

Comments

Sign in to join the conversation.

Join PromptCentral — it's free

Start Free