Lowercase, trim, collapse any run of whitespace/punctuation into a single
hyphen, strip leading/trailing hyphens. Non-ASCII characters are dropped
as separators (ASCII-only slugs).
Validate an already-computed slug: length, charset, hyphenation. This is
structural validity only — it does not enforce the registry’s
reserved-word denylist, so it’s safe to run for purely local/offline pack
builds (e.g. dkp build) where there’s no registry moderation concern.
Called independently of slugify_domain (e.g. by backfill scripts
re-deriving slugs from stored data).
Validate a slug for registry publication: structural validity plus the
reserved-word denylist. The registry must validate defensively rather
than trust the CLI, so this is what the publish route calls.