Skip to content

Commit a0204df

Browse files
authored
Update
1 parent f178eff commit a0204df

File tree

4 files changed

+88
-176
lines changed

4 files changed

+88
-176
lines changed

.github/copilot-instructions.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,81 @@ You must read files completely and thoroughly, with a minimum of 1000 lines per
5757
- Use WordPress PHP Documentation Standards:
5858
- [PHP Documentation Standards](https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/)
5959

60+
## Version Control and Documentation
61+
62+
- Release versions, software tested versions, and minimum software supported versions for this project are listed in numerous places, when updating the release version for this project, ensure that all of these locations are updated accordingly.
63+
- Version Locations:
64+
- README.md
65+
- changelog.txt
66+
- changelog.md
67+
- plugin header (in the main plugin file)
68+
- plugin section: "// Define plugin constants"
69+
- plugin *.pot files (e.g., languages/plugin-name.pot)
70+
- package.json (if applicable)
71+
- composer.json (if applicable)
72+
- documentation files (e.g., docs/README.md)
73+
- Use semantic versioning (MAJOR.MINOR.PATCH) for all releases.
74+
- 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.
75+
- When making changes to the codebase, always update the relevant documentation files, including README.md, readme.txt, changelog.txt, and changelog.md even when a new version is not released.
76+
- 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.
77+
6078
# General Coding Standards
6179

6280
- The above standards are prioritized over general coding standards.
6381
- 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.
6482

65-
**Accessibility & UX**
83+
## Accessibility & UX
84+
6685
- Follow accessibility best practices for UI components
6786
- Ensure forms are keyboard-navigable and screen reader friendly
6887
- Validate user-facing labels, tooltips, and messages for clarity
6988

70-
**Performance & Optimization**
89+
## Performance & Optimization
90+
7191
- Optimize for performance and scalability where applicable
7292
- Avoid premature optimization—focus on correctness first
7393
- Detect and flag performance issues (e.g., unnecessary re-renders, N+1 queries)
7494
- Use lazy loading, memoization, or caching where needed
7595

76-
**Type Safety & Standards**
96+
## Type Safety & Standards
97+
7798
- Use strict typing wherever possible (TypeScript, C#, etc.)
7899
- Avoid using `any` or untyped variables
79100
- Use inferred and narrow types when possible
80101
- Define shared types centrally (e.g., `types/` or `shared/` folders)
81102

82-
**Security & Error Handling**
103+
## Security & Error Handling
104+
83105
- Sanitize all input and output, especially in forms, APIs, and database interactions
84106
- Escape, validate, and normalize all user-supplied data
85107
- Automatically handle edge cases and error conditions
86108
- Fail securely and log actionable errors
87109
- Avoid leaking sensitive information in error messages or logs
110+
- Use secure coding practices to prevent common vulnerabilities (e.g., XSS, CSRF, SQL injection)
111+
- Use prepared statements for database queries
112+
- Use secure authentication and authorization mechanisms
113+
- When using third-party libraries or APIs, ensure they are well-maintained and secure
114+
- Regularly update dependencies to their latest stable versions
115+
- Use HTTPS for all API requests and data transmission
116+
- When handling sensitive data, ensure it is encrypted both in transit and at rest
117+
- If you suspect a security vulnerability, immediately notify the project maintainers and provide details for investigation
118+
- 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.
119+
- If you are unsure about the security implications of a specific code change, ask for clarification or guidance before proceeding.
120+
- 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.
121+
- 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 or report the vulnerability to the library maintainers.
122+
- 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.
123+
- 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.
124+
125+
## Code Quality & Architecture
88126

89-
**Code Quality & Architecture**
90127
- Organize code using **feature-sliced architecture** when applicable
91128
- Group code by **feature**, not by type (e.g., keep controller, actions, and helpers together by feature)
92129
- Write clean, readable, and self-explanatory code
93130
- Use meaningful and descriptive names for files, functions, and variables
94131
- Remove unused imports, variables, and dead code automatically
95132

96-
**Task Execution & Automation**
133+
## Task Execution & Automation
134+
97135
- Always proceed to the next task automatically unless confirmation is required
98136
- Only ask for confirmation when an action is destructive (e.g., data loss, deletion)
99137
- Always attempt to identify and fix bugs automatically

0 commit comments

Comments
 (0)