Files
brain/docs/superpowers/plans/2026-05-11-install-plugin-dev-hookify.md
T
Дмитрий 179101d772 docs(brain-plugin-routing): plan for install plugin-dev + hookify (v1.2)
4 atomic tasks (3 commits + 1 verification+push) for installing brain-meta
plugins #17 and #18 per routing.md §5.1, bumping brain to v1.2 with
routing.md v1.1 (new task classes: plugin creation, hook creation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 14:04:28 +03:00

22 KiB
Raw Blame History

Install plugin-dev + hookify as brain-meta plugins (brain v1.2)

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Install Anthropic-verified plugins plugin-dev (#17) + hookify (#18) as meta category brain plugins per docs/brain-plugin-routing.md §5.1, bumping brain to v1.2 with routing.md v1.1 (new task classes: plugin creation, hook creation).

Architecture: Both plugins already in ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ (marketplace HEAD 00679aef889e), absent from ~/.claude/plugins/cache/ and enabledPlugins. Path 2 install: cp -r from marketplaces → cache (avoid duplicate git clone; marketplace is already a fresh clone). 6-artifact atomic install per plugin: cache + user-level enable + user-level manifest + brain plugins-manifest + brain settings-fragment + routing.md row. Marketplaces.json unchanged (marketplace already registered). 3 commits: plugin-dev, hookify, version bump v1.1→v1.2.

Tech Stack: Bash (cp -r, jq), markdown, JSON, git atomic commits.

Routing reference: docs/brain-plugin-routing.md §5.1 — 10-step install for meta category.

Marketplace state verified at planning time:

  • Marketplace claude-plugins-official HEAD = 00679aef889efe36bb0389f81d70b6229a2013ee
  • plugin-dev source: ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/
  • hookify source: ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/
  • Both have .claude-plugin/plugin.json with Anthropic author
  • Neither in ~/.claude/plugins/cache/, neither in enabledPlugins, neither in installed_plugins.json

Cache version convention: Phase 0 used 00679aef889e (marketplace HEAD short-sha) as version subdir. We follow same convention for consistency: cache/claude-plugins-official/<plugin>/00679aef889e/.


File Structure

File Action Tasks
~/.claude/plugins/cache/claude-plugins-official/plugin-dev/00679aef889e/ CREATE (cp -r from marketplace) Task 1
~/.claude/plugins/cache/claude-plugins-official/hookify/00679aef889e/ CREATE (cp -r from marketplace) Task 2
~/.claude/settings.json MODIFY (add 2 keys to enabledPlugins) Task 1, Task 2
~/.claude/plugins/installed_plugins.json MODIFY (add 2 entries) Task 1, Task 2
user-level-files/plugins-manifest.json MODIFY (add 2 entries with target+category) Task 1, Task 2
user-level-files/settings-fragment.json MODIFY (add 2 keys to enabledPlugins) Task 1, Task 2
docs/brain-plugin-routing.md MODIFY (bump v1.0→v1.1: +2 §2.1, +2 §4.2, +2 §3.1 task classes) Task 1, Task 2
.brain-version MODIFY (v1.1 → v1.2 + new sha) Task 3
manifest.json MODIFY (version → brain-v1.2) Task 3
CLAUDE.md MODIFY (version line v1.1→v1.2) Task 3
CHANGELOG.md MODIFY (+v1.2 entry above v1.1) Task 3

Note on user-level vs brain-only files: User-level files (~/.claude/...) are runtime state on this machine, NOT in brain repo. They get edited but only brain repo files get committed. The 3 atomic commits only touch files in c:/моя/проекты/claude-brain/.


Task 1: Install plugin-dev

Files:

  • Create: ~/.claude/plugins/cache/claude-plugins-official/plugin-dev/00679aef889e/ (full copy from marketplace)

  • Modify: ~/.claude/settings.json (add "plugin-dev@claude-plugins-official": true to enabledPlugins)

  • Modify: ~/.claude/plugins/installed_plugins.json (add entry under key plugin-dev@claude-plugins-official)

  • Modify: user-level-files/plugins-manifest.json (add entry with target="user-level", category="meta")

  • Modify: user-level-files/settings-fragment.json (add key to enabledPlugins)

  • Modify: docs/brain-plugin-routing.md (bump v1.0→v1.1: +row in §2.1, +row in §4.2, +row in §3.1 «Создание plugin'а»)

  • Step 1: Pre-state RED test

Run:

ls -d "$HOME/.claude/plugins/cache/claude-plugins-official/plugin-dev" 2>/dev/null && echo EXISTS || echo ABSENT
jq -e '.enabledPlugins | has("plugin-dev@claude-plugins-official")' "$HOME/.claude/settings.json"

Expected: ABSENT, false

  • Step 2: Install in cache via cp -r

Run:

mkdir -p "$HOME/.claude/plugins/cache/claude-plugins-official/plugin-dev"
cp -r "$HOME/.claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev" "$HOME/.claude/plugins/cache/claude-plugins-official/plugin-dev/00679aef889e"
ls "$HOME/.claude/plugins/cache/claude-plugins-official/plugin-dev/00679aef889e/"

Expected: directory contains .claude-plugin, agents, commands, skills, LICENSE, README.md.

  • Step 3: Enable in user-level settings.json

Edit ~/.claude/settings.json → add line in enabledPlugins block:

  "plugin-dev@claude-plugins-official": true,

(Use Edit tool with exact context to insert after existing entries.)

  • Step 4: Verify GREEN — user-level enable

Run:

jq -e '.enabledPlugins."plugin-dev@claude-plugins-official"' "$HOME/.claude/settings.json"

Expected: true.

  • Step 5: Add entry to user-level installed_plugins.json

Edit ~/.claude/plugins/installed_plugins.json → add new key "plugin-dev@claude-plugins-official" with array value:

"plugin-dev@claude-plugins-official": [
  {
    "scope": "user",
    "installPath": "C:\\Users\\Administrator\\.claude\\plugins\\cache\\claude-plugins-official\\plugin-dev\\00679aef889e",
    "version": "00679aef889e",
    "installedAt": "2026-05-11T15:00:00.000Z",
    "lastUpdated": "2026-05-11T15:00:00.000Z",
    "gitCommitSha": "00679aef889efe36bb0389f81d70b6229a2013ee",
    "installMethod": "manual-cp-from-marketplace-Path2"
  }
]

(Use actual current ISO timestamp for installedAt/lastUpdated — not literal placeholder. Bash date -u -Iseconds for value.)

  • Step 6: Add entry to brain user-level-files/plugins-manifest.json

Edit brain manifest — add inside "plugins": {:

"plugin-dev@claude-plugins-official": [
  {
    "scope": "user",
    "installPath": "C:\\Users\\Administrator\\.claude\\plugins\\cache\\claude-plugins-official\\plugin-dev\\00679aef889e",
    "version": "00679aef889e",
    "installedAt": "<SAME ISO TIMESTAMP AS STEP 5>",
    "lastUpdated": "<SAME ISO TIMESTAMP AS STEP 5>",
    "gitCommitSha": "00679aef889efe36bb0389f81d70b6229a2013ee",
    "installMethod": "manual-cp-from-marketplace-Path2",
    "target": "user-level",
    "category": "meta"
  }
]
  • Step 7: Add key to brain user-level-files/settings-fragment.json

Edit brain settings-fragment → add to enabledPlugins:

"plugin-dev@claude-plugins-official": true,
  • Step 8: Update docs/brain-plugin-routing.md — bump v1.0 → v1.1

Three coordinated edits:

8a. §2.1 реестр — add row (after claude-code-setup):

| **plugin-dev** | `anthropics/claude-plugins-official` | `meta` | создание нового plugin'а в brain'е (агенты, команды, hooks, MCP integration); тест-bed для будущих своих brain плагинов | каждодневная UI/code работа |

8b. §3.1 routing-table — add row (after «Анализ что ещё поставить»):

| Создание нового **plugin'а** для brain (agents/commands/hooks/MCP) | `plugin-dev` | прямое создание через файлы `.claude-plugin/plugin.json` + skills если plugin тривиальный (1 skill, без агентов) | guided plugin scaffolding с best practices Anthropic |

8c. §4.2 — update statuses (change «shortlist (not installed)» → «installed v1.2»):

| #17 | `plugin-dev` | `meta` | installed brain v1.2 (manual-cp-from-marketplace-Path2) |

8d. Update version header (top of file):

# Brain Plugin Routing Rules (v1.1)

8e. История версий — добавить запись v1.1 ВЫШЕ существующей v1.0:

- **v1.1 от 2026-05-11** — Installed brain-meta plugins #17 plugin-dev + #18 hookify. Added 2 rows in §2.1, 2 rows in §3.1 (new task classes: plugin creation, hook creation), updated statuses in §4.2.
  • Step 9: Verify GREEN — all 4 brain artifacts

Run:

cd "c:/моя/проекты/claude-brain"
jq -e '.plugins."plugin-dev@claude-plugins-official"[0] | (.target == "user-level" and .category == "meta")' user-level-files/plugins-manifest.json
jq -e '.enabledPlugins."plugin-dev@claude-plugins-official"' user-level-files/settings-fragment.json
grep -c "plugin-dev" docs/brain-plugin-routing.md
grep -c "^# Brain Plugin Routing Rules (v1.1)" docs/brain-plugin-routing.md

Expected: true, true, ≥3 (in 3 sections), 1.

  • Step 10: Commit atomic
cd "c:/моя/проекты/claude-brain"
git add user-level-files/plugins-manifest.json user-level-files/settings-fragment.json docs/brain-plugin-routing.md
git commit -m "$(cat <<'EOF'
feat(brain-plugins): install plugin-dev as meta plugin

Anthropic-verified plugin from claude-plugins-official marketplace (HEAD
00679aef889e). Installed in cache via cp from marketplace (Path 2,
manual-cp-from-marketplace). Routing.md bumped to v1.1: +§2.1 row, +§3.1
row for «plugin creation» task class, +§4.2 status update for #17.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EOF
)"

Expected: 3 files changed.


Task 2: Install hookify

Files: parallel structure to Task 1 — substitute plugin-devhookify.

  • Step 1: Pre-state RED test

Run:

ls -d "$HOME/.claude/plugins/cache/claude-plugins-official/hookify" 2>/dev/null && echo EXISTS || echo ABSENT
jq -e '.enabledPlugins | has("hookify@claude-plugins-official")' "$HOME/.claude/settings.json"

Expected: ABSENT, false

  • Step 2: Install in cache via cp -r

Run:

mkdir -p "$HOME/.claude/plugins/cache/claude-plugins-official/hookify"
cp -r "$HOME/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify" "$HOME/.claude/plugins/cache/claude-plugins-official/hookify/00679aef889e"
ls "$HOME/.claude/plugins/cache/claude-plugins-official/hookify/00679aef889e/"

Expected: directory contains .claude-plugin, agents, commands, core, examples, hooks, matchers, skills, utils, LICENSE, README.md.

  • Step 3: Enable in user-level settings.json

Edit ~/.claude/settings.json → add in enabledPlugins:

  "hookify@claude-plugins-official": true,
  • Step 4: Verify GREEN
jq -e '.enabledPlugins."hookify@claude-plugins-official"' "$HOME/.claude/settings.json"

Expected: true.

  • Step 5: Add entry to user-level installed_plugins.json
"hookify@claude-plugins-official": [
  {
    "scope": "user",
    "installPath": "C:\\Users\\Administrator\\.claude\\plugins\\cache\\claude-plugins-official\\hookify\\00679aef889e",
    "version": "00679aef889e",
    "installedAt": "<CURRENT ISO via date -u -Iseconds>",
    "lastUpdated": "<SAME ISO>",
    "gitCommitSha": "00679aef889efe36bb0389f81d70b6229a2013ee",
    "installMethod": "manual-cp-from-marketplace-Path2"
  }
]
  • Step 6: Add entry to brain plugins-manifest.json
"hookify@claude-plugins-official": [
  {
    "scope": "user",
    "installPath": "C:\\Users\\Administrator\\.claude\\plugins\\cache\\claude-plugins-official\\hookify\\00679aef889e",
    "version": "00679aef889e",
    "installedAt": "<SAME ISO AS STEP 5>",
    "lastUpdated": "<SAME ISO AS STEP 5>",
    "gitCommitSha": "00679aef889efe36bb0389f81d70b6229a2013ee",
    "installMethod": "manual-cp-from-marketplace-Path2",
    "target": "user-level",
    "category": "meta"
  }
]
  • Step 7: Add key to brain settings-fragment.json
"hookify@claude-plugins-official": true,
  • Step 8: Update routing.md

8a. §2.1 — add row (after plugin-dev row):

| **hookify** | `anthropics/claude-plugins-official` | `meta` | создание нового hook'а в brain'е from conversation patterns; complement к 10 ручным .py hook'ам в `user-level-files/hooks/` | каждодневная работа |

8b. §3.1 routing-table — add row (after plugin-dev creation row):

| Создание нового **hook'а** в brain (PreToolUse/PostToolUse/Stop/SessionStart/UserPromptSubmit) | `hookify` | прямой Edit .py файла в `user-level-files/hooks/` если простой port существующего паттерна, или hook тривиален | guided hook generation by analyzing conversation patterns |

8c. §4.2 — update status for #18:

| #18 | `hookify` | `meta` | installed brain v1.2 (manual-cp-from-marketplace-Path2) |

8d. Update version header:

# Brain Plugin Routing Rules (v1.1)

(Already updated in Task 1 step 8d — verify still says v1.1.)

8e. История версий — update v1.1 entry to mention hookify too (or leave Task 1's wording which already mentions both #17+#18; no change needed if Task 1 entry covers both).

  • Step 9: Verify GREEN
cd "c:/моя/проекты/claude-brain"
jq -e '.plugins."hookify@claude-plugins-official"[0] | (.target == "user-level" and .category == "meta")' user-level-files/plugins-manifest.json
jq -e '.enabledPlugins."hookify@claude-plugins-official"' user-level-files/settings-fragment.json
grep -c "hookify" docs/brain-plugin-routing.md
jq '.plugins | keys | length' user-level-files/plugins-manifest.json

Expected: true, true, ≥3, 8 (was 6, +2).

  • Step 10: Commit atomic
cd "c:/моя/проекты/claude-brain"
git add user-level-files/plugins-manifest.json user-level-files/settings-fragment.json docs/brain-plugin-routing.md
git commit -m "$(cat <<'EOF'
feat(brain-plugins): install hookify as meta plugin

Anthropic-verified plugin from claude-plugins-official marketplace (HEAD
00679aef889e). Installed in cache via cp from marketplace. Routing.md
+§2.1 row, +§3.1 row for «hook creation» task class, +§4.2 status update
for #18.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EOF
)"

Task 3: Bump brain v1.1 → v1.2

Files:

  • Modify: .brain-version

  • Modify: manifest.json:version

  • Modify: CLAUDE.md line «Версия: brain-v1.1 от 11.05.2026»

  • Modify: CHANGELOG.md (add v1.2 entry above v1.1)

  • Step 1: Get current HEAD sha (after Task 2 commit)

cd "c:/моя/проекты/claude-brain"
git rev-parse HEAD

Записать SHA (это hookify commit SHA, base для v1.2 marker).

  • Step 2: Write .brain-version
brain-v1.2
sha: <SHA_FROM_STEP_1>
  • Step 3: Bump manifest.json version

Edit manifest.json line: "version": "brain-v1.1""version": "brain-v1.2".

  • Step 4: Bump CLAUDE.md version line

Edit: **Версия:** brain-v1.1 от 11.05.2026**Версия:** brain-v1.2 от 11.05.2026.

  • Step 5: Add CHANGELOG entry v1.2 above v1.1
## brain-v1.2 — 2026-05-11

### Added
- Installed brain-meta plugin **#17 plugin-dev** (Anthropic, marketplace `claude-plugins-official` HEAD `00679aef889e`). Toolkit для создания plugin'ов с агентами, командами, hooks, MCP integration. Closes shortlist «Brain-specific must-add» part 1/2.
- Installed brain-meta plugin **#18 hookify** (Anthropic, same marketplace). Tool для создания hook'ов by analyzing conversation patterns. Complement к 10 ручным .py hook'ам. Closes shortlist «Brain-specific must-add» part 2/2.
- `docs/superpowers/plans/2026-05-11-install-plugin-dev-hookify.md` — implementation plan.
- `docs/brain-plugin-routing.md` v1.0 → v1.1: 2 новых row в §2.1, 2 row в §3.1 (новые классы задач: «создание plugin'а», «создание hook'а»), 2 status update в §4.2.

### Changed
- `user-level-files/plugins-manifest.json` — 6 → 8 entries (plugin-dev + hookify added with target=user-level, category=meta).
- `user-level-files/settings-fragment.json` — 6 → 8 entries in `enabledPlugins`.
- `CLAUDE.md` brain root — version `brain-v1.1``brain-v1.2`.
- `manifest.json``version` bumped to `brain-v1.2`.

### Notes
- Both plugins installed via `cp -r` from `~/.claude/plugins/marketplaces/...` (not separate git clone) — marketplace was already cloned, this is more efficient than Phase 0 method.
- shortlist «Brain-specific must-add» (recommender's gap finding) now fully closed.

## brain-v1.1 — 2026-05-11
  • Step 6: Verify all v1.2
cd "c:/моя/проекты/claude-brain"
cat .brain-version
jq -r '.version' manifest.json
grep "^\*\*Версия:\*\*" CLAUDE.md
grep -c "^## brain-v1.2" CHANGELOG.md

Expected: brain-v1.2 + sha, brain-v1.2, **Версия:** brain-v1.2 от 11.05.2026, 1.

  • Step 7: Commit atomic (D11-style — version + changelog atomic)
cd "c:/моя/проекты/claude-brain"
git add .brain-version manifest.json CLAUDE.md CHANGELOG.md
git commit -m "$(cat <<'EOF'
chore(brain-version): bump v1.1 → v1.2 (plugin-dev + hookify installed)

Atomic bump. Brain-meta plugins #17 plugin-dev and #18 hookify now
installed, registered in routing.md v1.1, snapshotted in manifest +
settings-fragment. Brain-specific must-add shortlist closed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EOF
)"

Task 4: Final verification + push

  • Step 1: git log review
cd "c:/моя/проекты/claude-brain"
git log --oneline -5

Expected (reverse-chrono):

  1. chore(brain-version): bump v1.1 → v1.2 (plugin-dev + hookify installed)
  2. feat(brain-plugins): install hookify as meta plugin
  3. feat(brain-plugins): install plugin-dev as meta plugin
  4. chore(brain-version): bump v1.0 → v1.1 (plugin routing) (previous)
  • Step 2: Cross-file consistency
cd "c:/моя/проекты/claude-brain"
diff <(jq -S '.plugins | keys' user-level-files/plugins-manifest.json) <(jq -S '.enabledPlugins | keys' user-level-files/settings-fragment.json) && echo MATCH
jq '.plugins | keys | length' user-level-files/plugins-manifest.json

Expected: MATCH, 8.

  • Step 3: User-level vs brain consistency
diff <(jq -S '.enabledPlugins | keys' "$HOME/.claude/settings.json") <(jq -S '.enabledPlugins | keys' user-level-files/settings-fragment.json) && echo MATCH

Expected: MATCH (user-level and brain enabledPlugins now identical).

  • Step 4: Routing.md sanity
grep -c "^## §" docs/brain-plugin-routing.md
wc -l docs/brain-plugin-routing.md
grep -c "plugin-dev\|hookify" docs/brain-plugin-routing.md
grep "^# Brain Plugin Routing Rules" docs/brain-plugin-routing.md

Expected: 7, lines should grow modestly (251 + ~6 new rows ≈ 257-260), plugin-dev|hookify ≥6 (≥3 each in §2.1, §3.1, §4.2), version line shows v1.1.

  • Step 5: Tree clean + invoke verification-before-completion
git status

Expected: nothing to commit, working tree clean.

Then invoke superpowers:verification-before-completion skill for final gate per economy 0%.

  • Step 6: Push to origin/main
git push origin main

Expected: 3 new commits pushed (Task 1, Task 2, Task 3).


Self-Review

Spec coverage (against routing.md §5.1)

§5.1 step Task 1 step Task 2 step Covered?
1 (Marketplace check) implicit (verified at planning, already present) implicit
1a (Marketplace add) N/A (not new) N/A
2 (Install в cache) Task 1 Step 2 Task 2 Step 2
3 (Enable settings.json) Task 1 Step 3 Task 2 Step 3
4 (User-level manifest) Task 1 Step 5 Task 2 Step 5
5 (Brain plugins-manifest) Task 1 Step 6 Task 2 Step 6
6 (Brain marketplaces) N/A (no new marketplace) N/A
7 (Brain settings-fragment) Task 1 Step 7 Task 2 Step 7
8 (Update routing.md) Task 1 Step 8 Task 2 Step 8
9 (Verify in new session) NOT directly possible in this session; partial verify via jq partial partial — Skill tool visibility verifies only in next chat
10 (Commit atomic) Task 1 Step 10 Task 2 Step 10

§5.1 step 9 limitation: Skill tool's plugin list is constant per conversation. Even after enabling, Skill('plugin-dev:...') won't be callable until next chat. This is a known Claude Code limitation noted in PSR R11.4. Verification via jq/grep on brain artifacts is sufficient for this session; full Skill-tool verification on next chat.

Placeholder scan

  • <SAME ISO TIMESTAMP AS STEP 5> in Task 1 Step 6 / Task 2 Step 6 — explicit cross-reference, not a placeholder. Engineer must use same value as captured in Step 5. If executed, must be filled with real ISO timestamp before commit.
  • <SHA_FROM_STEP_1> in Task 3 Step 2 — same: explicit cross-reference to Task 3 Step 1 output.
  • <CURRENT ISO via date -u -Iseconds> in Task 2 Step 5 — instruction to use date -u -Iseconds output, not literal placeholder.

No "TBD", "TODO", "implement later", "Similar to Task N" violations. Task 2 explicitly repeats structure (not refers to Task 1) per "No Placeholders" rule.

Type consistency

  • target: "user-level" — used consistently in Task 1 Step 6 and Task 2 Step 6.
  • category: "meta" — used consistently in same steps.
  • installMethod: "manual-cp-from-marketplace-Path2" — used consistently across Task 1 Step 5/6 and Task 2 Step 5/6.
  • Plugin keys with @claude-plugins-official suffix — consistent in all references.
  • 00679aef889e (cache version subdir) and 00679aef889efe36bb0389f81d70b6229a2013ee (gitCommitSha) — short vs full SHA. Consistent: short 12-char for cache subdir (matches Phase 0 convention from skill-creator); full 40-char for gitCommitSha (verifiability).

Чисто.


Execution Handoff

Plan complete and saved to docs/superpowers/plans/2026-05-11-install-plugin-dev-hookify.md.

Two execution options:

1. Subagent-Driven (recommended) — fresh subagent per task, two-stage review.

2. Inline Execution — execute in current session via superpowers:executing-plans.

Per economy 0% (no subagent abuse for trivial procedural tasks) and given 4 well-scoped tasks operating on a verified §5.1 procedure — Inline Execution recommended.

Which approach?