What problem does it solve?
Inconsistent and ambiguous identifiers, poor commenting, and ad-hoc naming conventions cause confusion, bugs, and technical debt across codebases; these rules provide a shared standard to reduce cognitive load and make code easier to read and maintain.
Core Features & Use Cases
- Variable and Identifier Rules: Lists forbidden short names and abbreviations and offers clear, descriptive alternatives for variables, parameters, and return values.
- Loop and Index Naming: Prescribes meaningful loop index names that reflect the iterated data to avoid confusion in nested loops.
- Comment and Function Guidance: Specifies which comments to remove versus keep, recommends action-oriented function names, and encourages single-responsibility functions to aid refactoring and reviews.
- Use Case: Apply these rules during code review or automated refactoring to rename unclear variables, remove stale comments, and standardize function names across modules.
Quick Start
Ask the agent to refactor the provided code to follow code-style-rules by renaming ambiguous variables, removing stale comments, and suggesting clearer function names.