Skip to content

Commit 0d29f93

Browse files
committed
fix: review comments
1 parent 2f5f209 commit 0d29f93

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

CHANGELOG.md

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

127127
### Added
128128

129-
- **Agent Skills Installation**: New `--agent-skills` CLI option to install Prompt.MD templates as agent skills following [agentskills.io specification](https://agentskills.io/specification)
129+
- **Agent Skills Installation**: New `--ai-skills` CLI option to install Prompt.MD templates as agent skills following [agentskills.io specification](https://agentskills.io/specification)
130130
- Skills are installed to `.agent/skills/<skill-name>/SKILL.md` directory structure
131131
- Requires `--ai` flag to be specified
132132
- 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
@@ -979,7 +979,7 @@ def ensure_constitution_from_template(project_path: Path, tracker: StepTracker |
979979
console.print(f"[yellow]Warning: Could not initialize constitution: {e}[/yellow]")
980980

981981

982-
def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> bool:
982+
def install_ai_skills(project_path: Path, tracker: StepTracker = None) -> bool:
983983
"""
984984
Install Prompt.MD files from templates/commands/ as agent skills per agentskills.io spec.
985985
@@ -997,7 +997,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
997997

998998
if not templates_dir.exists():
999999
if tracker:
1000-
tracker.error("agent-skills", "templates/commands not found")
1000+
tracker.error("ai-skills", "templates/commands not found")
10011001
else:
10021002
console.print("[yellow]Warning: templates/commands directory not found, skipping skills installation[/yellow]")
10031003
return False
@@ -1006,7 +1006,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10061006
command_files = list(templates_dir.glob("*.md"))
10071007
if not command_files:
10081008
if tracker:
1009-
tracker.skip("agent-skills", "no command templates found")
1009+
tracker.skip("ai-skills", "no command templates found")
10101010
else:
10111011
console.print("[yellow]No command templates found to install[/yellow]")
10121012
return False
@@ -1016,8 +1016,8 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10161016
skills_dir.mkdir(parents=True, exist_ok=True)
10171017

10181018
if tracker:
1019-
tracker.add("agent-skills", f"Install {len(command_files)} agent skills")
1020-
tracker.start("agent-skills")
1019+
tracker.add("ai-skills", f"Install {len(command_files)} agent skills")
1020+
tracker.start("ai-skills")
10211021

10221022
installed_count = 0
10231023
for command_file in command_files:
@@ -1074,7 +1074,7 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10741074
skill_content = f"""---
10751075
name: {skill_name}
10761076
description: {enhanced_desc}
1077-
compatibility: Requires git and spec-kit project structure with .specify/ directory
1077+
compatibility: Requires git and spec-kit project structure with .agent/skills/ directory
10781078
---
10791079
10801080
# Speckit {command_name.title()} Skill
@@ -1090,14 +1090,14 @@ def install_agent_skills(project_path: Path, tracker: StepTracker = None) -> boo
10901090
installed_count += 1
10911091

10921092
except Exception as e:
1093-
console.print(f"[yellow]Warning: Failed to install skill {command_name}: {e}[/yellow]")
1093+
console.print(f"[yellow]Warning: Failed to install skill {command_file.stem}: {e}[/yellow]")
10941094
continue
10951095

10961096
if tracker:
10971097
if installed_count > 0:
1098-
tracker.complete("agent-skills", f"{installed_count} skills installed")
1098+
tracker.complete("ai-skills", f"{installed_count} skills installed")
10991099
else:
1100-
tracker.error("agent-skills", "no skills installed")
1100+
tracker.error("ai-skills", "no skills installed")
11011101
else:
11021102
if installed_count > 0:
11031103
console.print(f"[green]✓[/green] Installed {installed_count} agent skills to .agent/skills/")
@@ -1118,7 +1118,7 @@ def init(
11181118
skip_tls: bool = typer.Option(False, "--skip-tls", help="Skip SSL/TLS verification (not recommended)"),
11191119
debug: bool = typer.Option(False, "--debug", help="Show verbose diagnostic output for network and extraction failures"),
11201120
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)"),
1121-
agent_skills: bool = typer.Option(False, "--agent-skills", help="Install Prompt.MD templates as agent skills (requires --ai)"),
1121+
ai_skills: bool = typer.Option(False, "--ai-skills", help="Install Prompt.MD templates as agent skills (requires --ai)"),
11221122
):
11231123
"""
11241124
Initialize a new Specify project from the latest template.
@@ -1159,10 +1159,10 @@ def init(
11591159
console.print("[red]Error:[/red] Must specify either a project name, use '.' for current directory, or use --here flag")
11601160
raise typer.Exit(1)
11611161

1162-
# Validate --agent-skills requires --ai
1163-
if agent_skills and not ai_assistant:
1164-
console.print("[red]Error:[/red] --agent-skills requires --ai to be specified")
1165-
console.print("[yellow]Usage:[/yellow] specify init <project> --ai <agent> --agent-skills")
1162+
# Validate --ai-skills requires --ai
1163+
if ai_skills and not ai_assistant:
1164+
console.print("[red]Error:[/red] --ai-skills requires --ai to be specified")
1165+
console.print("[yellow]Usage:[/yellow] specify init <project> --ai <agent> --ai-skills")
11661166
raise typer.Exit(1)
11671167

11681168

@@ -1304,8 +1304,8 @@ def init(
13041304
ensure_constitution_from_template(project_path, tracker=tracker)
13051305

13061306
# Install agent skills if requested
1307-
if agent_skills:
1308-
install_agent_skills(project_path, tracker=tracker)
1307+
if ai_skills:
1308+
install_ai_skills(project_path, tracker=tracker)
13091309

13101310
if not no_git:
13111311
tracker.start("git")

0 commit comments

Comments
 (0)