Skip to content

docs: fix rule installation examples#932

Merged
affaan-m merged 2 commits intoaffaan-m:mainfrom
KT-lcz:readme
Mar 28, 2026
Merged

docs: fix rule installation examples#932
affaan-m merged 2 commits intoaffaan-m:mainfrom
KT-lcz:readme

Conversation

@KT-lcz
Copy link
Copy Markdown
Contributor

@KT-lcz KT-lcz commented Mar 26, 2026

Clarify that manual rule installation should preserve the rules directory structure so references keep working and filename collisions are avoided.

Summary by CodeRabbit

  • Documentation
    • Clarified installation steps in English and Chinese READMEs: create the destination rules directory first, then copy entire rule directories (e.g., rules/common, rules/) rather than individual files. This preserves relative references and prevents filename collisions across rule sets.

Clarify that manual rule installation should preserve the rules directory structure so references keep working and filename collisions are avoided.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6d7f7543-af17-4d8e-b6a8-a5afa380aa6d

📥 Commits

Reviewing files that changed from the base of the PR and between 9348751 and 6766054.

📒 Files selected for processing (2)
  • README.md
  • README.zh-CN.md
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.zh-CN.md

📝 Walkthrough

Walkthrough

Documentation updates to README files (English and Chinese) revising manual rule-installation instructions: replace wildcard/content copying (rules/<lang>/*) with whole-directory copying (rules/<lang>), and explicitly create the destination rules directory (mkdir -p .../rules/) before copying.

Changes

Cohort / File(s) Summary
Documentation - Rules Installation Instructions
README.md, README.zh-CN.md
Rewrote manual and plugin installation command examples to create the destination rules directory first (mkdir -p ~/.claude/rules), then copy whole rule directories (e.g., rules/common, rules/golang) rather than copying directory contents with wildcards; added a note clarifying whole-directory copy behavior to preserve relative references and avoid filename collisions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 I hopped through README lines at night,

No more wildcards—folders wrapped up tight.
Common and lang, copied whole and neat,
mkdir first, then the rules meet.
🥕📂✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: fix rule installation examples' directly and concisely describes the main change—correcting documentation for rule installation procedures to preserve directory structure and avoid filename collisions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR fixes the manual rule-installation shell commands in both README.md and README.zh-CN.md by replacing the glob-based cp -r rules/foo/* dest/ pattern with cp -r rules/foo dest/, which copies the entire language subdirectory rather than spilling its contents into the destination. It also adds a missing mkdir -p ~/.claude/rules guard in the standalone manual-install block and the FAQ section of README.md, and inserts a brief prose explanation (in both languages) of why whole-directory copying is required.

Key changes:

  • All cp -r …/rules/<lang>/* dest/ commands updated to cp -r …/rules/<lang> dest/ across four distinct code blocks in each README.
  • mkdir -p ~/.claude/rules added before cp commands in two places in README.md where it was previously absent.
  • README.zh-CN.md Option A simplified from a single rules/* wildcard to explicit per-language commands, consistent with the English README.
  • Inline explanatory text added noting that whole-directory copying preserves relative references and prevents filename collisions.

Confidence Score: 5/5

Documentation-only fix with correct shell semantics — safe to merge.

All changes are documentation corrections. The new cp -r src dest/ form is semantically correct and the added mkdir -p guards are appropriate. No logic, runtime, or data-integrity concerns.

No files require special attention.

Important Files Changed

Filename Overview
README.md Replaces cp -r rules/foo/* dest/ with cp -r rules/foo dest/ across four sections; adds missing mkdir -p in the long manual-install block and FAQ; adds an inline prose explanation of why whole-directory copying is required.
README.zh-CN.md Same pattern fixes as the English README; also replaces the broad rules/* wildcard in Option A with explicit per-language cp -r commands, aligning it with the English version; adds Chinese-language explanation of the directory-copy rationale.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User runs manual install"] --> B{"mkdir -p target rules dir"}
    B --> C["cp -r rules/common target/"]
    C --> D["cp -r rules/typescript target/\n(or other language)"]
    D --> E{"Result:\ntarget/common/\ntarget/typescript/"}
    E --> F["Relative refs inside each dir\nstill resolve correctly ✓"]

    G["OLD: cp -r rules/common/* target/"] --> H{"Result:\ntarget/agents.md\ntarget/security.md …"}
    H --> I["Files mixed into flat dir\nRelative refs broken ✗\nFilename collisions possible ✗"]
Loading

Reviews (2): Last reviewed commit: "docs: use directory-level rule copy exam..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 642-648: Update the FAQ “Just rules” example so it uses
directory-level copies instead of the wildcard path `rules/common/*`: locate the
snippet named “Just rules” that currently references `rules/common/*` and change
it to mirror the other examples by copying the whole directory (e.g., use the
directory `rules/common` rather than `rules/common/*`), and likewise ensure any
language-specific examples follow the directory-level pattern (e.g.,
`rules/typescript`, `rules/python`, etc.) so relative references remain correct.

In `@README.zh-CN.md`:
- Around line 378-384: Update the Option 1 snippet in README.zh-CN.md so it
copies whole rule directories instead of using the wildcard form; replace the
`cp -r everything-claude-code/rules/* ...` approach with explicit `cp -r
everything-claude-code/rules/common ...` and language-specific directory copies
(e.g., `typescript`, `python`, `golang`, `perl`) to match the later “copy full
directories” examples; ensure the Option 1 block mirrors the exact directory
names used in the shown snippet so the Chinese README remains consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fef0cf5a-d497-4128-a247-29e9f498131d

📥 Commits

Reviewing files that changed from the base of the PR and between 678fb6f and 9348751.

📒 Files selected for processing (2)
  • README.md
  • README.zh-CN.md

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@affaan-m
Copy link
Copy Markdown
Owner

thanks for the PR. quick triage: maintainer review pending. if there are docs, screenshots, or repro steps, please drop them here.

@affaan-m affaan-m merged commit d9ec51c into affaan-m:main Mar 28, 2026
40 checks passed
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.

2 participants