Support: add pre-commit testing logic, restructure to .claude/skills and rules#146
Conversation
ChaoWao
commented
Mar 1, 2026
- Migrate .ai-instructions/ into .claude/ following pypto skill/rules pattern
- coding conventions → .claude/rules/ (architecture, codestyle, ascend-device)
- git-commit workflow → .claude/skills/git-commit/SKILL.md (with frontmatter)
- testing guide + pre-commit strategy → .claude/skills/testing/SKILL.md (merged)
- Add pre-commit testing strategy (4-step decision flow): npu-smi detection, git-diff scope analysis, nproc parallel, idle device cap (max 2)
- Rename test-sim/test-device commands to test-example-* for clarity
- Add test-runtime-sim and test-runtime-device commands for runtime-scoped testing
- Update test-all-device to auto-detect idle NPU devices instead of hardcoded -d 4-7
- Update test-all-sim with nproc-based parallel decision
- Require detailed commit body for multi-file changes in git-commit skill
- Update CLAUDE.md to reference new .claude/rules/ and .claude/skills/ paths
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the project's internal documentation and testing infrastructure. The primary goal is to centralize and standardize guidelines and workflows under a new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively restructures the AI instructions into a more organized .claude/ directory, separating them into rules and skills. It also introduces a more sophisticated pre-commit testing strategy that intelligently considers available hardware, test scope, and parallelism. The changes are well-organized and significantly improve the testing workflow. My review includes a few suggestions to clarify ambiguities in the new testing logic, particularly around handling non-consecutive NPU devices, and to fix an incomplete command example in the testing guide.
8bb2fad to
a3053f4
Compare
- Migrate .ai-instructions/ into .claude/ following skills/rules pattern - coding conventions → .claude/rules/ (architecture, codestyle, ascend-device) - git-commit and testing workflows → .claude/skills/ (with frontmatter) - Add pre-commit testing strategy (4-step decision flow): npu-smi detection, git-diff scope analysis, nproc parallel, idle device cap - Add fix-issue skill: fetch issue → create branch → plan → implement → test - Add address-pr-comments skill: triage PR comments → classify → address - Rename test-sim/test-device commands to test-example-* for clarity - Add test-runtime-sim and test-runtime-device commands - Update test-all-device/test-all-sim with auto-detection logic
a3053f4 to
37be52e
Compare
…hw-native-sys#146) - Migrate .ai-instructions/ into .claude/ following skills/rules pattern - coding conventions → .claude/rules/ (architecture, codestyle, ascend-device) - git-commit and testing workflows → .claude/skills/ (with frontmatter) - Add pre-commit testing strategy (4-step decision flow): npu-smi detection, git-diff scope analysis, nproc parallel, idle device cap - Add fix-issue skill: fetch issue → create branch → plan → implement → test - Add address-pr-comments skill: triage PR comments → classify → address - Rename test-sim/test-device commands to test-example-* for clarity - Add test-runtime-sim and test-runtime-device commands - Update test-all-device/test-all-sim with auto-detection logic