Skip to content

feat: add rules module to count project config files - #3

Merged
knqiufan merged 1 commit into
mainfrom
feat/rules-module
May 16, 2026
Merged

feat: add rules module to count project config files#3
knqiufan merged 1 commit into
mainfrom
feat/rules-module

Conversation

@knqiufan

Copy link
Copy Markdown
Owner

Summary

  • Add a new "规则" (Rules) status bar module that counts CLAUDE.md files, .claude/ directory contents, and skills/ directory contents
  • Display shows total count with a muted breakdown: [规则] 15 规则:12 Skill:3
  • CLI commands: pulse-line rules (summary), pulse-line rules list (file listing), pulse-line rules pattern add/remove (pattern management)
  • Config schema migration v6 → v7, all 5 themes updated, full i18n support

Changes

Type File Description
New src/extractors/rules.ts Core extractor: scan CLAUDE.md + .claude/ + skills/
New test/rules.test.ts 12 test cases
New commands/rules.md CLI command documentation
Edit src/types/pulse-config.ts RulesModuleConfig type + schema v7
Edit src/index.ts Wire module into render pipeline
Edit src/cli.ts rules/list/pattern commands
Edit 5 theme files + 2 icon sets + themes/index.ts Full theme support
Edit i18n, migration, display-sanitize Supporting infrastructure

Test plan

  • 127 tests pass (12 new + 6 updated migrate-config tests)
  • TypeScript compiles with zero errors
  • pulse-line rules shows summary
  • pulse-line rules list shows categorized file list
  • pulse-line rules pattern add/remove manages include/exclude patterns
  • Empty project returns 0
  • Nested CLAUDE.md files detected
  • Default directories (node_modules, .git, etc.) excluded

Closes #2

🤖 Generated with Claude Code

Add a new "规则" (Rules) status bar module that counts CLAUDE.md files,
.claude/ directory contents, and skills/ directory contents in the project.
The display shows total count with a muted breakdown of rules vs skills.

Includes CLI commands (rules, rules list, rules pattern) for interactive
file listing and pattern management. Config migration from schema v6 to v7.

Closes #2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@knqiufan
knqiufan merged commit cc02805 into main May 16, 2026
1 of 10 checks passed
@knqiufan
knqiufan deleted the feat/rules-module branch May 16, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

显示项目文件数量 优化建议

1 participant