Note: This fix may not help because MCP servers fail BEFORE hooks run.
See lessons learned wiki page for full debug trace.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Startup hooks in data-platform and pr-review were checking for venvs
at the marketplace path (~/.claude/plugins/marketplaces/.../mcp-servers/)
which gets wiped on updates. The actual venvs live in the cache directory
(~/.cache/claude-mcp-venvs/) which survives updates.
This caused false "MCP venv missing" errors even when venvs existed,
wasting hours of debugging time.
Fixed hooks now check cache path first, matching the pattern used
by run.sh scripts.
Also updated docs/CANONICAL-PATHS.md with the correct venv path pattern
to prevent future occurrences.
Lesson learned: lessons/patterns/startup-hooks-must-check-venv-cache-path-first
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The startup hooks were looking for MCP venvs relative to the plugin
directory instead of the marketplace root, causing false "venv missing"
errors on every session start.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The hooks.json files had incorrect structure. Claude Code requires:
- Top-level "hooks" object
- Event names as keys containing arrays
- Each array element must have "matcher" and nested "hooks" array
Fixed 8 plugins:
- clarity-assist
- claude-config-maintainer
- cmdb-assistant
- contract-validator
- data-platform
- pr-review
- projman
- viz-platform
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements PostToolUse hook to warn about potentially breaking schema changes:
- DROP COLUMN/TABLE/INDEX detection
- Column type changes (ALTER TYPE, MODIFY COLUMN)
- NOT NULL constraint additions
- RENAME operations
- ORM model field removals
Non-blocking - outputs warnings only.
Configurable via DATA_PLATFORM_SCHEMA_WARN env var.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cherry-pick fix from hotfix/data-platform-hooks to development.
Hooks must be in separate hooks/hooks.json file (auto-discovered),
NOT inline in plugin.json.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove invalid "agents": ["./agents/"] - agent .md files don't need registration
- Inline hooks instead of external reference "hooks/hooks.json"
- Delete orphaned hooks.json file (content now in plugin.json)
This fixes "invalid input" validation errors for hooks and agents fields.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>