{"record":{"id":"0bc6a47a3df71e16","repo":"github/spec-kit","slug":"invalid-preset-id-pack-id-must-be-lowercas","errorCode":null,"errorMessage":"Invalid preset ID '{pack['id']}': must be lowercase alphanumeric with hyphens only","messagePattern":"Invalid preset ID '(.+?)': must be lowercase alphanumeric with hyphens only","errorType":"validation","errorClass":"PresetValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/presets/__init__.py","lineNumber":349,"sourceCode":"        # ``id: 2`` as an int -- and TypeError is not a PresetValidationError,\n        # so it escapes every caller that already handles a malformed manifest\n        # (see list_installed()'s \"Corrupted preset\" fallback, which catches\n        # PresetValidationError only, making one bad preset exit ``specify\n        # preset list`` with a raw traceback and hide the healthy ones).\n        # Mirrors the sibling IntegrationDescriptor, which already type-checks\n        # the same four fields.\n        for field in [\"id\", \"name\", \"version\", \"description\"]:\n            if field not in pack:\n                raise PresetValidationError(f\"Missing preset.{field}\")\n            if not isinstance(pack[field], str):\n                raise PresetValidationError(\n                    f\"Invalid preset.{field}: expected a string, \"\n                    f\"got {type(pack[field]).__name__}\"\n                )\n\n        # Validate pack ID format\n        if not re.match(r'^[a-z0-9-]+$', pack[\"id\"]):\n            raise PresetValidationError(\n                f\"Invalid preset ID '{pack['id']}': \"\n                \"must be lowercase alphanumeric with hyphens only\"\n            )\n\n        # Validate semantic version\n        try:\n            pkg_version.Version(pack[\"version\"])\n        except pkg_version.InvalidVersion:\n            raise PresetValidationError(f\"Invalid version: {pack['version']}\")\n\n        # Validate requires section\n        requires = self.data[\"requires\"]\n        if \"speckit_version\" not in requires:\n            raise PresetValidationError(\"Missing requires.speckit_version\")\n        # Presence alone is not enough: check_compatibility() feeds this value to\n        # ``SpecifierSet(required)``, guarded only by ``except InvalidSpecifier``,\n        # which a non-string escapes two different ways. A float/int/bool/None\n        # raises TypeError from the constructor, while a list or dict is an","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/presets/__init__.py#L331-L367","documentation":"Error \"Invalid preset ID '{pack['id']}': must be lowercase alphanumeric with hyphens only\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/presets/__init__.py:349 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the preset id to lowercase alphanumeric with hyphens only."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}