{"record":{"id":"807c1ad6f4a4c379","repo":"github/spec-kit","slug":"type-self-name-config-is-not-set","errorCode":null,"errorMessage":"{type(self).__name__}.config is not set.","messagePattern":"(.+?)\\.config is not set\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/integrations/base.py","lineNumber":1598,"sourceCode":"            return None\n        args = [self._resolve_executable(), \"-p\", prompt]\n        self._apply_extra_args_env_var(args)\n        if model:\n            args.extend([\"--model\", model])\n        if output_json:\n            args.extend([\"--output-format\", \"json\"])\n        return args\n\n    def skills_dest(self, project_root: Path) -> Path:\n        \"\"\"Return the absolute path to the skills output directory.\n\n        Derived from ``config[\"folder\"]`` and the configured\n        ``commands_subdir`` (defaults to ``\"skills\"``).\n\n        Raises ``ValueError`` when ``config`` or ``folder`` is missing.\n        \"\"\"\n        if not self.config:\n            raise ValueError(f\"{type(self).__name__}.config is not set.\")\n        folder = self.config.get(\"folder\")\n        if not folder:\n            raise ValueError(\n                f\"{type(self).__name__}.config is missing required 'folder' entry.\"\n            )\n        subdir = self.config.get(\"commands_subdir\", \"skills\")\n        return project_root / folder / subdir\n\n    def build_command_invocation(self, command_name: str, args: str = \"\") -> str:\n        \"\"\"Build the agent's native invocation for a hyphenated skill name.\"\"\"\n        stem = command_name\n        if stem.startswith(\"speckit.\"):\n            stem = stem[len(\"speckit.\"):]\n\n        prefix = \"$\" if is_dollar_skills_agent(self.key, True) else \"/\"\n        invocation = prefix + \"speckit-\" + stem.replace(\".\", \"-\")\n        if args:\n            invocation = f\"{invocation} {args}\"","sourceCodeStart":1580,"sourceCodeEnd":1616,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/integrations/base.py#L1580-L1616","documentation":"SkillsIntegration.skills_dest() derives the skills output directory from config['folder'] and config['commands_subdir'] (default 'skills'). If the subclass's config class attribute is missing, None, or empty, this ValueError fires, naming the offending class. It is an authoring error in the integration class, not a user environment problem.","triggerScenarios":"Defining a SkillsIntegration subclass without a config dict, or with config = None / {} (falsy); instantiating an abstract/base skills integration directly.","commonSituations":"Writing a new skills-based agent integration and forgetting the config class attribute; refactoring that renames or deletes config; tests instantiating a partially-configured subclass.","solutions":["Add a config class attribute to the subclass with at least name, folder, commands_subdir, install_url, requires_cli.","If you meant to use a ready integration, instantiate the built-in one instead of the base class.","Add a unit test asserting cls.config is truthy for every registered integration."],"exampleFix":"# before\nclass MyAgentIntegration(SkillsIntegration):\n    key = \"my-agent\"\n    # config missing\n# after\nclass MyAgentIntegration(SkillsIntegration):\n    key = \"my-agent\"\n    config = {\n        \"name\": \"My Agent\",\n        \"folder\": \".my-agent/\",\n        \"commands_subdir\": \"skills\",\n        \"install_url\": None,\n        \"requires_cli\": False,\n    }","handlingStrategy":"type-guard","validationCode":"def integration_config_ok(integration) -> bool:\n    return bool(getattr(integration, \"config\", None))","typeGuard":"from specify_cli.integrations.base import SkillsIntegration\n\ndef has_skills_config(integration: SkillsIntegration) -> bool:\n    return bool(integration.config)","tryCatchPattern":"try:\n    dest = integration.skills_dest(project_root)\nexcept ValueError as exc:\n    if \".config is not set\" in str(exc):\n        raise SystemExit(f\"{type(integration).__name__} needs a config class attribute\") from None\n    raise","preventionTips":["Always declare config (name, folder, commands_subdir, install_url, requires_cli) on integration subclasses.","Add a registry test asserting every registered integration has a truthy config.","Use the scaffold tool or a known-good integration as the template for new classes."],"tags":["integrations","configuration","developer-error","skills"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}