You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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.
- 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
+
60
78
# General Coding Standards
61
79
62
80
- The above standards are prioritized over general coding standards.
63
81
- 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.
64
82
65
-
**Accessibility & UX**
83
+
## Accessibility & UX
84
+
66
85
- Follow accessibility best practices for UI components
67
86
- Ensure forms are keyboard-navigable and screen reader friendly
68
87
- Validate user-facing labels, tooltips, and messages for clarity
69
88
70
-
**Performance & Optimization**
89
+
## Performance & Optimization
90
+
71
91
- Optimize for performance and scalability where applicable
72
92
- Avoid premature optimization—focus on correctness first
73
93
- Detect and flag performance issues (e.g., unnecessary re-renders, N+1 queries)
74
94
- Use lazy loading, memoization, or caching where needed
75
95
76
-
**Type Safety & Standards**
96
+
## Type Safety & Standards
97
+
77
98
- Use strict typing wherever possible (TypeScript, C#, etc.)
78
99
- Avoid using `any` or untyped variables
79
100
- Use inferred and narrow types when possible
80
101
- Define shared types centrally (e.g., `types/` or `shared/` folders)
81
102
82
-
**Security & Error Handling**
103
+
## Security & Error Handling
104
+
83
105
- Sanitize all input and output, especially in forms, APIs, and database interactions
84
106
- Escape, validate, and normalize all user-supplied data
85
107
- Automatically handle edge cases and error conditions
86
108
- Fail securely and log actionable errors
87
109
- 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
88
126
89
-
**Code Quality & Architecture**
90
127
- Organize code using **feature-sliced architecture** when applicable
91
128
- Group code by **feature**, not by type (e.g., keep controller, actions, and helpers together by feature)
92
129
- Write clean, readable, and self-explanatory code
93
130
- Use meaningful and descriptive names for files, functions, and variables
94
131
- Remove unused imports, variables, and dead code automatically
95
132
96
-
**Task Execution & Automation**
133
+
## Task Execution & Automation
134
+
97
135
- Always proceed to the next task automatically unless confirmation is required
98
136
- Only ask for confirmation when an action is destructive (e.g., data loss, deletion)
99
137
- Always attempt to identify and fix bugs automatically
0 commit comments