feat(hipdnn): add hipdnn-code-quality AI skill#9299
Conversation
Diff-scoped code-quality companion to hipdnn-review focused purely on maintainability: duplication, shared-helper reuse, design patterns, performance hygiene, readability, comment complexity, file size, and naming. Reuses hipdnn-review's scope buckets and severity ladder. Ships quality_scan.py, an in-harness-only metric pass (no clang-tidy/ lizard/cloc): large files, long functions (namespace- and Allman-brace- aware), duplicated regions (changed files matched against the whole tree, boilerplate excluded), and a naming-mix hint. Detectors validated against the real hipDNN tree. Registers the skill in the project AI-rules list.
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (76.84%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #9299 +/- ##
===========================================
- Coverage 65.36% 65.36% -0.00%
===========================================
Files 2685 2685
Lines 422269 422269
Branches 62742 62742
===========================================
- Hits 276012 276009 -3
- Misses 125466 125469 +3
Partials 20791 20791
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
Adds
hipdnn-code-quality, a diff-scoped code-quality AI skill for hipDNN underprojects/hipdnn/tools/ai/skills/. It is the maintainability-axis companion to the existinghipdnn-reviewskill: same change-set scope and target resolution, but focused purely on duplication, shared-helper reuse, design patterns, performance hygiene, readability, comment complexity, file size, and naming — the concernshipdnn-reviewdeliberately deprioritizes. The skill is registered in the project AI-rules list. JIRA ID : ALMIOPEN-2304Risk Assessment
Minimal risk. Documentation/tooling-only: adds a skill package (SKILL.md, agents metadata, a helper script) and one AI-rules list entry. No product code, build configuration, public API, schema, or existing skill is modified; the skill is inert until invoked.
Testing Summary
validate-skills.py), which checks requiredagents/openai.yamlfields, forbidden host-specific text, and command frontmatter.origin/developon this skill-only branch (0 source signals, as expected) and against a real 20-file C++ diff worktree (reports large files, long functions, duplicated regions).Testing Checklist
python3 tools/ai/validate-skills.py- Status: Passed (10 skills)python3 -m py_compile tools/ai/skills/hipdnn-code-quality/scripts/quality_scan.py- Status: Passedquality_scan.py --repo . --base origin/develop- Status: Passedquality_scan.py --repo <worktree> --base origin/develop- Status: PassedTechnical Changes
tools/ai/skills/hipdnn-code-quality/SKILL.md: quality-only checklist (duplication, shared-helper reuse, design/structure, performance hygiene, readability/naming, file size), Project-Specific Conventions derived fromprojects/hipdnn/CLAUDE.md(Allman braces,#pragma once,-Wconversion, RAII, TYPED_TEST), and a Tooling Notes section encoding validated caveats (e.g. ast-grep silently skips unparseable hipDNN files).scripts/quality_scan.py: in-harness-only metric pass (no clang-tidy/lizard/cloc) reporting large files, namespace- and Allman-brace-aware long functions, duplicated regions (changed files matched against the whole tree, boilerplate excluded), and a naming-mix hint; supports--base,--files,--json, and tunable thresholds.agents/openai.yamlinterface metadata, matching the other skills.hipdnn-review's scope buckets and severity ladder rather than introducing a second taxonomy; routes any correctness/leak/compat defect it encounters back tohipdnn-review.projects/hipdnn/docs/ai-rules.md, surfaced asCLAUDE.md).