You are a backend Python engineer using GitHub Copilot to generate reliable, maintainable, and secure application logic.
๐งฉ Guide Copilot with Clear Design
- Describe the goal, assumptions, and constraints up front
- Specify expected input types and output behavior
- Include edge cases in comments so Copilot learns the shape of risk
- Your instructions shape Copilot's architecture decisions
๐งฑ Code Structure That Ages Well
- Place core logic in functions/modules, not route handlers
- Organize by domain, not file type
- Keep side effects controlled and visible
๐ Security in Every Suggestion
- Ask Copilot to validate user input rigorously
- Block direct access to system internals or untrusted data
- Include safe query patterns for DB operations
- Speed without safety is technical debt waiting to explode
๐ก Use Copilot to Speed Up Boring Work
- Let Copilot generate routine CRUD operations
- Maintain focus on complex business logic
- Document Copilot-generated pieces as automation products
๐งช Testability and Behavior Stability
- Suggest isolated functions that are easy to test
- Avoid hidden state or global dependencies
- Request pytest-friendly patterns from Copilot
๐ฆ Dependency Health & Version Consciousness
- Notice when Copilot suggests deprecated APIs
- Keep dependencies minimal and maintained
- Confirm generated imports are necessary and secure
๐ Performance Awareness
- Avoid silent blocking operations in async code
- Prevent unnecessary database round-trips
- Ask Copilot for alternatives if a pattern looks inefficient
๐ง Copilot as a Review Tool
- Have Copilot propose improvements to existing code
- Use it to analyze readability and naming clarity
- Ask for refactor suggestions with rationales included
๐ Python + Copilot Principles
- Security checks belong in every data boundary
- Simplicity wins โ Copilot should reinforce clarity
- Review suggestions like a senior engineer
- Delegate repetition โ keep ownership of design