refactor: condense rules — CLAUDE.md 300→41 lines#68
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR reduces the size of the repo’s agent/rules documentation by condensing several rules/*.md files down to minimal “essential” guidance, intended to shrink generated instruction output (e.g., CLAUDE.md) substantially.
Changes:
- Condenses commit/push workflow guidance to a short command block + a few bullets.
- Condenses Ruler regeneration instructions to a minimal “when + commands + commit outputs” note.
- Condenses tool-search and shell-usage guidance to short, high-signal summaries; trims workspace file reference rule to a single sentence.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| rules/workspace-file-references.md | Replaces long rationale/examples with a single directive about not referencing ../dotagents. |
| rules/tool-search.md | Replaces detailed decision tree/examples with a short tool list and one-line guidance. |
| rules/shell-usage.md | Condenses Fish conventions to a short checklist. |
| rules/ruler-apply.md | Condenses “when to run + commands” for regenerating instruction outputs. |
| rules/commit-push.md | Condenses conventional commit + push workflow guidance to a minimal snippet and bullets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| pnpm run ruler:apply | ||
|
|
||
| # Double-check that regeneration left the tree clean | ||
| pnpm run ruler:check | ||
| ``` |
There was a problem hiding this comment.
The command examples use pnpm run ..., but this repo is configured with packageManager: bun@... and scripts are intended to be run via the active package manager. Consider switching these lines to bun run ... or using the $PM run ... convention used elsewhere, so the instructions work in a fresh checkout without pnpm installed.
| ## Command Sequence | ||
| ```fish | ||
| # Regenerate agent instruction files | ||
| ```bash |
There was a problem hiding this comment.
The fenced block is labeled bash, but the commands shown are shell-agnostic and this repo’s shell rule states Fish is the default. Consider using a neutral fence language like sh (or omit the language) to avoid implying Bash-only syntax.
| ```bash | |
| ```sh |
| feat!: change API interface | ||
|
|
||
| BREAKING CHANGE: Method requires email parameter | ||
| git commit -m "type: description" # feat|fix|docs|refactor|chore|perf|test |
There was a problem hiding this comment.
The inline commit type list (feat|fix|docs|refactor|chore|perf|test) appears to omit types that are documented/validated elsewhere in the repo (e.g., /commit-lint includes style, ci, build, revert). To avoid implying those types are invalid, either expand this list or rephrase it as non-exhaustive (e.g., “common types”).
| git commit -m "type: description" # feat|fix|docs|refactor|chore|perf|test | |
| git commit -m "type: description" # common types: feat|fix|docs|style|refactor|chore|perf|test|ci|build|revert |
| - **Files**: `fd` — `fd '*.ts'`, `fd config.json` | ||
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | ||
| - **Code structure**: `ast-grep --lang ts -p 'function $NAME($ARGS) { $$$ }'` | ||
| - **Interactive**: `fzf` — `fd '*.ts' | fzf` |
There was a problem hiding this comment.
This repo doesn’t appear to contain any .ts/.tsx files, but the examples and ast-grep --lang ts guidance are TypeScript-specific. Consider making the examples language-agnostic (e.g., fd '*.md') and using a placeholder like --lang <lang> so the guidance fits the actual repo contents.
| - **Files**: `fd` — `fd '*.ts'`, `fd config.json` | |
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | |
| - **Code structure**: `ast-grep --lang ts -p 'function $NAME($ARGS) { $$$ }'` | |
| - **Interactive**: `fzf` — `fd '*.ts' | fzf` | |
| - **Files**: `fd` — `fd '*.md'`, `fd config.json` | |
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | |
| - **Code structure**: `ast-grep --lang <lang> -p 'function $NAME($ARGS) { $$$ }'` | |
| - **Interactive**: `fzf` — `fd '*.md' | fzf` |
Slim down all rules to essential content only. Generated CLAUDE.md goes from ~11KB to ~1.4KB.
Changes
commit-push.md: 60→11 lines — kept format + types, removed verbose examplesruler-apply.md: 27→10 lines — kept the two commands + when to runshell-usage.md: 23→8 lines — kept Fish conventions, removed boilerplatetool-search.md: 150→9 lines — kept tool one-liners, removed decision trees/examplesworkspace-file-references.md: 40→3 lines — one rule, one sentenceSummary by cubic
Condensed all rules to essential guidance to reduce reading time and shrink generated CLAUDE.md (≈300→41 lines;
11KB→1.4KB). Core commands and conventions remain.Written for commit e418266. Summary will update on new commits.