This guide helps you get started with GitHub Copilot in this repository, leveraging the configured MCP (Model Context Protocol) servers for enhanced AI assistance.
- Click the Code button on the repository
- Select Codespaces tab
- Click Create codespace on main
- Wait for automatic setup (2-3 minutes)
- Start coding with Copilot!
Benefits:
- ✅ Zero configuration required
- ✅ All MCP servers pre-configured
- ✅ Copilot extensions pre-installed
- ✅ Development environment ready to use
-
Clone the repository:
git clone https://github.com/Hack23/game.git cd game -
Install dependencies:
npm install
-
Open in VS Code:
code . -
Install GitHub Copilot extension from VS Code Marketplace
-
MCP servers are automatically configured for the repository context
Ask questions about the codebase:
What does the Game component do?
Get code suggestions:
Create a new Three.js sprite component for a player character
Debug issues:
Why is this TypeScript error occurring?
Generate tests:
Write unit tests for the Player component
With MCP servers, Copilot has enhanced capabilities:
File System Access:
Find all React components in the src directory
Show me the structure of the components folder
GitHub Integration:
What are the recent issues in this repository?
Show me the latest pull requests
Git History:
What changes were made to this file recently?
Show me the commit history for this component
Documentation Search (if Brave API key configured):
Search for Three.js sprite anchor documentation
Find React 19 best practices for hooks
- Open Copilot Chat
- Ask: "Create a new Three.js sprite component following the project guidelines"
- Review the generated code
- Accept and customize as needed
- Describe your game mechanic
- Example: "Add collision detection between player and enemies"
- Copilot will suggest implementation using Three.js patterns
- Open a component file
- Ask: "Generate Vitest unit tests for this component"
- Copilot will create tests following project conventions
❌ Bad: "Make a component" ✅ Good: "Create a TypeScript React component for a Three.js sprite with position state"
❌ Bad: "Fix this" ✅ Good: "This TypeScript error occurs because the texture type is not defined. How do I properly type a Three.js texture?"
✅ "Following the strict TypeScript rules in copilot-instructions.md, create a game component"
- Start typing code
- Wait for Copilot suggestions (gray text)
- Press Tab to accept
- Press Esc to dismiss
- Read and write project files
- List directory contents
- Search for files
- Understand project structure
- Access repository metadata
- Read issues and PRs
- View workflow status
- Search code
- View commit history
- Understand code changes
- Track file evolution
- Analyze branches
- Remember conversation context
- Track your preferences
- Maintain session history
- Improve suggestions over time
- Automate browser testing
- Debug UI components
- Take screenshots
- Test interactions
- Coding guidelines for this project
- TypeScript strict mode rules
- Three.js patterns
- Testing requirements
Note: MCP servers are automatically configured in the GitHub Codespaces environment.
- Check Copilot is enabled in VS Code settings
- Verify you're signed in to GitHub
- Reload VS Code window
- Check Copilot status bar icon
- Check environment variables are set (especially
GITHUB_TOKENfor product-task-agent) - Restart VS Code or Codespace
- Review VS Code output panel for errors
- Be more specific in your prompts
- Reference project guidelines
- Provide more context
- Try rephrasing your question
- Close unnecessary files
- Restart VS Code
- Check system resources
This project follows Hack23 AB's Information Security Management System (ISMS):
- 🔐 Information Security Policy - Overall security governance
- 🛠️ Secure Development Policy - SDLC and testing requirements
- 📦 Open Source Policy - Supply chain security
For security questions, use the 🔒 security-specialist agent.
- GitHub Copilot Docs
- MCP Specification
- Three.js Documentation
- React Documentation
- TypeScript Handbook
-
Plan: Ask Copilot to help design the feature
Help me design a scoring system for the game -
Implement: Generate the component
Create a ScoreDisplay component using Three.js Text -
Test: Generate unit tests
Write Vitest tests for the ScoreDisplay component -
Document: Add JSDoc comments
Add TypeScript JSDoc documentation to this component
-
Identify: Describe the problem
The sprite is not rendering at the correct position -
Analyze: Get suggestions
What could cause incorrect sprite positioning in Three.js? -
Fix: Implement the solution
Update the sprite position calculation to account for anchor points -
Verify: Generate test cases
Create tests to verify sprite positioning
-
Review: Understand current code
Explain how this component works -
Improve: Get refactoring suggestions
How can I improve this code following TypeScript best practices? -
Refactor: Apply changes
Refactor this to use React hooks instead of class components -
Test: Ensure functionality
Generate regression tests for this refactored component
When contributing code with Copilot:
- Follow project guidelines in
.github/copilot-instructions.md - Ensure TypeScript strict mode compliance
- Add tests for new features
- Run
npm run lintandnpm run test - Review Copilot suggestions before accepting
For help with Copilot or MCP servers:
- Review MCP Configuration Guide
- Check GitHub Copilot Docs
- Open an issue in this repository
Happy coding with Copilot! 🚀