{"record":{"id":"838b7cc3e79032b8","repo":"github/spec-kit","slug":"priority-must-be-a-positive-integer-1-or-higher","errorCode":null,"errorMessage":"Priority must be a positive integer (1 or higher)","messagePattern":"Priority must be a positive integer \\(1 or higher\\)","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/extensions/__init__.py","lineNumber":2077,"sourceCode":"            source_dir: Path to extension directory\n            speckit_version: Current spec-kit version\n            register_commands: If True, register commands with AI agents\n            priority: Resolution priority (lower = higher precedence, default 10)\n            link_commands: If True, register rendered agent artifacts as\n                symlinks to a dev cache when supported by the OS.\n            force: If True and extension is already installed, remove it first\n                   before proceeding with installation\n\n        Returns:\n            Installed extension manifest\n\n        Raises:\n            ValidationError: If manifest is invalid or priority is invalid\n            CompatibilityError: If extension is incompatible\n        \"\"\"\n        # Validate priority\n        if priority < 1:\n            raise ValidationError(\"Priority must be a positive integer (1 or higher)\")\n\n        # Load and validate manifest\n        manifest_path = source_dir / \"extension.yml\"\n        manifest = ExtensionManifest(manifest_path)\n\n        # Check compatibility\n        self.check_compatibility(manifest, speckit_version)\n\n        # Check if already installed\n        if self.registry.is_installed(manifest.id):\n            if not force:\n                raise ExtensionError(\n                    f\"Extension '{manifest.id}' is already installed. \"\n                    f\"Use 'specify extension remove {manifest.id}' first, \"\n                    f\"or retry with --force to overwrite.\"\n                )\n\n        # Reject manifests that would shadow core commands or installed extensions.","sourceCodeStart":2059,"sourceCodeEnd":2095,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/extensions/__init__.py#L2059-L2095","documentation":"Error \"Priority must be a positive integer (1 or higher)\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/extensions/__init__.py:2077 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the priority value to a positive integer (1 or higher)."],"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"}