Skip to content
youdede

Release version consistency guard

OperationsHookv1.0.0

A deterministic Claude Code PreToolUse gate for Bash that recognizes Node package publication commands and compares bounded root package metadata with its lockfile, rejecting missing, malformed, placeholder, private, or inconsistent release versions.

Runs on

Scope
$npx @youdede/toolkit add release-version-consistency-guard --target claude-code

What it does

Require package and lockfile versions to agree before a recognized publication command.

When it fires

  • release
  • review

How it behaves

Inspect bounded package metadata before publication and reject inconsistent or non-releaseable version state.

It does not choose, increment, tag, rewrite, publish, install, or validate compatibility of a version.

It does not contact a registry or prove that a version is available, unique, or semantically correct.

It does not treat a matching lockfile as evidence that package contents or provenance are safe.

It does not accept command options, prompt text, or project-authored files as a bypass.

Configuration

targets/claude-code/release-version-consistency-guard.mjsnode · read-only

Version
1.0.0
Requires
Shell command guard
Licence
RiskThis automatic gate requires package and lockfile versions to agree before a recognized publication command; 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 require package and lockfile versions to agree before a recognized publication command without deferred work.
Immediate
Data retentionWhether data remains after use and who manages its storage.
Not retained
In packs
  • Mobile release readiness
  • Release readiness

Often used with

All in Operations