-
Notifications
You must be signed in to change notification settings - Fork 29
Add comprehensive GitHub Copilot instructions for node-switchbot repository #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
@donavanbecker 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] ✨ Set up Copilot instructions
Add comprehensive GitHub Copilot instructions for node-switchbot repository
Aug 21, 2025
Copilot finished work on behalf of
donavanbecker
August 21, 2025 05:18
Pull Request Test Coverage Report for Build 17117833096Details
💛 - Coveralls |
donavanbecker
added a commit
that referenced
this pull request
Sep 18, 2025
…sitory (#300) This PR adds a comprehensive `.github/copilot-instructions.md` file that provides GitHub Copilot coding agents with detailed instructions on how to work effectively in the node-switchbot codebase. **Validated Commands and Timing**: Every command has been tested from a clean environment with actual timing measurements: - `npm install`: ~5-25 seconds (varies by cache) - `npm run build`: ~5 seconds (TypeScript compilation) - `npm run test`: ~1 second (12 tests) - `npm run lint`: ~3 seconds (ESLint validation) **Platform-Specific Requirements**: Clear documentation of constraints: - BLE functionality requires Linux-based OS only (Raspbian, Ubuntu, etc.) - Windows and macOS are NOT supported for BLE operations - Node.js versions: ^20, ^22, or ^24 required - ES Modules: Project uses `"type": "module"` **Development Workflow**: Step-by-step instructions for common tasks: - Bootstrap and setup procedures - Build, test, and lint validation cycles - Adding new device support - Working with both BLE and OpenAPI interfaces **Manual Validation Scenarios**: Specific tests to run after making changes: ```javascript // Basic functionality validation const { SwitchBotBLE, SwitchBotOpenAPI } = require('./dist/index.js'); const ble = new SwitchBotBLE(); // Should not throw const api = new SwitchBotOpenAPI('test', 'test'); // Should not throw ``` **Timeout Warnings**: Explicit "NEVER CANCEL" warnings with timeout recommendations for all build operations to prevent premature cancellation of long-running commands. The instructions include comprehensive information about: - Source code organization (`src/switchbot-ble.ts`, `src/switchbot-openapi.ts`, device classes) - Configuration files (TypeScript, ESLint, package.json) - Build output structure (`dist/` directory) - Documentation generation (TypeDoc) All instructions have been thoroughly validated by: - Following step-by-step procedures from a clean environment - Testing basic functionality scenarios - Verifying ES module imports work correctly - Confirming full development workflow chain - Measuring actual timing for all operations The instructions follow the required imperative tone ("Run [this command]", "Do not do [this]") and provide exhaustive guidance for GitHub Copilot agents to work effectively in this TypeScript Node.js library for controlling SwitchBot devices via Bluetooth Low Energy and OpenAPI. Fixes #299. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Update Workflow Co-Authored-By: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-Authored-By: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive
.github/copilot-instructions.mdfile that provides GitHub Copilot coding agents with detailed instructions on how to work effectively in the node-switchbot codebase.Key Features
Validated Commands and Timing: Every command has been tested from a clean environment with actual timing measurements:
npm install: ~5-25 seconds (varies by cache)npm run build: ~5 seconds (TypeScript compilation)npm run test: ~1 second (12 tests)npm run lint: ~3 seconds (ESLint validation)Platform-Specific Requirements: Clear documentation of constraints:
"type": "module"Development Workflow: Step-by-step instructions for common tasks:
Manual Validation Scenarios: Specific tests to run after making changes:
Timeout Warnings: Explicit "NEVER CANCEL" warnings with timeout recommendations for all build operations to prevent premature cancellation of long-running commands.
Project Structure Documentation
The instructions include comprehensive information about:
src/switchbot-ble.ts,src/switchbot-openapi.ts, device classes)dist/directory)Validation Completed
All instructions have been thoroughly validated by:
The instructions follow the required imperative tone ("Run [this command]", "Do not do [this]") and provide exhaustive guidance for GitHub Copilot agents to work effectively in this TypeScript Node.js library for controlling SwitchBot devices via Bluetooth Low Energy and OpenAPI.
Fixes #299.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.