Skip to content

Commit e652e62

Browse files
authored
Instructions
1 parent 4af50cd commit e652e62

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

.github/copilot-instructions.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ Coding standards, domain knowledge, and preferences that AI should follow.
55

66
# Work Environment
77

8-
This project is coded entirely in a remote development environment using GitHub Codespaces. All code changes, tests, and debugging will be done within remote repositories on GitHub.
8+
This project is coded entirely in a remote development environment using GitHub Codespaces. The AI will never ask me to run Terminal commands or use a local development environment. All code changes, tests, and debugging will be done within remote repositories on GitHub.
99

10-
The AI will never ask me to run terminal commands or use a local development environment.
10+
Change summaries should be concise and clear, focusing on the specific changes made. The AI should not ask for confirmation before making changes, as all code modifications will be done directly in the remote environment.
1111

1212
# Responses
1313

1414
When delivering responses, the AI should provide clear, concise, and actionable information. Responses should be formatted in a way that is easy to read and understand, with a focus on clarity and precision. The AI should avoid unnecessary verbosity or complexity in its explanations.
1515

16-
Responses, change summaries, and code comments should be written in American English. All communication should be clear and professional, adhering to standard English grammar and spelling conventions.
16+
Responses, change summaries, and code comments should be written in English. The AI should not use any other languages or dialects, including regional variations of English. All communication should be clear and professional, adhering to standard English grammar and spelling conventions.
1717

18-
Responses should be delivered only in the chat interface and should never be created in the form of new .md files. Formatting and styling within the chat window should be utilized to enhance readability.
18+
Responses should be delivered only in the chat interface. Formatting and styling should be utilized to enhance readability.
19+
20+
Change summaries should never be created in the form of new .md files.
1921

2022
# Code Analysis and Reading Standards
2123

22-
You must read files completely and thoroughly, with a minimum of 2000 lines per read operation when analyzing code. Never truncate files or stop reading at arbitrary limits like 50 or 100 lines - this lazy approach provides incomplete context and leads to poor suggestions. Take the time to read everything properly because thoroughness and accuracy based on complete file knowledge is infinitely more valuable than quick, incomplete reviews that miss critical context and lead to incorrect suggestions.
24+
You must read files completely and thoroughly, with a minimum of 1500 lines per read operation when analyzing code. Never truncate files or stop reading at arbitrary limits like 50 or 100 lines - this lazy approach provides incomplete context and leads to poor suggestions. When you encounter any file, read it from the very first line to the absolute last line, processing all functions, classes, variables, imports, exports, and code structures. Your analysis must be based on the complete file content, not partial snapshots. Always read at least 1000 lines minimum per read operation, and if the file is larger, continue reading until you've processed the entire file. Do not use phrases like "showing first X lines" or "truncated for brevity" or "rest of file omitted" - these indicate lazy, incomplete analysis. Instead, demonstrate that you've read the complete file by referencing specific sections throughout the entire codebase, understanding the full context of how functions interact, how variables are used across the entire file, and how the complete code structure works together. Your suggestions and recommendations must reflect knowledge of the entire file, not just the beginning portions. Take the time to read everything properly because thoroughness and accuracy based on complete file knowledge is infinitely more valuable than quick, incomplete reviews that miss critical context and lead to incorrect suggestions.
2325

2426
# Coding Standards and Preferences
2527

@@ -79,16 +81,16 @@ You must read files completely and thoroughly, with a minimum of 2000 lines per
7981
- When adding new information to the changelogs, changes will first be added to an "Unreleased" section at the top of the changelog file, and then later moved to a new version section when a new version is released. Be sure to follow this pattern and do not skip any of the changelog files.
8082
- Do not automatically update the version number in the plugin header or other files. Instead, provide a clear and concise change summary that includes the version number and a brief description of the changes made.
8183
- When making changes to the codebase, always update the relevant documentation files, including README.md, readme.txt, and CHANGELOG.md, even when a new version is not released.
82-
- Maintain changelogs at readme.txt (for WordPress.org) and CHANGELOG.md (for developers).
84+
- Note: changelog.txt has been removed from this project. Only maintain readme.txt (for WordPress.org) and CHANGELOG.md (for developers).
8385
- Please do not skip these locations, as the changelog files must be in sync with each other, and the version numbers must be consistent across all files.
84-
- I will instruct you when to update the version number, and you should not do this automatically.
86+
- I will instruct you when to update the version number, and you should not do this automatically. Always ask for confirmation before updating the version number.
8587
- When the version number is updated, ensure that the new version number is reflected in all relevant files, as outlined in Version Locations above.
8688
- When the version number is updated, make special note to update the "Unreleased" section in the changelog files to reflect the new version number and a brief description of the changes made. This ensures that all changes are documented and easily accessible for future reference.
8789

8890
# General Coding Standards
8991

90-
- WordPress coding standards should be prioritized over general coding standards.
91-
- The standards below are general coding standards that apply to all code, including WordPress code. Do not apply them if they conflict with WordPress standards and best practices.
92+
- The above standards are prioritized over general coding standards.
93+
- The standards below are general coding standards that apply to all code, including WordPress code. Do not apply them if they conflict with WordPress standards.
9294

9395
## Accessibility & UX
9496

@@ -121,9 +123,16 @@ You must read files completely and thoroughly, with a minimum of 2000 lines per
121123
- Use prepared statements for database queries
122124
- Use secure authentication and authorization mechanisms
123125
- When using third-party libraries or APIs, ensure they are well-maintained and secure
126+
- Regularly update dependencies to their latest stable versions
127+
- Use HTTPS for all API requests and data transmission
128+
- When handling sensitive data, ensure it is encrypted both in transit and at rest
129+
- If you suspect a security vulnerability, immediately notify the project maintainers and provide details for investigation
130+
- If you encounter a security vulnerability in the codebase, do not disclose it publicly. Instead, report it privately to the project maintainers or through a responsible disclosure process.
131+
- If you are unsure about the security implications of a specific code change, ask for clarification or guidance before proceeding.
124132
- Always follow the principle of least privilege when implementing security features, ensuring that users and processes have only the permissions they need to perform their tasks.
125-
- If there is a possible security vulnerability in the codebase, you should always ask for confirmation before proceeding.
126-
- If I ask you to make changes that could potentially introduce security vulnerabilities, you should always ask for confirmation before proceeding.
133+
- If you encounter a security vulnerability in a third-party library or dependency, check if there is an updated version that addresses the issue. If not, consider alternatives and notify me of the situation.
134+
- If there is a possible security vulnerability in the codebase, you should always ask for confirmation before proceeding with any changes. This ensures that the project maintainers are aware of the potential risk and can provide guidance on how to address it safely.
135+
- If I ask you to make changes that could potentially introduce security vulnerabilities, you should always ask for confirmation before proceeding. This ensures that the project maintainers are aware of the potential risk and can provide guidance on how to address it safely.
127136

128137
## Code Quality & Architecture
129138

@@ -141,14 +150,4 @@ You must read files completely and thoroughly, with a minimum of 2000 lines per
141150
- Only ask for manual intervention if domain-specific knowledge is required
142151
- Auto-lint and format code using standard tools (e.g., Prettier, ESLint, dotnet format)
143152
- Changes should be made directly to the file in question. Example: admin.php should be modified directly, not by creating a new file like admin-changes.php.
144-
- New files may be created when appropriate, but they should be relevant to the task at hand, so long as they are not a rewrite of an existing file. We want to avoid unnecessary duplication of files.
145-
146-
# Final Step for Each Task
147-
148-
- After completing a task:
149-
- Review your changes to ensure they have met the WordPress coding standards and best practices.
150-
- Ensure all changes are documented in the changelog files.
151-
- Ensure all user inputs are properly sanitized and validated.
152-
- Ensure all outputs are properly escaped.
153-
- Perform a final check to ensure we have not introduced any security vulnerabilities such as XSS, CSRF, or SQL injection.
154-
- In the chat interface, deliver a summary of the security checks performed, including any potential vulnerabilities identified and how they were addressed. Do not allow yourself to skip this step as it is crucial for maintaining the security and integrity of the codebase.
153+
- New files may be created when appropriate, but they should be relevant to the task at hand, so long as they are not a rewrite of an existing file. We want to avoid unnecessary duplication of files.

0 commit comments

Comments
 (0)