From 161a415274ac72ab87610e9bc5b08903192f0779 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:41:54 -0800 Subject: [PATCH] Update agent configuration --- .../scripts/create-release-packages.ps1 | 16 ++++++++-------- .../scripts/create-release-packages.sh | 18 +++++++++--------- AGENTS.md | 4 ++-- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- scripts/bash/update-agent-context.sh | 10 +++++++++- scripts/powershell/update-agent-context.ps1 | 10 ++++++++-- 7 files changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/scripts/create-release-packages.ps1 b/.github/workflows/scripts/create-release-packages.ps1 index 3bf74c92..f935dbe8 100644 --- a/.github/workflows/scripts/create-release-packages.ps1 +++ b/.github/workflows/scripts/create-release-packages.ps1 @@ -171,7 +171,7 @@ function Generate-Commands { 'md' { Set-Content -Path $outputFile -Value $body -NoNewline } - 'chatmode.md' { + 'agent.md' { Set-Content -Path $outputFile -Value $body -NoNewline } } @@ -180,16 +180,16 @@ function Generate-Commands { function Generate-CopilotPrompts { param( - [string]$ChatmodesDir, + [string]$AgentsDir, [string]$PromptsDir ) New-Item -ItemType Directory -Path $PromptsDir -Force | Out-Null - $chatmodeFiles = Get-ChildItem -Path "$ChatmodesDir/speckit.*.chatmode.md" -File -ErrorAction SilentlyContinue + $agentFiles = Get-ChildItem -Path "$AgentsDir/speckit.*.agent.md" -File -ErrorAction SilentlyContinue - foreach ($chatmodeFile in $chatmodeFiles) { - $basename = $chatmodeFile.Name -replace '\.chatmode\.md$', '' + foreach ($agentFile in $agentFiles) { + $basename = $agentFile.Name -replace '\.agent\.md$', '' $promptFile = Join-Path $PromptsDir "$basename.prompt.md" $content = @" @@ -278,12 +278,12 @@ function Build-Variant { } } 'copilot' { - $chatmodesDir = Join-Path $baseDir ".github/chatmodes" - Generate-Commands -Agent 'copilot' -Extension 'chatmode.md' -ArgFormat '$ARGUMENTS' -OutputDir $chatmodesDir -ScriptVariant $Script + $agentsDir = Join-Path $baseDir ".github/agents" + Generate-Commands -Agent 'copilot' -Extension 'agent.md' -ArgFormat '$ARGUMENTS' -OutputDir $agentsDir -ScriptVariant $Script # Generate companion prompt files $promptsDir = Join-Path $baseDir ".github/prompts" - Generate-CopilotPrompts -ChatmodesDir $chatmodesDir -PromptsDir $promptsDir + Generate-CopilotPrompts -AgentsDir $agentsDir -PromptsDir $promptsDir # Create VS Code workspace settings $vscodeDir = Join-Path $baseDir ".vscode" diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 49f2ddad..1b2e5326 100644 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -95,21 +95,21 @@ generate_commands() { { echo "description = \"$description\""; echo; echo "prompt = \"\"\""; echo "$body"; echo "\"\"\""; } > "$output_dir/speckit.$name.$ext" ;; md) echo "$body" > "$output_dir/speckit.$name.$ext" ;; - chatmode.md) + agent.md) echo "$body" > "$output_dir/speckit.$name.$ext" ;; esac done } generate_copilot_prompts() { - local chatmodes_dir=$1 prompts_dir=$2 + local agents_dir=$1 prompts_dir=$2 mkdir -p "$prompts_dir" - # Generate a .prompt.md file for each .chatmode.md file - for chatmode_file in "$chatmodes_dir"/speckit.*.chatmode.md; do - [[ -f "$chatmode_file" ]] || continue + # Generate a .prompt.md file for each .agent.md file + for agent_file in "$agents_dir"/speckit.*.agent.md; do + [[ -f "$agent_file" ]] || continue - local basename=$(basename "$chatmode_file" .chatmode.md) + local basename=$(basename "$agent_file" .agent.md) local prompt_file="$prompts_dir/${basename}.prompt.md" # Create prompt file with agent frontmatter @@ -166,10 +166,10 @@ build_variant() { generate_commands gemini toml "{{args}}" "$base_dir/.gemini/commands" "$script" [[ -f agent_templates/gemini/GEMINI.md ]] && cp agent_templates/gemini/GEMINI.md "$base_dir/GEMINI.md" ;; copilot) - mkdir -p "$base_dir/.github/chatmodes" - generate_commands copilot chatmode.md "\$ARGUMENTS" "$base_dir/.github/chatmodes" "$script" + mkdir -p "$base_dir/.github/agents" + generate_commands copilot agent.md "\$ARGUMENTS" "$base_dir/.github/agents" "$script" # Generate companion prompt files - generate_copilot_prompts "$base_dir/.github/chatmodes" "$base_dir/.github/prompts" + generate_copilot_prompts "$base_dir/.github/agents" "$base_dir/.github/prompts" # Create VS Code workspace settings mkdir -p "$base_dir/.vscode" [[ -f templates/vscode-settings.json ]] && cp templates/vscode-settings.json "$base_dir/.vscode/settings.json" diff --git a/AGENTS.md b/AGENTS.md index 55fd83e2..f7d956bd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,7 +33,7 @@ Specify supports multiple AI agents by generating agent-specific command files a |-------|-----------|---------|----------|-------------| | **Claude Code** | `.claude/commands/` | Markdown | `claude` | Anthropic's Claude Code CLI | | **Gemini CLI** | `.gemini/commands/` | TOML | `gemini` | Google's Gemini CLI | -| **GitHub Copilot** | `.github/chatmodes/` | Markdown | N/A (IDE-based) | GitHub Copilot in VS Code | +| **GitHub Copilot** | `.github/agents/` | Markdown | N/A (IDE-based) | GitHub Copilot in VS Code | | **Cursor** | `.cursor/commands/` | Markdown | `cursor-agent` | Cursor CLI | | **Qwen Code** | `.qwen/commands/` | TOML | `qwen` | Alibaba's Qwen Code CLI | | **opencode** | `.opencode/command/` | Markdown | `opencode` | opencode CLI | @@ -362,7 +362,7 @@ Command content with {SCRIPT} and {{args}} placeholders. - **CLI agents**: Usually `./commands/` - **IDE agents**: Follow IDE-specific patterns: - - Copilot: `.github/chatmodes/` + - Copilot: `.github/agents/` - Cursor: `.cursor/commands/` - Windsurf: `.windsurf/workflows/` diff --git a/CHANGELOG.md b/CHANGELOG.md index a467feac..7e7ee860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ All notable changes to the Specify CLI and templates are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.0.22] - 2025-11-07 + +- Support for VS Code/Copilot agents, and moving away from prompts to proper agents with hand-offs. +- Move to use `AGENTS.md` for Copilot workloads, since it's already supported out-of-the-box. + ## [0.0.21] - 2025-10-21 - Fixes [#975](https://github.com/github/spec-kit/issues/975) (thank you [@fgalarraga](https://github.com/fgalarraga)). diff --git a/pyproject.toml b/pyproject.toml index e4d2791b..fb972adc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "specify-cli" -version = "0.0.21" +version = "0.0.22" description = "Specify CLI, part of GitHub Spec Kit. A tool to bootstrap your projects for Spec-Driven Development (SDD)." requires-python = ">=3.11" dependencies = [ diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index e327869d..fcb525ac 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -61,7 +61,8 @@ AGENT_TYPE="${1:-}" # Agent-specific file paths CLAUDE_FILE="$REPO_ROOT/CLAUDE.md" GEMINI_FILE="$REPO_ROOT/GEMINI.md" -COPILOT_FILE="$REPO_ROOT/.github/chatmodes/copilot-instructions.md" +COPILOT_FILE="$REPO_ROOT/.github/agents/copilot-instructions.md" +COPILOT_AGENTS_FILE="$REPO_ROOT/AGENTS.md" CURSOR_FILE="$REPO_ROOT/.cursor/rules/specify-rules.mdc" QWEN_FILE="$REPO_ROOT/QWEN.md" AGENTS_FILE="$REPO_ROOT/AGENTS.md" @@ -587,6 +588,7 @@ update_specific_agent() { ;; copilot) update_agent_file "$COPILOT_FILE" "GitHub Copilot" + update_agent_file "$COPILOT_AGENTS_FILE" "GitHub Copilot (AGENTS.md)" ;; cursor-agent) update_agent_file "$CURSOR_FILE" "Cursor IDE" @@ -648,6 +650,12 @@ update_all_existing_agents() { found_agent=true fi + # Also update AGENTS.md for Copilot if the Copilot directory exists + if [[ -d "$REPO_ROOT/.github/agents" ]]; then + update_agent_file "$COPILOT_AGENTS_FILE" "GitHub Copilot (AGENTS.md)" + found_agent=true + fi + if [[ -f "$CURSOR_FILE" ]]; then update_agent_file "$CURSOR_FILE" "Cursor IDE" found_agent=true diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index d8fe34bf..a439cc43 100644 --- a/scripts/powershell/update-agent-context.ps1 +++ b/scripts/powershell/update-agent-context.ps1 @@ -46,7 +46,8 @@ $NEW_PLAN = $IMPL_PLAN # Agent file paths $CLAUDE_FILE = Join-Path $REPO_ROOT 'CLAUDE.md' $GEMINI_FILE = Join-Path $REPO_ROOT 'GEMINI.md' -$COPILOT_FILE = Join-Path $REPO_ROOT '.github/chatmodes/copilot-instructions.md' +$COPILOT_FILE = Join-Path $REPO_ROOT '.github/agents/copilot-instructions.md' +$COPILOT_AGENTS_FILE = Join-Path $REPO_ROOT 'AGENTS.md' $CURSOR_FILE = Join-Path $REPO_ROOT '.cursor/rules/specify-rules.mdc' $QWEN_FILE = Join-Path $REPO_ROOT 'QWEN.md' $AGENTS_FILE = Join-Path $REPO_ROOT 'AGENTS.md' @@ -370,7 +371,10 @@ function Update-SpecificAgent { switch ($Type) { 'claude' { Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code' } 'gemini' { Update-AgentFile -TargetFile $GEMINI_FILE -AgentName 'Gemini CLI' } - 'copilot' { Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot' } + 'copilot' { + Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot' + Update-AgentFile -TargetFile $COPILOT_AGENTS_FILE -AgentName 'GitHub Copilot (AGENTS.md)' + } 'cursor-agent' { Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE' } 'qwen' { Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code' } 'opencode' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'opencode' } @@ -392,6 +396,8 @@ function Update-AllExistingAgents { if (Test-Path $CLAUDE_FILE) { if (-not (Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code')) { $ok = $false }; $found = $true } if (Test-Path $GEMINI_FILE) { if (-not (Update-AgentFile -TargetFile $GEMINI_FILE -AgentName 'Gemini CLI')) { $ok = $false }; $found = $true } if (Test-Path $COPILOT_FILE) { if (-not (Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot')) { $ok = $false }; $found = $true } + # Also update AGENTS.md for Copilot if the Copilot directory exists + if (Test-Path (Join-Path $REPO_ROOT '.github/agents')) { if (-not (Update-AgentFile -TargetFile $COPILOT_AGENTS_FILE -AgentName 'GitHub Copilot (AGENTS.md)')) { $ok = $false }; $found = $true } if (Test-Path $CURSOR_FILE) { if (-not (Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE')) { $ok = $false }; $found = $true } if (Test-Path $QWEN_FILE) { if (-not (Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code')) { $ok = $false }; $found = $true } if (Test-Path $AGENTS_FILE) { if (-not (Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex/opencode')) { $ok = $false }; $found = $true }