-
-
Notifications
You must be signed in to change notification settings - Fork 0
Create initial copilot-instructions.md #680
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,116 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 🧠 GitHub Copilot Repository Instructions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| These are repository-specific instructions to guide GitHub Copilot’s behavior when generating or editing code within this project. They apply to Copilot Chat, Copilot Coding Agent, and Copilot Code Review. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 🔍 Project Overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This repository is a WordPress plugin (Tour Operator) project. It is built using PHP, leverages WordPress blocks for custom functionality, and strictly follows the WordPress Coding Standards (WPCS). The codebase is structured as a WordPress plugin and may include PHP files, block registration, and other WordPress-specific patterns. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 🛠️ Technologies and Tooling | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Languages:** JavaScript (ES2022+), TypeScript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Runtime:** Node.js | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Package Manager:** npm or yarn (based on `package.json`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Linting:** ESLint with Prettier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Testing:** Vitest / Jest (unit tests), Playwright (E2E tests) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Frameworks:** None assumed unless otherwise declared in `/src` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+15
to
+21
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Languages:** JavaScript (ES2022+), TypeScript | |
| - **Runtime:** Node.js | |
| - **Package Manager:** npm or yarn (based on `package.json`) | |
| - **Linting:** ESLint with Prettier | |
| - **Testing:** Vitest / Jest (unit tests), Playwright (E2E tests) | |
| - **Frameworks:** None assumed unless otherwise declared in `/src` | |
| - **Languages:** PHP (primary), JavaScript (ESNext for blocks/admin) | |
| - **Coding Standards:** WordPress Coding Standards (WPCS) for PHP, ESLint (optional) for JS | |
| - **Tooling:** WordPress CLI, Composer (for PHP dependencies), npm (for JS build, if present) | |
| - **Testing:** WordPress PHPUnit test suite, WP-specific testing tools (e.g., WP_UnitTestCase) | |
| - **Frameworks:** WordPress (plugin), no JS frameworks unless explicitly declared |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented project structure does not match the actual repository structure. According to the repository context, the actual structure includes includes/ for PHP classes, templates/ for template files, assets/ for compiled assets, and build/ for build files. The structure should be updated to reflect the actual WordPress plugin architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback Please make sure to scan the 2.1-trunk branch to see the current directory structure.
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project structure described does not match this WordPress plugin repository. The actual structure includes includes/, post-types/, templates/, assets/, and languages/ directories typical of WordPress plugins. There is no src/core/, src/api/, or src/components/ directory structure as shown here.
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These coding conventions don't align with this WordPress plugin project. WordPress has established coding standards for PHP that should be referenced instead. The plugin should follow WordPress PHP coding standards, including practices specific to WordPress development such as escaping output, using WordPress APIs, and following WordPress function naming conventions.
| - Document public functions with JSDoc | |
| - Document public functions using WordPress inline documentation standards (PHPDoc) |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra hyphen and inconsistent formatting. This should be a proper bullet point list item.
| - | |
| ```bash | |
| npm run dev | |
| ```` | |
| ```bash | |
| npm run dev |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build commands listed don't match the actual package.json scripts for this repository. The actual available commands are "start", "build", "build-pot", "build-mopo", and "translate-US" which are WordPress-specific build tasks. There is no "npm run dev", "npm run lint", "npm run format", or generic "npm test" command defined.
| * **Development** | |
| - | |
| ```bash | |
| npm run dev | |
| ```` | |
| * **Lint and Format** | |
| ```bash | |
| npm run lint | |
| npm run format | |
| ``` | |
| * **Run Tests** | |
| ```bash | |
| npm test | |
| ``` | |
| * **Build** | |
| ```bash | |
| npm run build | |
| The following npm scripts are available in this repository: | |
| - **Start (development or local preview, if supported):** | |
| ```bash | |
| npm run start |
-
Build (production build):
npm run build
-
Generate POT file for translations:
npm run build-pot
-
Build MO/PO translation files:
npm run build-mopo
-
Translate to US English:
npm run translate-US
krugazul marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guidance is contradictory to the actual nature of this repository. This IS a WordPress plugin project, so instructing Copilot to avoid WordPress-related code will prevent it from generating appropriate code. The repository also specifically works with tour operator features that may integrate with services, so blanket exclusions may be inappropriate.
| * Do not include any WordPress-related imports, functions, or file structures | |
| * Do not scaffold routes or components using Express, Next.js, or any framework unless explicitly declared | |
| * Do not generate `.php`, `.twig`, or legacy CMS files | |
| * Do not reference or assume plugins like WooCommerce or Wetu | |
| * Do not scaffold routes or components using Express, Next.js, or any framework unless explicitly declared | |
| * Do not generate `.twig` or legacy CMS files (non-WordPress) unless specifically required | |
| * Do not reference or assume plugins like WooCommerce or Wetu unless explicitly requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is completely inaccurate. This repository is the "Tour Operator" WordPress plugin, not a JavaScript/TypeScript application. The repository contains primarily PHP code for a WordPress plugin with custom post types for tours, accommodations, and destinations. This fundamental misrepresentation will cause Copilot to generate inappropriate code suggestions.