{"record":{"id":"28ac0d15089d7742","repo":"github/spec-kit","slug":"invalid-provides-scripts-expected-a-list","errorCode":null,"errorMessage":"Invalid provides.scripts: expected a list","messagePattern":"Invalid provides\\.scripts: expected a list","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/extensions/__init__.py","lineNumber":388,"sourceCode":"\n        # Validate provides section\n        provides = self.data[\"provides\"]\n        if not isinstance(provides, dict):\n            raise ValidationError(\n                f\"Invalid provides: expected a mapping, got {type(provides).__name__}\"\n            )\n        commands = provides.get(\"commands\", [])\n        templates = provides.get(\"templates\", [])\n        scripts = provides.get(\"scripts\", [])\n        hooks = self.data.get(\"hooks\")\n        events = self.data.get(\"events\")\n\n        if \"commands\" in provides and not isinstance(commands, list):\n            raise ValidationError(\"Invalid provides.commands: expected a list\")\n        if \"templates\" in provides and not isinstance(templates, list):\n            raise ValidationError(\"Invalid provides.templates: expected a list\")\n        if \"scripts\" in provides and not isinstance(scripts, list):\n            raise ValidationError(\"Invalid provides.scripts: expected a list\")\n        if \"hooks\" in self.data and not isinstance(hooks, dict):\n            raise ValidationError(\"Invalid hooks: expected a mapping\")\n        if \"events\" in self.data:\n            from ..events import validate_events\n            validate_events(self.data)\n\n        has_commands = bool(commands)\n        has_hooks = bool(hooks)\n        has_events = bool(events)\n        has_templates = bool(templates)\n        has_scripts = bool(scripts)\n\n        if not has_commands and not has_hooks and not has_events and not has_templates and not has_scripts:\n            raise ValidationError(\n                \"Extension must provide at least one command, hook, or event \"\n                \"(or a declared template/script)\"\n            )\n","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/extensions/__init__.py#L370-L406","documentation":"If provides contains a scripts key, its value must be a list. Scripts are executable helpers the extension declares; the container-type check mirrors the commands and templates checks.","triggerScenarios":"`provides:\\n  scripts:` set to a string, mapping, or single unwrapped entry. isinstance(scripts, list) fails.","commonSituations":"Same single-item dash omission as commands, or pointing scripts at a directory string rather than a list of script entries.","solutions":["Use the list form: `scripts:\\n  - scripts/bash/helper.sh`.","Wrap each declared script in its own list entry.","Check a bundled extension that ships scripts for the canonical shape."],"exampleFix":"# before\nprovides:\n  scripts: scripts/bash/setup.sh\n\n# after\nprovides:\n  scripts:\n    - scripts/bash/setup.sh","handlingStrategy":"validation","validationCode":"def scripts_list_ok(data: dict) -> bool:\n    provides = data.get(\"provides\", {})\n    return \"scripts\" not in provides or isinstance(provides[\"scripts\"], list)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["scripts is a list of declared entries, not a directory path.","Omit the key entirely if the extension ships no scripts."],"tags":["extension-manifest","validation","yaml-structure"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}