Skip to content
youdede

Schema Compatibility Guard

DataHookv1.0.0

Compares bounded before-and-after schema structure and blocks removed fields, newly required fields, narrowed JSON types, and reused Protobuf field identities.

Runs on

Scope
$npx @youdede/toolkit add schema-compatibility-guard --target claude-code

What it does

Block provably incompatible JSON Schema, Avro, and Protobuf contract edits.

When it fires

  • implementation
  • pre-commit

How it behaves

Block provably incompatible JSON Schema, Avro, and Protobuf contract edits.

It does not execute schema compilers or resolve remote schema references.

It does not classify SQL migrations or OpenAPI documents.

It does not certify compatibility for unsupported schema dialects.

Configuration

targets/claude-code/schema-compatibility-guard.mjsnode · read-only

Version
1.0.0
Requires
node
Licence
RiskThis automatic gate blocks provably incompatible JSON Schema, Avro, and Protobuf contract edits; a false denial can interrupt legitimate work, but it does not execute the blocked action.
Medium
ModeHow it works: fixed rules, model instructions, or both.
Deterministic only
Behaviour
Enforces, blocks on violation
On failure
Denies and blocks
LatencyThe entrypoint handles one intercepted event to block provably incompatible JSON Schema, Avro, and Protobuf contract edits without deferred work.
Immediate
Data retentionWhether data remains after use and who manages its storage.
Not retained

Often used with

All in Data