Skip to content

Commit 13f53ec

Browse files
committed
fix: address PR review round 2
- Remove unused SKILL_DESCRIPTIONS dict from base.py (dead code after switching to template descriptions for ZIP parity) - Narrow YAML parse catch from Exception to yaml.YAMLError - Remove unused shutil import from test_integration_kimi.py - Remove unused _REGISTRAR_EXEMPT class attr from test_registry.py - Reword --ai-commands-dir deprecation to be actionable - Update generic validation error to mention both --ai and --integration
1 parent 06f6ce6 commit 13f53ec

4 files changed

Lines changed: 9 additions & 23 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,8 +2013,8 @@ def init(
20132013
)
20142014
if ai_commands_dir and resolved_integration.key != "generic":
20152015
console.print(
2016-
"[dim]Note: --ai-commands-dir is deprecated with --integration; "
2017-
"use --integration generic with parsed options instead.[/dim]"
2016+
"[dim]Note: --ai-commands-dir is only supported with the generic integration; "
2017+
"omit this flag unless you are using --integration generic (or --ai generic).[/dim]"
20182018
)
20192019

20202020
if project_name == ".":
@@ -2109,11 +2109,15 @@ def init(
21092109
# preserves a clear CLI error with example usage.
21102110
if selected_ai == "generic":
21112111
if not ai_commands_dir:
2112-
console.print("[red]Error:[/red] --ai-commands-dir is required when using --ai generic")
2112+
console.print("[red]Error:[/red] --ai-commands-dir is required when using --ai generic or --integration generic")
21132113
console.print("[dim]Example: specify init my-project --ai generic --ai-commands-dir .myagent/commands/[/dim]")
21142114
raise typer.Exit(1)
21152115
elif ai_commands_dir and not use_integration:
2116-
console.print(f"[red]Error:[/red] --ai-commands-dir can only be used with --ai generic (not '{selected_ai}')")
2116+
console.print(
2117+
f"[red]Error:[/red] --ai-commands-dir can only be used with the "
2118+
f"'generic' integration via --ai generic or --integration generic "
2119+
f"(not '{selected_ai}')"
2120+
)
21172121
raise typer.Exit(1)
21182122

21192123
current_dir = Path.cwd()

src/specify_cli/integrations/base.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -641,20 +641,6 @@ def setup(
641641
# SkillsIntegration — skills-format agents (Codex, Kimi, Agy)
642642
# ---------------------------------------------------------------------------
643643

644-
# Enhanced descriptions for each spec-kit command skill.
645-
# Shared by all SkillsIntegration subclasses.
646-
SKILL_DESCRIPTIONS: dict[str, str] = {
647-
"specify": "Create or update feature specifications from natural language descriptions. Use when starting new features or refining requirements. Generates spec.md with user stories, functional requirements, and acceptance criteria following spec-driven development methodology.",
648-
"plan": "Generate technical implementation plans from feature specifications. Use after creating a spec to define architecture, tech stack, and implementation phases. Creates plan.md with detailed technical design.",
649-
"tasks": "Break down implementation plans into actionable task lists. Use after planning to create a structured task breakdown. Generates tasks.md with ordered, dependency-aware tasks.",
650-
"implement": "Execute all tasks from the task breakdown to build the feature. Use after task generation to systematically implement the planned solution following TDD approach where applicable.",
651-
"analyze": "Perform cross-artifact consistency analysis across spec.md, plan.md, and tasks.md. Use after task generation to identify gaps, duplications, and inconsistencies before implementation.",
652-
"clarify": "Structured clarification workflow for underspecified requirements. Use before planning to resolve ambiguities through coverage-based questioning. Records answers in spec clarifications section.",
653-
"constitution": "Create or update project governing principles and development guidelines. Use at project start to establish code quality, testing standards, and architectural constraints that guide all development.",
654-
"checklist": "Generate custom quality checklists for validating requirements completeness and clarity. Use to create unit tests for English that ensure spec quality before implementation.",
655-
"taskstoissues": "Convert tasks from tasks.md into GitHub issues. Use after task breakdown to track work items in GitHub project management.",
656-
}
657-
658644

659645
class SkillsIntegration(IntegrationBase):
660646
"""Concrete base for integrations that install commands as agent skills.
@@ -750,7 +736,7 @@ def setup(
750736
fm = yaml.safe_load(parts[1])
751737
if isinstance(fm, dict):
752738
frontmatter = fm
753-
except Exception:
739+
except yaml.YAMLError:
754740
pass
755741

756742
# Process body through the standard template pipeline

tests/integrations/test_integration_kimi.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Tests for KimiIntegration — skills integration with legacy migration."""
22

3-
import shutil
4-
53
from specify_cli.integrations import get_integration
64
from specify_cli.integrations.kimi import _migrate_legacy_kimi_dotted_skills
75
from specify_cli.integrations.manifest import IntegrationManifest

tests/integrations/test_registry.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ class TestRegistrarKeyAlignment:
7171
output path comes from ``--commands-dir`` at runtime.
7272
"""
7373

74-
_REGISTRAR_EXEMPT = {"generic"}
75-
7674
@pytest.mark.parametrize(
7775
"key",
7876
[k for k in ALL_INTEGRATION_KEYS if k != "generic"],

0 commit comments

Comments
 (0)