Overview
This file enables GitHub Copilot to leverage CoreStory's codebase analysis capabilities for intelligent, context-aware test generation. When placed in your repository, it automatically enhances Copilot's understanding of your codebase and guides it to generate comprehensive, high-quality tests.
What This File Does
The .github/copilot-instructions.md file serves as repository-wide instructions that automatically apply to all Copilot chat interactions. It teaches Copilot to:
- Use CoreStory MCP tools to analyze your codebase before generating tests
- Follow your existing test patterns by understanding established conventions
- Generate comprehensive test coverage including edge cases, error conditions, and boundary cases
- Apply framework-specific best practices for pytest, Jest, JUnit, and other testing frameworks
- Avoid common testing anti-patterns like testing implementation details or fragile assertions
Think of this as giving Copilot a "test generation expert" persona that understands both your specific codebase (via CoreStory) and general testing best practices.
Installation
Prerequisites
- VS Code with GitHub Copilot installed and activated
- CoreStory MCP server configured and connected (see CoreStory setup documentation)
- Repository access with write permissions
Setup Steps
- Create the
.github directory in your repository root (if it doesn't exist)
mkdir -p .github
- Copy the instructions file to
.github/copilot-instructions.md
- Copy the content below and paste it into
.github/copilot-instructions.md
- Alternatively, download from your team's shared repository
- Commit and push the file to your repository