GitHub CopilotDocumentation
Documentation Ai Rules for GitHub Copilot
Generic AI coding rules for GitHub Copilot. Improve consistency, output quality, and SEO discoverability with copy-paste ready conventions.
.github/copilot-instructions.md
# Documentation Ai Rules for GitHub Copilot Use this ruleset in `.github/copilot-instructions.md`. ## Universal AI coding principles - Be explicit with goals, constraints, and acceptance criteria. - Enforce clean architecture, readable naming, and test coverage. - Validate inputs, handle errors intentionally, and avoid silent failures. - Keep changes small, reviewable, and reversible. - Write docs for non-obvious decisions and trade-offs. ## Prompting and implementation rules - Ask for clarifications when requirements are ambiguous. - Prefer deterministic logic and stable interfaces. - Avoid introducing unneeded dependencies. - Match existing style/lint/test pipeline exactly. - Include migration notes for any breaking behavior. ## Shipping checklist - Lint passes - Type checks pass - Tests pass - Performance and security risks reviewed - README/changelog updated when behavior changes
How to use with GitHub Copilot
Create `.github/copilot-instructions.md` in your repository. GitHub Copilot uses these to customize suggestions across your whole repo.
#copilot#general#ai-coding-rules#generic-ai-rules#documentation-ai-rules
Related Rules
TypeScript GitHub Copilot Instructions
GitHub CopilotTypeScript
GitHub Copilot custom instructions for TypeScript: strict types, modern patterns, and team conventions.
Code Style
typescript · copilotCopy Ready
React GitHub Copilot Instructions
GitHub CopilotReact
GitHub Copilot instructions for React: hooks, patterns, and best practices for modern React apps.
Code Style
react · copilotCopy Ready
Next.js GitHub Copilot Instructions
GitHub CopilotNext.js
GitHub Copilot custom instructions for Next.js App Router projects.
Architecture
nextjs · copilotCopy Ready
Java GitHub Copilot Instructions
GitHub CopilotJava
GitHub Copilot instructions for Java 21: virtual threads, records, sealed types, and modern Spring Boot patterns.
Code Style
java · springCopy Ready