{"record":{"id":"645a2e63cae948bf","repo":"github/spec-kit","slug":"template-missing-type-name-or-file","errorCode":null,"errorMessage":"Template missing 'type', 'name', or 'file'","messagePattern":"Template missing 'type', 'name', or 'file'","errorType":"validation","errorClass":"PresetValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/presets/__init__.py","lineNumber":418,"sourceCode":"        # reports the accurate type error rather than the misleading \"must\n        # provide at least one template\". An empty list still reports the\n        # latter, since that genuinely is a list with no templates.\n        templates = provides[\"templates\"]\n        if not isinstance(templates, list):\n            raise PresetValidationError(\n                \"Invalid provides.templates: expected a list\"\n            )\n        if not templates:\n            raise PresetValidationError(\n                \"Preset must provide at least one template\"\n            )\n        for tmpl in templates:\n            if not isinstance(tmpl, dict):\n                raise PresetValidationError(\n                    \"Each template entry in 'provides.templates' must be a mapping\"\n                )\n            if \"type\" not in tmpl or \"name\" not in tmpl or \"file\" not in tmpl:\n                raise PresetValidationError(\n                    \"Template missing 'type', 'name', or 'file'\"\n                )\n\n            # 'name' feeds re.match and 'file' feeds os.path.normpath below;\n            # both raise a bare TypeError on a non-string, which is not a\n            # PresetValidationError and so escapes the callers that handle a\n            # malformed manifest. The sibling extension manifest already\n            # rejects a non-string command 'file' via\n            # relative_extension_path_violation().\n            for field in (\"type\", \"name\", \"file\"):\n                if not isinstance(tmpl[field], str):\n                    raise PresetValidationError(\n                        f\"Invalid template {field}: expected a string, \"\n                        f\"got {type(tmpl[field]).__name__}\"\n                    )\n\n            if tmpl[\"type\"] not in VALID_PRESET_TEMPLATE_TYPES:\n                raise PresetValidationError(","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/presets/__init__.py#L400-L436","documentation":"Error \"Template missing 'type', 'name', or 'file'\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/presets/__init__.py:418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add 'type', 'name', and 'file' to each template entry in the preset manifest."],"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-15T22:17:37.221Z"}