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