docs: fix cp -r flatten install instructions that silently overwrite rules

The configure-ecc skill (English source) and ja-JP top-level README plus
its configure-ecc translation documented `cp -r .../<lang>/* <target>/rules/`
for installing rule directories. rules/README.md explicitly warns against
this form because:

- Common and language-specific directories contain same-named files
  (coding-style.md, testing.md, patterns.md, hooks.md, security.md).
  Flattening makes each language overwrite the previous and common.
- The relative `../common/<file>.md` references in language rule files
  break when common/ is no longer a sibling directory.

This is silent — the user gets only the last language's rules with no
error message.

Replace with the directory-form copy already documented in
rules/README.md:

    cp -r .../<lang> <target>/rules/<lang>

Scope: English source + ja-JP. Closes #1879. Other locale translations
(zh-CN, ko-KR, pt-BR, tr) carry the same pattern and can follow up as
separate PRs to keep this change reviewable.
This commit is contained in:
zomia
2026-05-14 08:40:36 +09:00
parent 20f00c1410
commit 4d3033eb64
3 changed files with 26 additions and 26 deletions
+6 -6
View File
@@ -234,13 +234,13 @@ Options:
Execute installation:
```bash
# Common rules (flat copy into rules/)
cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
# Common rules
cp -r $ECC_ROOT/rules/common $TARGET/rules/common
# Language-specific rules (flat copy into rules/)
cp -r $ECC_ROOT/rules/typescript/* $TARGET/rules/ # if selected
cp -r $ECC_ROOT/rules/python/* $TARGET/rules/ # if selected
cp -r $ECC_ROOT/rules/golang/* $TARGET/rules/ # if selected
# Language-specific rules (preserve per-language directories)
cp -r $ECC_ROOT/rules/typescript $TARGET/rules/typescript # if selected
cp -r $ECC_ROOT/rules/python $TARGET/rules/python # if selected
cp -r $ECC_ROOT/rules/golang $TARGET/rules/golang # if selected
```
**Important**: If the user selects any language-specific rules but NOT common rules, warn them: