KeiSeiKit-1.0/hooks/hooks.json
Parfii-bot 164c521936 feat(v0.16): Anthropic plugin format + own marketplace
Makes KeiSeiKit installable both as classic kit AND as an
Anthropic Claude Code plugin.

.claude-plugin/plugin.json — plugin manifest (name, version,
description, author OBJECT per schema, repository, license)
.claude-plugin/marketplace.json — own marketplace declaration
(owner OBJECT per schema, plugins[].source OBJECT)
.claude-plugin/mcp-template.json — template for .mcp.json (actual
.mcp.json write is blocked by hook; user copies template manually)
PLUGIN.md — dual-install docs (plugin vs classic)
hooks/hooks.json — uses ${CLAUDE_PLUGIN_ROOT} (per Anthropic
schema, NOT ${PLUGIN_ROOT}); wraps hooks under top-level
"hooks": {...} key

Schema corrections caught during agent validation:
  - marketplace.json owner MUST be object (not string)
  - hooks.json requires "hooks": {...} top-level wrapper
  - env var is ${CLAUDE_PLUGIN_ROOT} not ${PLUGIN_ROOT}

Companion edits in install-split bundle: install/lib-args.sh
gains an 8-line plugin-first banner in print_help() directing
users toward the plugin install path as recommended default.

Dual-install strategy: users can pick
  - `claude plugin marketplace add <url>` then install — latest
    and iteration-friendly (this PR enables it)
  - classic ./install.sh — legacy kit path, full 37-primitive
    control

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:10:15 +08:00

92 lines
2.2 KiB
JSON

{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/assemble-agents.sh"
},
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/site-wysiwyd-check.sh",
"statusMessage": "site-wysiwyd drift check..."
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/milestone-commit-hook.sh",
"statusMessage": "milestone self-audit check (RULE 0.14)..."
}
]
},
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/error-spike-detector.sh",
"statusMessage": "error-spike rolling window (RULE 0.14)..."
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/assemble-validate.sh"
}
]
},
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/no-hand-edit-agents.sh"
}
]
},
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/tomd-preread.sh",
"statusMessage": "tomd pre-read auto-convert check..."
}
]
},
{
"matcher": "Agent",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/agent-fork-logger.sh",
"statusMessage": "agent-fork-logger (RULE 0.12)..."
}
]
}
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-end-dump.sh",
"statusMessage": "session-end trace dump (RULE 0.14)..."
}
]
}
]
}
}