| name | coding-standards |
| description | Apply Apache ShardingSphere's written coding standards during implementation, fixes, refactoring, and code review, or perform a standalone read-only compliance audit of a user-specified scope. Uses CODE_OF_CONDUCT.md, applicable AGENTS.md rules, Checkstyle, Spotless, and other repository-defined standards. Does not judge architecture, runtime ownership, caches, lifecycle, or other semantic design rules. |
Coding Standards
Use this Skill in exactly one of the following modes. Both modes derive compliance only from written standards that actually apply to the target files.
Implementation Guidance Mode
Use this mode when implementing, fixing, refactoring, or reviewing code unless the user explicitly requests a standalone coding-standards compliance audit.
- Read the portions of
CODE_OF_CONDUCT.md, repository-level and path-level AGENTS.md, Checkstyle, Spotless, and other written repository standards that actually apply to every affected file before starting a read-only code review or making the first write in an implementation task.
- Before the first write, read the portions of
CODE_OF_CONDUCT.md, repository-level and path-level AGENTS.md, Checkstyle, Spotless, and other written repository standards that actually apply to every affected file, then record a compact applicable-rule checklist; group files governed by the same rules instead of repeating the checklist.
- Determine whether each rule governs all existing code or only code that is new, modified, touched, submitted, or generated by Codex.
- Apply every applicable rule to each modified file within the task's authorized scope.
- After the last write, manually recheck the effective task delta and only the surrounding declarations needed to evaluate every applicable checklist rule.
- For Java, explicitly verify every applicable
CODE_OF_CONDUCT.md coding rule, including declaration order; when a method uses private helpers, verify that those helpers immediately follow the caller and appear in the caller's call order, regardless of the caller's visibility.
- Treat passing Checkstyle and Spotless as evidence only for the rules those tools enforce; neither result replaces the manual recheck.
- A later write invalidates final-check evidence only for affected files and rules; recheck those portions before verification or handoff.
- Do not create rules from personal preference, general clean-code principles, or nearby code.
- Do not scan for or report pre-existing violations outside the current task scope.
- Run the applicable formatting and standards checks required by the repository workflow.
- Do not run
apply, format, or another file-modifying command unless the current task authority and repository rules authorize every possible write.
- Do not build a complete file inventory or perform physical-line accounting in this mode.
This mode constrains the current code task and must not expand it into a repository-wide audit.
Standalone Compliance Audit Mode
Use this mode only when the user explicitly asks to audit, check, or report coding-standards compliance.
- Require an exact file, package, Maven module, directory, or whole-repository scope before starting.
- Audit the current working tree rather than a pull request or diff.
- Remain read-only throughout the audit. Do not edit code, generate patches, run formatting, or change Git or external state.
- Read the standalone compliance audit rules through EOF.
- Before auditing, run
scripts/build_audit_inventory.py with the repository root and every user-specified repository-relative scope.
- Check every constrained file and every physical line in scope without sampling.
- Record applicable rules, checked files, checked physical lines, excluded files, and blocked checks.
- Use exactly one of these conclusions:
Strictly compliant, Non-compliant, Partial audit, or Not applicable.
- Report only confirmed violations of applicable written standards.
- Do not assign severity labels or report architecture, caching, lifecycle, ownership, or other semantic issues.
This Skill does not judge semantic design rules in either mode.