Your CLAUDE.md Might Not Be Loading — I Built a Check-Up for That
说明与用途
rules‑doctor 静态分析 Claude Code 规则文件,检测导入、遮蔽和文件膨胀问题,并提供修复建议和合规评分。
问题
Rule files for Claude Code may silently fail to load due to import placement, shadowing of AGENTS.md, or file size limits, causing expected behavior to be ignored.
结果
rules-doctor identifies and reports import expansion failures, AGENTS.md shadowing, and rule file bloat, enabling developers to correct rule files and achieve a higher compliance score.
工作流
- Install rules-doctor via pip
- Run rules-doctor on the project directory
- Review the report for errors, warnings, and suggestions
- Apply suggested fixes to rule files
- Re-run rules-doctor to confirm resolution
- Integrate --fail-on error flag into CI to enforce rule hygiene
证据
Three ways rule files silently fail
I built rules-doctor: a tiny zero-dependency Python CLI that statically simulates Claude Code's rule-loading pipeline and gives your project a check-up.
Every finding comes with a concrete fix suggestion, and you get a 0–100 score with a letter grade.
This is a static heuristic simulation, not the Claude Code loader.
- 记录日期: 2026-10-02T10:55:57.956Z