Skip to content

fix(install): prefix language-specific rules in manual install docs (rebased #651)#690

Closed
affaan-m wants to merge 3 commits intomainfrom
community/pr-651-install-prefix
Closed

fix(install): prefix language-specific rules in manual install docs (rebased #651)#690
affaan-m wants to merge 3 commits intomainfrom
community/pr-651-install-prefix

Conversation

@affaan-m
Copy link
Copy Markdown
Owner

@affaan-m affaan-m commented Mar 20, 2026

Summary

  • Rebased community PR fix(install): prefix language-specific rules to prevent overwriting common rules #651 by @tonymfer onto latest main
  • Updates configure-ecc skill docs (EN, JA, ZH) to prefix language-specific rules during manual install, preventing overwrites of common rules (e.g., coding-style.md becomes typescript-coding-style.md)
  • The automated Node.js installer (install-apply.js) already handles this correctly: Claude target uses subdirectories (rules/typescript/), Antigravity target uses prefixed filenames (typescript-coding-style.md)
  • This fix is docs-only, addressing the manual install instructions in the SKILL.md
  • Fixed stale catalog counts in AGENTS.md and README.md (27 agents, 113 skills, 58 commands)
  • All 1462 tests passing

Original PR

Closes #651

Test plan

  • All 1462 tests pass after rebase
  • Catalog counts match filesystem
  • Verified automated installer already handles prefixing correctly
  • Docs changes are consistent across EN, JA, ZH translations

Summary by cubic

Prevents language-specific rules from overwriting common rules during manual install by prefixing filenames in flat copies, and hardens copy commands. Also syncs catalog counts in AGENTS.md.

  • Bug Fixes
    • Prefix language-specific filenames during flat copy (e.g., typescript-coding-style.md) and add a troubleshooting note; applied to EN/JA/ZH configure-ecc docs.
    • Use cp -r, quote $ECC_ROOT, and guard empty globs with [ -e "$f" ]; update AGENTS.md counts.

Written for commit 6a76c1e. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Updated project structure with revised workflow skills count.
    • Modified rule installation procedures to use language-prefixed filenames (e.g., typescript-coding-style.md), preventing common rule files from being overwritten by language-specific variants.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

📝 Walkthrough

Walkthrough

Documentation across multiple files was updated to reflect changes in rule installation behavior: AGENTS.md had a skill count correction, and the configure-ecc skill documentation (English, Japanese, and Chinese versions) was updated to explain that language-specific rules are now copied with prefixed filenames to prevent overwriting common rules.

Changes

Cohort / File(s) Summary
Project Metadata
AGENTS.md
Updated documented skill count from 113 to 109 in the Project Structure section.
Configure-ECC Skill Documentation
skills/configure-ecc/SKILL.md, docs/ja-JP/skills/configure-ecc/SKILL.md, docs/zh-CN/skills/configure-ecc/SKILL.md
Modified rule installation steps to copy language-specific rule files with language-prefixed filenames (e.g., typescript-coding-style.md instead of coding-style.md) into $TARGET/rules/, preventing overwriting of common rules. Added existence checks and updated troubleshooting documentation to reflect the new naming convention.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Files are prefixed, no more overlapping!
Language-specific rules stay true,
Common files safe, no more capping,
A hop and a fix for the crew! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: prefixing language-specific rules in manual install documentation, with a reference to the rebased PR.
Linked Issues check ✅ Passed The PR fully addresses all coding objectives from linked issue #651: prefixes language-specific rule filenames across EN/JA/ZH docs, hardens copy commands with -r/quotes/guards, adds troubleshooting notes, and ensures no filename collisions.
Out of Scope Changes check ✅ Passed All changes are within scope: documentation updates to SKILL.md files and catalog count sync in AGENTS.md directly support the linked issue objectives; no unrelated code modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch community/pr-651-install-prefix
📝 Coding Plan
  • Generate coding plan for human review comments

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 20, 2026

Greptile Summary

This docs-only PR fixes a real bug in the manual install instructions across the EN, JA-JP, and ZH-CN configure-ecc SKILL.md files: language-specific rule files (e.g., coding-style.md) were being copied flat into the rules/ directory under the same name, silently overwriting the common rules variant. The fix introduces a for loop with a glob guard ([ -e "$f" ]) and a language prefix (e.g., typescript-coding-style.md), matching what the automated Node.js installer already does.

Key changes:

  • Replaces the bare cp -r $ECC_ROOT/rules/<lang>/* $TARGET/rules/ commands with properly-quoted, glob-guarded for loops that prefix each filename with the language name.
  • Adds a troubleshooting note explaining the expected prefixed filenames.
  • Updates catalog counts in AGENTS.md (27 agents, 113 skills, 58 commands in intro; 109 skills in directory tree — the two skills counts remain inconsistent within the file).
  • One minor style inconsistency: the adjacent common-rules copy command (cp -r $ECC_ROOT/rules/common/* $TARGET/rules/) still uses unquoted variables, while all the new language-specific lines use proper quoting throughout.

Confidence Score: 4/5

  • Safe to merge — docs-only fix with no runtime code changes; a minor quoting inconsistency in example shell snippets is the only remaining nit.
  • All changes are documentation. The core fix (prefixing language-specific rule filenames) is correct and consistent across all three locales. The only open issue is that the common-rules copy line (cp -r $ECC_ROOT/...) was not updated to use the same quoting style as the new language-specific lines, leaving a small inconsistency in the instructional shell snippet. This is not a blocker.
  • All three SKILL.md files share the same unquoted common-rules copy line; no single file is more risky than the others.

Important Files Changed

Filename Overview
skills/configure-ecc/SKILL.md Core EN skill docs updated to use language-prefixed filenames in manual install loop with proper quoting and glob guard; a minor inconsistency remains with the unquoted common-rules copy command on the adjacent line.
docs/ja-JP/skills/configure-ecc/SKILL.md JA translation updated consistently with the EN SKILL.md; same unquoted common-rules copy line present.
docs/zh-CN/skills/configure-ecc/SKILL.md ZH-CN translation updated consistently with the EN SKILL.md; same unquoted common-rules copy line present.
AGENTS.md Catalog counts updated; intro now shows 113 skills and 58 commands, directory tree shows 109 skills and 58 commands — skills count differs between the two locations within the same file.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Manual Install: Start] --> B[Copy common rules]
    B --> B1["cp -r $ECC_ROOT/rules/common/* $TARGET/rules/\n(unquoted — unchanged by this PR)"]
    A --> C{Language rules selected?}
    C -- TypeScript --> D1["for f in ECC_ROOT/rules/typescript/*\n  [ -e f ] && cp f TARGET/rules/typescript-basename-f"]
    C -- Python --> D2["for f in ECC_ROOT/rules/python/*\n  [ -e f ] && cp f TARGET/rules/python-basename-f"]
    C -- Go --> D3["for f in ECC_ROOT/rules/golang/*\n  [ -e f ] && cp f TARGET/rules/golang-basename-f"]
    D1 --> E[Result: typescript-coding-style.md]
    D2 --> F[Result: python-coding-style.md]
    D3 --> G[Result: golang-coding-style.md]
    B1 --> H[Result: coding-style.md preserved]
    E & F & G & H --> I[No common rule overwritten ✓]
Loading

Last reviewed commit: "fix: sync catalog co..."

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4747b80513

ℹ️ 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".

Comment on lines +226 to +228
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve nested rule layout for Claude manual installs

When configure-ecc is used to install rules into ~/.claude or .claude, these loops rename rules/<language>/*.md into flat files like typescript-coding-style.md. That no longer matches the supported Claude layout: the production installer keeps rules/common/... and rules/<language>/... directories (scripts/lib/install-executor.js:235-260, verified by tests/scripts/install-apply.test.js:92-95), and rules/README.md:45-49 explicitly warns that flattening breaks the ../common/ references embedded in the language rule files. Users who follow this new guidance will end up with a manual install that diverges from the tested installer behavior and loses those cross-references.

Useful? React with 👍 / 👎.

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.

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="AGENTS.md">

<violation number="1" location="AGENTS.md:3">
P3: Keep the skill count consistent within AGENTS.md; this change updates the header to 113 but the Project Structure section still says 109.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

tonymfer and others added 3 commits March 20, 2026 01:52
…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>
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: 1

🧹 Nitpick comments (4)
skills/configure-ecc/SKILL.md (2)

199-199: Consider hardening the skills copy for consistency.

Similar to the common rules copy, this skills copy command lacks quotes around $ECC_ROOT. While less critical than the rules (no collision risk), adding quotes would handle paths with spaces consistently across all copy operations in this document.

🛡️ Optional hardening
-cp -r $ECC_ROOT/skills/<skill-name> $TARGET/skills/
+cp -r "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/configure-ecc/SKILL.md` at line 199, The cp command shown (cp -r
$ECC_ROOT/skills/<skill-name> $TARGET/skills/) can break on paths with spaces;
update the command used to copy skills by quoting the variables (e.g., wrap
$ECC_ROOT/skills/<skill-name> and $TARGET/skills/ in double quotes) so cp
handles whitespace consistently—apply the same quoting style used elsewhere in
the document to keep behavior uniform.

222-222: Consider hardening the common rules copy for consistency.

The language-specific rule copy commands (lines 224-229) quote $ECC_ROOT and guard against empty globs, but this common rules copy does not. For consistency and robustness (handling spaces in $ECC_ROOT and empty source directories), consider applying the same pattern.

🛡️ Optional hardening
-cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
+for f in "$ECC_ROOT"/rules/common/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/$(basename "$f")"; done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/configure-ecc/SKILL.md` at line 222, The cp invocation copying common
rules uses unquoted $ECC_ROOT and no guard against empty globs; update the copy
to mirror the language-specific pattern by quoting paths and protecting against
empty source globs or missing directories (e.g., check that
"$ECC_ROOT/rules/common" exists and has files or use a nullglob-safe loop) so
that cp uses "$ECC_ROOT"/rules/common/* and "$TARGET"/rules/ safely and avoids
failures when paths contain spaces or the source is empty; adjust the cp command
or replace with a guarded loop in SKILL.md where the common rules are copied.
docs/zh-CN/skills/configure-ecc/SKILL.md (1)

225-225: Consider hardening the common rules copy for consistency.

As with the English version, the language-specific copy commands use robust quoting and guards, but this common rules copy does not. Applying the same pattern would improve consistency.

🛡️ Optional hardening
-cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
+for f in "$ECC_ROOT"/rules/common/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/$(basename "$f")"; done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/zh-CN/skills/configure-ecc/SKILL.md` at line 225, The cp command cp -r
$ECC_ROOT/rules/common/* $TARGET/rules/ is unguarded and unquoted; update it to
check that ECC_ROOT and TARGET are set, create the destination with mkdir -p
"$TARGET/rules", and use a quoted, safer copy form such as cp -a
"$ECC_ROOT/rules/common/." "$TARGET/rules/" (or rsync -a
"$ECC_ROOT/rules/common/" "$TARGET/rules/") so globs and paths with spaces are
handled and empty source directories don’t break the script.
docs/ja-JP/skills/configure-ecc/SKILL.md (1)

158-158: Consider hardening the common rules copy for consistency.

As with the English version, the language-specific copy commands use robust quoting and guards, but this common rules copy does not. Applying the same pattern would improve consistency.

🛡️ Optional hardening
-cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
+for f in "$ECC_ROOT"/rules/common/*; do [ -e "$f" ] && cp -r "$f" "$TARGET/rules/$(basename "$f")"; done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ja-JP/skills/configure-ecc/SKILL.md` at line 158, Replace the brittle cp
line (cp -r $ECC_ROOT/rules/common/* $TARGET/rules/) with a hardened guarded
sequence: check existence of the source directory (e.g., if [ -d
"$ECC_ROOT/rules/common" ]; then ... fi), ensure target exists (mkdir -p
"$TARGET/rules"), and use quoted, robust copy such as cp -a
"$ECC_ROOT/rules/common/." "$TARGET/rules/" so variables ECC_ROOT and TARGET are
quoted, hidden files are preserved, and the operation fails less unexpectedly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Line 145: The skill count is inconsistent: update the "skills/  — 109 workflow
skills and domain knowledge" entry to reflect the correct total of 113 skills so
it matches the header (line 3) and PR objectives; locate the string "skills/  —
109 workflow skills and domain knowledge" and change the numeric value to 113
and verify any other summary lines referencing total skills are consistent.

---

Nitpick comments:
In `@docs/ja-JP/skills/configure-ecc/SKILL.md`:
- Line 158: Replace the brittle cp line (cp -r $ECC_ROOT/rules/common/*
$TARGET/rules/) with a hardened guarded sequence: check existence of the source
directory (e.g., if [ -d "$ECC_ROOT/rules/common" ]; then ... fi), ensure target
exists (mkdir -p "$TARGET/rules"), and use quoted, robust copy such as cp -a
"$ECC_ROOT/rules/common/." "$TARGET/rules/" so variables ECC_ROOT and TARGET are
quoted, hidden files are preserved, and the operation fails less unexpectedly.

In `@docs/zh-CN/skills/configure-ecc/SKILL.md`:
- Line 225: The cp command cp -r $ECC_ROOT/rules/common/* $TARGET/rules/ is
unguarded and unquoted; update it to check that ECC_ROOT and TARGET are set,
create the destination with mkdir -p "$TARGET/rules", and use a quoted, safer
copy form such as cp -a "$ECC_ROOT/rules/common/." "$TARGET/rules/" (or rsync -a
"$ECC_ROOT/rules/common/" "$TARGET/rules/") so globs and paths with spaces are
handled and empty source directories don’t break the script.

In `@skills/configure-ecc/SKILL.md`:
- Line 199: The cp command shown (cp -r $ECC_ROOT/skills/<skill-name>
$TARGET/skills/) can break on paths with spaces; update the command used to copy
skills by quoting the variables (e.g., wrap $ECC_ROOT/skills/<skill-name> and
$TARGET/skills/ in double quotes) so cp handles whitespace consistently—apply
the same quoting style used elsewhere in the document to keep behavior uniform.
- Line 222: The cp invocation copying common rules uses unquoted $ECC_ROOT and
no guard against empty globs; update the copy to mirror the language-specific
pattern by quoting paths and protecting against empty source globs or missing
directories (e.g., check that "$ECC_ROOT/rules/common" exists and has files or
use a nullglob-safe loop) so that cp uses "$ECC_ROOT"/rules/common/* and
"$TARGET"/rules/ safely and avoids failures when paths contain spaces or the
source is empty; adjust the cp command or replace with a guarded loop in
SKILL.md where the common rules are copied.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9635700-4a42-49c9-94f3-0e479b41dce2

📥 Commits

Reviewing files that changed from the base of the PR and between 8511d84 and f20fdff.

📒 Files selected for processing (4)
  • AGENTS.md
  • docs/ja-JP/skills/configure-ecc/SKILL.md
  • docs/zh-CN/skills/configure-ecc/SKILL.md
  • skills/configure-ecc/SKILL.md

```
agents/ — 27 specialized subagents
skills/ — 113 workflow skills and domain knowledge
skills/ — 109 workflow skills and domain knowledge
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent skill count with line 3.

Line 3 declares "113 skills" but this line shows "109 workflow skills". According to the PR objectives, the target is 113 skills across the catalog.

📊 Proposed fix
-skills/          — 109 workflow skills and domain knowledge
+skills/          — 113 workflow skills and domain knowledge
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
skills/ — 109 workflow skills and domain knowledge
skills/ — 113 workflow skills and domain knowledge
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 145, The skill count is inconsistent: update the "skills/ 
— 109 workflow skills and domain knowledge" entry to reflect the correct total
of 113 skills so it matches the header (line 3) and PR objectives; locate the
string "skills/  — 109 workflow skills and domain knowledge" and change the
numeric value to 113 and verify any other summary lines referencing total skills
are consistent.

@affaan-m affaan-m force-pushed the community/pr-651-install-prefix branch from f20fdff to 6a76c1e Compare March 20, 2026 08:59
@affaan-m
Copy link
Copy Markdown
Owner Author

Closing — docs-only change, automated installer already handles this correctly.

@affaan-m affaan-m closed this Mar 20, 2026
@affaan-m affaan-m deleted the community/pr-651-install-prefix branch March 20, 2026 13:51
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