Skip to content

Commit 64ebb98

Browse files
committed
chore: add copilot instructions
1 parent e9889e5 commit 64ebb98

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/copilot-instructions.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copilot Coding Agent Instructions for Koenkk/zigbee2mqtt
2+
3+
Welcome! These instructions help ensure Copilot Coding Agent can efficiently collaborate on this repository.
4+
5+
## 1. Codebase Overview
6+
- **Main language:** JavaScript (Node.js), TypeScript
7+
- **Purpose:** Zigbee to MQTT bridge for home automation.
8+
- **Core directories:**
9+
- `src/`: Main source code (device adapters, communication, logic).
10+
- `test/`: Automated tests.
11+
- `docs/`: Documentation.
12+
- `data/`: Zigbee device definitions.
13+
14+
## 2. Preferred Practices
15+
- **Branching:** Use feature branches (`feat/xyz`) for enhancements and `fix/xyz` for bug fixes.
16+
- **Commits:** Write clear, descriptive commit messages (imperative mood, < 72 chars).
17+
- **Pull Requests:** Reference related issues, provide context, and include before/after behavior if modifying logic. Tag with appropriate labels.
18+
- **Testing:** All code changes should include or update relevant tests. A test coverage of 100% is enforced. Run `npm test:coverage` before submitting PRs.
19+
- **Linting:** Code must pass lint and formatting checks (`npm run check`). Use Biome for formatting.
20+
- **Documentation:** Update relevant docs when adding features or changing behavior.
21+
22+
## 3. Review & Feedback
23+
- All PRs require review by maintainers.
24+
- Automated checks must pass before merging.
25+
- If you’re fixing a bug, include steps to reproduce in the PR description.
26+
27+
## 4. Security & Secrets
28+
- Do not commit secrets, credentials, or private keys.
29+
- Follow the repository’s security policy for vulnerability disclosures.
30+
31+
## 5. Communication
32+
- Use Discussions and Issues for questions and proposals.
33+
- Respect community guidelines and code of conduct.
34+
35+
## 6. Special Instructions for Copilot Coding Agent
36+
- Suggest code changes that strictly adhere to existing styles and patterns.
37+
- Explain reasoning in PR descriptions when implementing complex changes.
38+
- Prioritize backward compatibility unless otherwise specified.
39+
- If uncertain, prompt for clarification via PR comment before proceeding.
40+
41+
---
42+
43+
For more details, see [Best practices for Copilot coding agent in your repository](https://gh.io/copilot-coding-agent-tips) and the repository's CONTRIBUTING.md.

0 commit comments

Comments
 (0)