[Sprint 3] feat: Implement breaking change detection for contract-validator #230

Closed
opened 2026-01-27 21:51:37 +00:00 by lmiranda · 0 comments
Owner

Description

Implement detection of breaking changes in plugin interfaces via PostToolUse hook on edit operations.

Implementation

Wiki: Sprint 3: Hooks Implementation

Plugin: plugins/contract-validator/

Technical Details

Hook Configuration

  • Event: PostToolUse
  • Tool Filter: Edit (interface files)
  • Behavior: Warn on breaking changes

Breaking Change Types

  • Removed commands
  • Changed command signatures
  • Removed MCP tools
  • Changed tool parameters
  • Hook event changes

Files to Monitor

  • plugins/**/.claude-plugin/plugin.json
  • plugins/**/hooks/hooks.json
  • plugins/**/commands/*.md
  • mcp-servers/**/tools.py

Files to Create/Modify

plugins/contract-validator/hooks/
  hooks.json                  # Add PostToolUse hook
  detect-breaking-changes.sh  # Detection script

Acceptance Criteria

  • Hook in hooks/hooks.json
  • Detects manifest breaking changes
  • Detects MCP tool changes
  • Detects command changes
  • Shows affected consumers
  • Non-blocking warnings

Dependency

Depends on SessionStart auto-validate hook (#TBD) for infrastructure.

Technical Notes

CRITICAL: Hooks must be in hooks/hooks.json, NOT inline in plugin.json.

## Description Implement detection of breaking changes in plugin interfaces via `PostToolUse` hook on edit operations. ## Implementation **Wiki:** [Sprint 3: Hooks Implementation](https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/wiki/Change-V5.2.0%3A-Plugin-Enhancements-Proposal-%28Sprint-3-Hooks%29) **Plugin:** `plugins/contract-validator/` ## Technical Details ### Hook Configuration - **Event:** `PostToolUse` - **Tool Filter:** `Edit` (interface files) - **Behavior:** Warn on breaking changes ### Breaking Change Types - Removed commands - Changed command signatures - Removed MCP tools - Changed tool parameters - Hook event changes ### Files to Monitor - `plugins/**/.claude-plugin/plugin.json` - `plugins/**/hooks/hooks.json` - `plugins/**/commands/*.md` - `mcp-servers/**/tools.py` ### Files to Create/Modify ``` plugins/contract-validator/hooks/ hooks.json # Add PostToolUse hook detect-breaking-changes.sh # Detection script ``` ## Acceptance Criteria - [ ] Hook in `hooks/hooks.json` - [ ] Detects manifest breaking changes - [ ] Detects MCP tool changes - [ ] Detects command changes - [ ] Shows affected consumers - [ ] Non-blocking warnings ## Dependency Depends on SessionStart auto-validate hook (#TBD) for infrastructure. ## Technical Notes **CRITICAL:** Hooks must be in `hooks/hooks.json`, NOT inline in plugin.json.
lmiranda added the Type/FeatureEffort/LComplexity/ComplexPriority/High labels 2026-01-27 21:51:37 +00:00
lmiranda added this to the Sprint 3 - Hooks milestone 2026-01-27 21:55:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#230