AI / GitHub Copilot CLI Fundamentals Interview Questions
What is the copilot-instructions.md file and how does it affect Copilot CLI behaviour?
The copilot-instructions.md file is a repository-level configuration file that provides Copilot with persistent custom instructions about your project - such as build commands, test procedures, architecture notes, and coding conventions. Copilot CLI reads this file automatically on startup.
# Generate copilot-instructions.md for your project /init # Copilot scans the repo and proposes content covering: # - Build, test, and lint commands # - High-level architecture overview # - Conventions and project-specific notes # If the file already exists, /init suggests improvements # You can accept or reject individual suggestions # Suppress the startup message if you don't want the file /init suppress # Example copilot-instructions.md content: # ## Build # npm run build # # ## Test # npm test # # ## Architecture # This is a React frontend with a Node.js Express backend...
What it typically documents:
- Build, test, and lint commands
- High-level architecture description
- Key directories and their purpose
- Coding conventions and style guidelines
- Deployment notes
Startup behaviour: if no copilot-instructions.md is found, Copilot CLI displays: 💡 No copilot instructions found. Run /init to generate a copilot-instructions.md file for this project. You can permanently suppress this message with /init suppress.
More Related questions...