ccad7e7b29643eacd56e2fc7ec833cb4bfd956ac
Two code-quality fixes after review ofdc71e23(Task 1): I1 — Dead-branch logic in install.sh: The plugin-install block sits inside the `elif [ "$mode" = "user" ]` branch, so `[ "$mode" = "project" ] && plugin_target="consumer"` is unreachable (`$mode` is always "user" here). Replaced with hardcoded `--install-target=user` plus clarifying comment about future consumer-mode wiring. I2 — Filter case missing catch-all in install-plugins.sh: The two `case "$install_target"` blocks (validation at lines 40-43, filter at lines 75-82) were physically separate. If a future enum value is added to validation without updating filter, $filter would be unset → set -u crash. Added explicit `*)` catch-all with log_error + exit 1. Plan §Task 1 Step 1.7 contained the same I1 bug asdc71e23— implementer followed plan faithfully. This fix corrects the code; plan stays as historical record. Future plans referencing this pattern should match THIS fix, not the original plan text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude Brain
Переиспользуемый «мозг Claude» — правила, хуки, плагины и MCP-серверы — для подключения к проектам.
Quick start
Установить мозг в новый или существующий consumer-проект
cd c:/моя/проекты/claude-brain
./scripts/install.sh --target=/path/to/my-project --version=brain-v1.0
Установить мозг в ~/.claude/ (user-level хуки + плагины + MCP)
cd c:/моя/проекты/claude-brain
./scripts/install.sh --target=$HOME/.claude --version=brain-v1.0
При первом запуске будет prompt для MAGIC_API_KEY (21st.dev). Используй --skip-secrets для CI.
Проверить целостность
./scripts/verify.sh --target=/path/to/my-project
Структура
См. CLAUDE.md для деталей.
Документация
- docs/architecture.md — архитектура brain'а
- docs/how-to-use-brain.md — workflow использования
- docs/how-to-experiment.md — песочница experiments/
- docs/secrets-and-tokens.md — управление секретами
- docs/consumer-projects.md — список known consumer projects
Prerequisites
git≥2.xjq≥1.6python3≥3.10bash(Git Bash на Windows работает)- Optional:
gh(для GitHub repo create),gitleaks(CI),claudeCLI (для plugin install)
Description
Languages
JavaScript
98.6%
Python
1.1%
Shell
0.3%