Bug 1: merge-mcp.sh fails on Cyrillic brain repo paths (jq fopen UTF-8 issue)
→ use --argjson with $(cat ...) instead of --slurpfile
Bug 2: install.sh stripped only trailing .template, missed middle .template.
→ strip both '.template.' middle and '.template' trailing patterns
Bug 3: manifest.json used brain-repo paths but verify.sh checked target paths
→ restructure manifest.files into {project-mode, user-mode, brain-internal} maps
→ verify.sh now picks map based on detected target mode
Bug 4: make_backup_dir created empty backup dir, no file preservation
→ rsync/cp -r target tree to backup before any modifications
Bug 5: brain's project-files/README.md overwrote consumer's README.md
→ install.sh now skips brain-internal READMEs in project/user copy loops
Phase 9 self-test re-run on c:/tmp/test-consumer-fix: install + verify both PASS.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plan simplification: dropped the broken middle elif heuristic that had
unbalanced shell expression. Kept clean two-step fallback: .template
suffix first, bare filename second.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plan correction E: cp -r replaced with find-loop that strips .template
suffix on copy. Without this Test 3 (project mode: CLAUDE.md copied) can't
pass — fixture creates CLAUDE.md.template, target expects CLAUDE.md.
Real intent: brain stores templates as *.template, consumed without suffix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Uses corrected Claude CLI subcommand shape:
claude plugin marketplace add <repo> (NOT `claude marketplace add`)
claude plugin marketplace list
claude plugin install <name@marketplace>
claude plugin info <name@marketplace> --json
Includes fallback for environments where `claude` CLI is not in PATH
(VSCode-extension install on Windows): logs manual edit instructions
and exits 0 so the parent installer can continue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>