Skip to content

Commit fd83104

Browse files
committed
fix: review comments
1 parent 8c2e277 commit fd83104

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
### Added
1414

15-
- **Agent Skills Installation**: New `--agent-skills` CLI option to install Prompt.MD templates as agent skills following [agentskills.io specification](https://agentskills.io/specification)
15+
- **Agent Skills Installation**: New `--ai-skills` CLI option to install Prompt.MD templates as agent skills following [agentskills.io specification](https://agentskills.io/specification)
1616
- Skills are installed to `.agent/skills/<skill-name>/SKILL.md` directory structure
1717
- Requires `--ai` flag to be specified
1818
- Converts all 9 spec-kit command templates (specify, plan, tasks, implement, analyze, clarify, constitution, checklist, taskstoissues) to properly formatted SKILL.md files

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The `specify` command supports the following options:
189189
| `--debug` | Flag | Enable detailed debug output for troubleshooting |
190190
| `--github-token` | Option | GitHub token for API requests (or set GH_TOKEN/GITHUB_TOKEN env variable) |
191191

192-
| `--agent-skills` | Flag | Install Prompt.MD templates as agent skills in `.agent/skills/` directory (requires `--ai`) |
192+
| `--ai-skills` | Flag | Install Prompt.MD templates as agent skills in `.agent/skills/` directory (requires `--ai`) |
193193
### Examples
194194

195195
```bash
@@ -240,10 +240,10 @@ specify init my-project --ai claude --debug
240240
specify init my-project --ai claude --github-token ghp_your_token_here
241241

242242
# Install agent skills with the project
243-
specify init my-project --ai claude --agent-skills
243+
specify init my-project --ai claude --ai-skills
244244

245245
# Initialize in current directory with agent skills
246-
specify init --here --ai gemini --agent-skills
246+
specify init --here --ai gemini --ai-skills
247247

248248
# Check system requirements
249249
specify check

src/specify_cli/__init__.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def ensure_executable_scripts(project_path: Path, tracker: StepTracker | None =
944944
console.print(f" - {f}")
945945

946946

947-
def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> bool:
947+
def install_ai_skills(project_path: Path, tracker: StepTracker = None) -> bool:
948948
"""
949949
Install Prompt.MD files from templates/commands/ as agent skills per agentskills.io spec.
950950
@@ -962,7 +962,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
962962

963963
if not templates_dir.exists():
964964
if tracker:
965-
tracker.error("agent-skills", "templates/commands not found")
965+
tracker.error("ai-skills", "templates/commands not found")
966966
else:
967967
console.print("[yellow]Warning: templates/commands directory not found, skipping skills installation[/yellow]")
968968
return False
@@ -971,7 +971,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
971971
command_files = list(templates_dir.glob("*.md"))
972972
if not command_files:
973973
if tracker:
974-
tracker.skip("agent-skills", "no command templates found")
974+
tracker.skip("ai-skills", "no command templates found")
975975
else:
976976
console.print("[yellow]No command templates found to install[/yellow]")
977977
return False
@@ -981,8 +981,8 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
981981
skills_dir.mkdir(parents=True, exist_ok=True)
982982

983983
if tracker:
984-
tracker.add("agent-skills", f"Install {len(command_files)} agent skills")
985-
tracker.start("agent-skills")
984+
tracker.add("ai-skills", f"Install {len(command_files)} agent skills")
985+
tracker.start("ai-skills")
986986

987987
installed_count = 0
988988
for command_file in command_files:
@@ -1039,7 +1039,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10391039
skill_content = f"""---
10401040
name: {skill_name}
10411041
description: {enhanced_desc}
1042-
compatibility: Requires git and spec-kit project structure with .specify/ directory
1042+
compatibility: Requires git and spec-kit project structure with .agent/skills/ directory
10431043
---
10441044
10451045
# Speckit {command_name.title()} Skill
@@ -1055,14 +1055,14 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10551055
installed_count += 1
10561056

10571057
except Exception as e:
1058-
console.print(f"[yellow]Warning: Failed to install skill {command_name}: {e}[/yellow]")
1058+
console.print(f"[yellow]Warning: Failed to install skill {command_file.stem}: {e}[/yellow]")
10591059
continue
10601060

10611061
if tracker:
10621062
if installed_count > 0:
1063-
tracker.complete("agent-skills", f"{installed_count} skills installed")
1063+
tracker.complete("ai-skills", f"{installed_count} skills installed")
10641064
else:
1065-
tracker.error("agent-skills", "no skills installed")
1065+
tracker.error("ai-skills", "no skills installed")
10661066
else:
10671067
if installed_count > 0:
10681068
console.print(f"[green]✓[/green] Installed {installed_count} agent skills to .agent/skills/")
@@ -1083,7 +1083,7 @@ def init(
10831083
skip_tls: bool = typer.Option(False, "--skip-tls", help="Skip SSL/TLS verification (not recommended)"),
10841084
debug: bool = typer.Option(False, "--debug", help="Show verbose diagnostic output for network and extraction failures"),
10851085
github_token: str = typer.Option(None, "--github-token", help="GitHub token to use for API requests (or set GH_TOKEN or GITHUB_TOKEN environment variable)"),
1086-
agent_skills: bool = typer.Option(False, "--agent-skills", help="Install Prompt.MD templates as agent skills (requires --ai)"),
1086+
ai_skills: bool = typer.Option(False, "--ai-skills", help="Install Prompt.MD templates as agent skills (requires --ai)"),
10871087
):
10881088
"""
10891089
Initialize a new Specify project from the latest template.
@@ -1124,10 +1124,10 @@ def init(
11241124
console.print("[red]Error:[/red] Must specify either a project name, use '.' for current directory, or use --here flag")
11251125
raise typer.Exit(1)
11261126

1127-
# Validate --agent-skills requires --ai
1128-
if agent_skills and not ai_assistant:
1129-
console.print("[red]Error:[/red] --agent-skills requires --ai to be specified")
1130-
console.print("[yellow]Usage:[/yellow] specify init <project> --ai <agent> --agent-skills")
1127+
# Validate --ai-skills requires --ai
1128+
if ai_skills and not ai_assistant:
1129+
console.print("[red]Error:[/red] --ai-skills requires --ai to be specified")
1130+
console.print("[yellow]Usage:[/yellow] specify init <project> --ai <agent> --ai-skills")
11311131
raise typer.Exit(1)
11321132

11331133

@@ -1266,8 +1266,8 @@ def init(
12661266
ensure_executable_scripts(project_path, tracker=tracker)
12671267

12681268
# Install agent skills if requested
1269-
if agent_skills:
1270-
install_agent_skills(project_path, tracker=tracker)
1269+
if ai_skills:
1270+
install_ai_skills(project_path, tracker=tracker)
12711271

12721272
if not no_git:
12731273
tracker.start("git")

0 commit comments

Comments
 (0)