[Sprint 3] feat: Implement schema diff detection hook for data-platform #228

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

Description

Implement a PostToolUse hook that detects breaking schema changes when editing SQL/YAML files.

Implementation

Wiki: Sprint 3: Hooks Implementation

Plugin: plugins/data-platform/

Technical Details

Hook Configuration

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

Breaking Changes to Detect

  • Column removal
  • Column rename
  • Type narrowing
  • NOT NULL added
  • PK changes

Files to Create/Modify

plugins/data-platform/hooks/
  hooks.json             # PostToolUse hook
  detect-schema-diff.sh  # Detection script

Acceptance Criteria

  • Hook in hooks/hooks.json
  • Detects SQL breaking changes
  • Detects YAML schema changes
  • Clear warnings
  • Non-blocking

Technical Notes

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

## Description Implement a `PostToolUse` hook that detects breaking schema changes when editing SQL/YAML files. ## 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/data-platform/` ## Technical Details ### Hook Configuration - **Event:** `PostToolUse` - **Tool Filter:** `Edit` (schema files) - **Behavior:** Warn on breaking changes ### Breaking Changes to Detect - Column removal - Column rename - Type narrowing - NOT NULL added - PK changes ### Files to Create/Modify ``` plugins/data-platform/hooks/ hooks.json # PostToolUse hook detect-schema-diff.sh # Detection script ``` ## Acceptance Criteria - [ ] Hook in `hooks/hooks.json` - [ ] Detects SQL breaking changes - [ ] Detects YAML schema changes - [ ] Clear warnings - [ ] Non-blocking ## Technical Notes **CRITICAL:** Hooks must be in `hooks/hooks.json`, NOT inline in plugin.json.
lmiranda added the Type/FeatureEffort/LPriority/MediumComplexity/Complex labels 2026-01-27 21:51:32 +00:00
lmiranda added this to the Sprint 3 - Hooks milestone 2026-01-27 21:55:29 +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#228