{"record":{"id":"6d9e944773230c92","repo":"github/spec-kit","slug":"command-entry-missing-name-or-file","errorCode":null,"errorMessage":"Command entry missing 'name' or 'file'","messagePattern":"Command entry missing 'name' or 'file'","errorType":"validation","errorClass":"IntegrationDescriptorError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/integrations/catalog.py","lineNumber":790,"sourceCode":"        if \"commands\" in provides and not isinstance(commands, list):\n            raise IntegrationDescriptorError(\n                \"Invalid provides.commands: expected a list\"\n            )\n        if \"scripts\" in provides and not isinstance(scripts, list):\n            raise IntegrationDescriptorError(\n                \"Invalid provides.scripts: expected a list\"\n            )\n        if not commands and not scripts:\n            raise IntegrationDescriptorError(\n                \"Integration must provide at least one command or script\"\n            )\n        for cmd in commands:\n            if not isinstance(cmd, dict):\n                raise IntegrationDescriptorError(\n                    \"Each command entry must be a mapping\"\n                )\n            if \"name\" not in cmd or \"file\" not in cmd:\n                raise IntegrationDescriptorError(\n                    \"Command entry missing 'name' or 'file'\"\n                )\n            cmd_name = cmd[\"name\"]\n            cmd_file = cmd[\"file\"]\n            if not isinstance(cmd_name, str) or not cmd_name.strip():\n                raise IntegrationDescriptorError(\n                    \"Command entry 'name' must be a non-empty string\"\n                )\n            if not isinstance(cmd_file, str) or not cmd_file.strip():\n                raise IntegrationDescriptorError(\n                    \"Command entry 'file' must be a non-empty string\"\n                )\n            if os.path.isabs(cmd_file) or \"..\" in Path(cmd_file).parts or Path(cmd_file).drive or Path(cmd_file).anchor:\n                raise IntegrationDescriptorError(\n                    f\"Command entry 'file' must be a relative path without '..': {cmd_file}\"\n                )\n        for script_entry in scripts:\n            if not isinstance(script_entry, str) or not script_entry.strip():","sourceCodeStart":772,"sourceCodeEnd":808,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/integrations/catalog.py#L772-L808","documentation":"Raised by IntegrationDescriptor._validate() (src/specify_cli/integrations/catalog.py:790) when a provides.commands entry (a mapping) is missing the required 'name' or 'file' key. These two keys are the minimum contract for a command entry; later code reads cmd[\"name\"] and cmd[\"file\"] directly, so absence is fatal.","triggerScenarios":"A command mapping like '- name: plan' (no 'file') or '- file: commands/plan.md' (no 'name') inside provides.commands; the membership check 'name' not in cmd or 'file' not in cmd triggers the error.","commonSituations":"Typos in key names (e.g. 'filename:' instead of 'file:'); partial copy-paste of an existing entry; extra keys present but one required key forgotten.","solutions":["Add the missing 'name' and/or 'file' key to each command entry flagged by validation.","Check spelling of keys — only 'name' and 'file' are required; extra keys are ignored but cannot substitute.","Reload the descriptor to confirm."],"exampleFix":"# before\nprovides:\n  commands:\n    - name: plan\n\n# after\nprovides:\n  commands:\n    - name: plan\n      file: commands/plan.md","handlingStrategy":"type-guard","validationCode":"def missing_keys(commands):\n    return [i for i, c in enumerate(commands)\n            if not (isinstance(c, dict) and \"name\" in c and \"file\" in c)]","typeGuard":"def is_complete_command(entry) -> bool:\n    return (\n        isinstance(entry, dict)\n        and isinstance(entry.get(\"name\"), str)\n        and isinstance(entry.get(\"file\"), str)\n    )","tryCatchPattern":null,"preventionTips":["Every command entry needs exactly 'name' and 'file' at minimum.","Watch for typos like 'filename' or 'path' instead of 'file'.","Validate entries programmatically before submitting the descriptor."],"tags":["yaml","validation","integration-descriptor","spec-kit"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}