@tdd_issue @tdd_issue_2555 Feature: skill add validates that included skills are registered As a developer I want `agents skill add` to fail immediately when included skills are not registered So that I get a clear error at registration time rather than a confusing failure later Background: Given a skill CLI test runner And the skill service is reset # ─────────────────────────────────────────────────────── # Validation failure — unregistered includes # ─────────────────────────────────────────────────────── Scenario: Add skill with unregistered include fails with clear error Given a skill config YAML that includes "local/missing-dep" at a temp path When I run skill CLI add with --config pointing to the YAML file Then the skill CLI command should abort And the skill CLI output should contain "not registered" And the skill CLI output should contain "local/missing-dep" Scenario: Add skill with multiple unregistered includes lists all missing skills Given a skill config YAML that includes "local/dep-a" and "local/dep-b" at a temp path When I run skill CLI add with --config pointing to the YAML file Then the skill CLI command should abort And the skill CLI output should contain "not registered" And the skill CLI output should contain "local/dep-a" And the skill CLI output should contain "local/dep-b" Scenario: Add skill with partially registered includes fails listing only missing Given the skill "local/dep-registered" is registered with tools And a skill config YAML that includes "local/dep-registered" and "local/dep-missing" at a temp path When I run skill CLI add with --config pointing to the YAML file Then the skill CLI command should abort And the skill CLI output should contain "local/dep-missing" And the skill CLI output should not contain "local/dep-registered" Scenario: Add skill with all includes registered succeeds Given the skill "local/base-tools" is registered with tools And a skill config YAML that includes "local/base-tools" at a temp path When I run skill CLI add with --config pointing to the YAML file Then the skill CLI add should succeed And the skill CLI output should contain "Skill Registered" Scenario: Update skill with unregistered include also fails Given the skill "local/composable" is already registered And a skill config YAML for "local/composable" that includes "local/not-there" at a temp path When I run skill CLI add with --config and --update pointing to the YAML file Then the skill CLI command should abort And the skill CLI output should contain "not registered" And the skill CLI output should contain "local/not-there" Scenario: Service add_skill raises ValueError for unregistered include Then adding a skill with unregistered include via service raises ValueError Scenario: Service add_skill raises ValueError listing all missing includes Then adding a skill with two unregistered includes via service raises ValueError listing both Scenario: Service add_skill with update=True also validates includes Given the skill "local/existing-skill" is already registered Then updating "local/existing-skill" with unregistered include via service raises ValueError