fix(install): prefix language-specific rules to prevent overwriting common rules (rebased #651)#687
fix(install): prefix language-specific rules to prevent overwriting common rules (rebased #651)#687
Conversation
…ommon rules The configure-ecc skill's Step 3 flat-copies language-specific rule files (e.g., rules/python/*) into the same $TARGET/rules/ directory as common rules. Since both directories contain identically-named files (coding-style.md, security.md, testing.md, hooks.md, patterns.md), the last language installed silently overwrites common rules. Fix by prefixing language-specific files during copy (e.g., python-coding-style.md, golang-testing.md). This matches the approach already used by the Antigravity install target adapter. Also updates the Japanese and Chinese translations of the skill, and adds a troubleshooting note about the prefixed naming convention. Closes #432 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ands Address review feedback: - Add `-r` flag to `cp` to handle potential subdirectories - Quote `$ECC_ROOT` in glob to prevent word-splitting on paths with spaces - Add `[ -e "$f" ]` guard to skip when glob doesn't match anything Applied consistently across EN, JA, and ZH skill docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Greptile SummaryThis PR fixes a file-collision bug in the
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User runs configure-ecc] --> B[Clone ECC repo to /tmp]
B --> C[Choose install level\nuser / project / both]
C --> D[Select & install skills]
D --> E[Select rule sets]
E --> F{Which rules?}
F -->|Common selected| G["cp -r rules/common/* → TARGET/rules/\n(flat copy, no prefix)"]
F -->|TypeScript selected| H["for f in rules/typescript/*\ncp → TARGET/rules/typescript-basename-f\n(prefixed)"]
F -->|Python selected| I["for f in rules/python/*\ncp → TARGET/rules/python-basename-f\n(prefixed)"]
F -->|Go selected| J["for f in rules/golang/*\ncp → TARGET/rules/golang-basename-f\n(prefixed)"]
G --> K[Post-install verification]
H --> K
I --> K
J --> K
K --> L{Issues found?}
L -->|Yes| M[Report file + line + fix]
L -->|No| N[Optional optimization]
M --> N
N --> O[Print summary & cleanup /tmp]
style G fill:#90EE90
style H fill:#87CEEB
style I fill:#87CEEB
style J fill:#87CEEB
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7de2f7374a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Language-specific rules (prefixed to avoid overwriting common rules) | ||
| # Files like coding-style.md become typescript-coding-style.md, etc. | ||
| for f in "$ECC_ROOT"/rules/typescript/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/typescript-$(basename "$f")"; done # if selected | ||
| for f in "$ECC_ROOT"/rules/python/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/python-$(basename "$f")"; done # if selected | ||
| for f in "$ECC_ROOT"/rules/golang/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/golang-$(basename "$f")"; done # if selected |
There was a problem hiding this comment.
Keep Claude rule installs in
common/ and language subdirs
The new copy loop still flattens language-specific rules into $TARGET/rules/ and only renames the files. For the Claude Code user/project installs this skill targets, scripts/lib/install-executor.js:16-42 copies rules/common/ and rules/<language>/ as subdirectories, and rules/README.md:45-49 explicitly warns that flattening breaks the ../common/... links embedded in every language rule (for example rules/python/testing.md:8). If an agent follows these updated instructions, it will produce a rule layout the supported installer never creates and leave the cross-references in the installed docs broken.
Useful? React with 👍 / 👎.
|
Duplicate of #690 |
Summary
configure-eccskill and its translations (ja-JP, zh-CN) with corrected copy commandsOriginal PR
Closes #651
Test plan
Summary by cubic
Fix install to prefix language-specific rule files (typescript-, python-, golang-) so they no longer overwrite common rules. Updates the
configure-eccskill docs (EN/JA/ZH) and syncs catalog counts.$TARGET/rules/<lang>-<file>; add-rtocp, quote$ECC_ROOT, and guard empty globs.Written for commit 7de2f73. Summary will update on new commits.