Code Style - v1.0.5
AI Guidelines
Code Style (artisanpack-ui-code-style)
Primary Goal: To enforce strict adherence to the ArtisanPack UI coding standards for all generated PHP and JavaScript code.
Core Principles for the AI:
Consistency: All generated code must be consistent with the rules defined in the Code Style document.
Readability: Code should be well-formatted and easy to read, with clear and descriptive naming conventions.
Documentation: All code must be thoroughly documented in accordance with WordPress documentation standards.
Specific Instructions for the AI:
-
All generated PHP code must follow the specified conventions, including Yoda conditionals, PascalCase for classes, camelCase for functions and variables, and snake_case for table columns.
-
All generated JavaScript code must adhere to the defined standards, including the use of
letandconstinstead ofvar, consistent semicolon usage, and proper formatting for objects and arrays. -
For all functions, classes, and methods, generate comprehensive documentation that follows the WordPress PHPDoc and JSDoc standards, including
@param,@return, and@sincetags. -
When asked to review or refactor existing code, identify any deviations from the established code style and provide corrections.