UNPKG

prompt-plus-plus-mcp

Version:

Advanced MCP server with 44+ metaprompt strategies including AI Core Principles, Vibe Coding Rules, and metadata-driven intelligent selection

11 lines 6.07 kB
{ "name": "Delete Aggressively", "description": "Remove dead code, unused dependencies, and unnecessary complexity ruthlessly. Maintains codebase health by preventing accumulation of technical debt and confusion.", "template": "You are an AI assistant implementing the 'Delete Aggressively' principle from the Vibe Coding Rules. Your task is to identify and safely remove unnecessary code, dependencies, and complexity while preserving essential functionality.\n\nFollow this aggressive deletion framework:\n\n1. **Deletion Candidates Identification**:\n - **Dead Code**: Unreachable or unused\n - **Commented Code**: Old implementations\n - **Unused Dependencies**: Package bloat\n - **Redundant Abstractions**: Over-engineering\n - **Legacy Features**: No longer needed\n - **Test Debt**: Obsolete tests\n - **Documentation Rot**: Outdated docs\n\n2. **Safety Verification**:\n - Usage analysis across codebase\n - Runtime dependency checking\n - Feature flag verification\n - Customer usage metrics\n - Integration point mapping\n - Test coverage impact\n\n3. **Deletion Impact Analysis**:\n - **Direct Impact**: Immediate effects\n - **Indirect Impact**: Ripple effects\n - **Performance Impact**: Speed/size improvements\n - **Maintenance Impact**: Reduced complexity\n - **Team Impact**: Knowledge requirements\n - **Risk Assessment**: What could break\n\n4. **Deletion Strategies**:\n - **Immediate Deletion**: Obviously dead\n - **Deprecation First**: Mark then remove\n - **Feature Flag**: Disable then delete\n - **Gradual Removal**: Piece by piece\n - **Big Bang**: All at once\n - **Archive Strategy**: Keep history\n\n5. **Code Simplification**:\n - Remove unnecessary abstractions\n - Inline single-use functions\n - Eliminate redundant conditions\n - Simplify complex logic\n - Remove defensive coding excess\n - Consolidate duplications\n\n6. **Validation Process**:\n - Comprehensive test suite run\n - Manual testing checklist\n - Performance benchmarks\n - Build size comparison\n - Deployment verification\n - Rollback preparation\n\nInitial prompt: [Insert initial prompt here]\n\nPlease provide your response in the following JSON format:\n\n<json>\n{\n \"initial_prompt\": \"The original prompt provided\",\n \"codebase_health_assessment\": {\n \"total_lines\": \"Current codebase size\",\n \"dead_code_estimate\": \"Percentage unused\",\n \"dependency_count\": \"Number of dependencies\",\n \"complexity_hotspots\": [\"Complex area\"],\n \"last_cleanup\": \"When last pruned\",\n \"technical_debt_level\": \"High/Medium/Low\"\n },\n \"deletion_candidates\": [\n {\n \"type\": \"Dead code/Unused dep/Legacy feature\",\n \"location\": \"File/package/module\",\n \"size\": \"Lines/KB affected\",\n \"last_modified\": \"How old\",\n \"usage_verification\": \"How checked\",\n \"confidence\": \"High/Medium/Low\",\n \"deletion_priority\": \"High/Medium/Low\"\n }\n ],\n \"impact_analysis\": [\n {\n \"deletion_target\": \"What to remove\",\n \"benefits\": [\n \"Reduced complexity\",\n \"Faster builds\",\n \"Clearer codebase\"\n ],\n \"risks\": [\n \"Potential breakage\",\n \"Hidden dependency\"\n ],\n \"mitigation\": \"How to handle risks\",\n \"metrics\": {\n \"lines_removed\": \"Count\",\n \"complexity_reduction\": \"Percentage\",\n \"build_time_saving\": \"Seconds\"\n }\n }\n ],\n \"deletion_plan\": [\n {\n \"phase\": \"Phase number\",\n \"targets\": [\"What to delete\"],\n \"approach\": \"Immediate/Deprecate/Feature flag\",\n \"timeline\": \"When to execute\",\n \"validation_steps\": [\n \"Test suite run\",\n \"Manual verification\",\n \"Performance check\"\n ],\n \"rollback_strategy\": \"How to undo\"\n }\n ],\n \"simplification_opportunities\": [\n {\n \"pattern\": \"Over-abstraction/Redundancy/Complexity\",\n \"current_state\": \"How it is now\",\n \"simplified_version\": \"How it could be\",\n \"loc_reduction\": \"Lines saved\",\n \"readability_gain\": \"High/Medium/Low\"\n }\n ],\n \"dependency_cleanup\": [\n {\n \"package\": \"Dependency name\",\n \"reason_added\": \"Original purpose\",\n \"current_usage\": \"How it's used now\",\n \"alternatives\": [\"Native solution\", \"Smaller lib\"],\n \"removal_effort\": \"High/Medium/Low\",\n \"size_saving\": \"KB saved\"\n }\n ],\n \"validation_checklist\": [\n {\n \"check\": \"All tests pass\",\n \"status\": \"Pass/Fail/Pending\",\n \"details\": \"Specific results\"\n },\n {\n \"check\": \"No runtime errors\",\n \"verification_method\": \"How tested\",\n \"confidence\": \"High/Medium/Low\"\n }\n ],\n \"team_communication\": {\n \"announcement_plan\": \"How to inform team\",\n \"documentation_updates\": [\"What to update\"],\n \"knowledge_transfer\": \"What team needs to know\",\n \"objection_handling\": \"Address concerns\"\n },\n \"metrics_summary\": {\n \"before\": {\n \"total_loc\": \"Lines of code\",\n \"dependencies\": \"Count\",\n \"build_time\": \"Seconds\",\n \"bundle_size\": \"MB\"\n },\n \"after\": {\n \"total_loc\": \"Reduced lines\",\n \"dependencies\": \"Fewer deps\",\n \"build_time\": \"Faster builds\",\n \"bundle_size\": \"Smaller size\"\n },\n \"improvement_percentage\": \"Overall reduction\"\n },\n \"key_insights\": [\n \"Major dead code area discovered\",\n \"Significant complexity reduction possible\",\n \"Critical dependency unnecessary\"\n ],\n \"recommendation\": \"Prioritized deletion plan with safety measures\"\n}\n</json>", "examples": [ "Clean up legacy feature flags and code", "Remove unused npm dependencies", "Delete commented-out code blocks", "Simplify over-engineered abstractions" ] }