Back to All Prompts
GitHub CopilotSoftware

Legacy Function Refactoring & SOLID Compliance Prompt

Refactor complex legacy code structures into single-responsibility, performant, and clean functions using Copilot suggestions.

SYSTEM PROMPT INSTRUCTION
// Act as a senior software architect. Analyze and refactor the legacy function provided below to follow clean code standards.

// Refactoring Targets:
// 1. Single Responsibility Principle (SRP): Split massive routines into small utility functions.
// 2. DRY (Don't Repeat Yourself): Consolidate duplicate structures.
// 3. Type Safety: Ensure strict TypeScript typings, interfaces, and guards.
// 4. Performance: Improve loop processing, search complexity, and async actions.

// Legacy Code:
[Paste Legacy Code Here]

💡 How to Use This Prompt

Copy the prompt above and paste it directly into GitHub Copilot or your preferred AI model. Replace any bracketed placeholders [ ] with your specific task inputs.

Was This Helpful?

Help us improve by rating this resource.

Share This Resource

Share with your team and social networks.

"Legacy Function Refactoring & SOLID Compliance Prompt" AI Prompt Layout & Best Practices

Structuring your input correctly is the most important step in prompt design. The "Legacy Function Refactoring & SOLID Compliance Prompt" template showcased on this page is custom-built to resolve tasks under the "Software" category.

By deploying "GitHub Copilot"'s logical reasoning capacities, this template automates repetitive tasks. Edit the bracketed placeholders to make it specific to your targets.

All prompt templates on our platform use advanced system variables like role playing and output formatting rules to ensure corporate-level output standards.

For best results, we suggest running this prompt on the latest AI engine revisions and reviewing the generated outputs for factual accuracy.

Frequently Asked Questions (FAQ)

While specifically optimized for "GitHub Copilot", it is highly compatible with ChatGPT, Anthropic Claude, Google Gemini, and Llama.
Simply replace the bracketed placeholders [...] with your project details, such as target audience, programming language, or tone.
We recommend using premium versions such as ChatGPT Plus, Claude 3.5 Sonnet, or Gemini Pro for highly consistent and structured content.