From d1482a560cc97bbf10e455629f2ede1a422f31ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20R=C3=B6=C3=9Fner?= Date: Tue, 17 Mar 2026 11:34:35 +0100 Subject: [PATCH 1/2] #332: Support Jetbrains's Junie CLI Agentic AI. Add Junie CLI support across all relevant scripts, configurations, and tests. --- .devcontainer/post-create.sh | 4 ++ .../scripts/create-github-release.sh | 2 + .../scripts/create-release-packages.ps1 | 4 +- .../scripts/create-release-packages.sh | 5 +- AGENTS.md | 2 + README.md | 8 ++- scripts/bash/update-agent-context.sh | 13 +++-- scripts/powershell/update-agent-context.ps1 | 11 +++-- src/specify_cli/__init__.py | 7 +++ src/specify_cli/agents.py | 6 +++ tests/test_agent_config_consistency.py | 49 +++++++++++++++++++ 11 files changed, 98 insertions(+), 13 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index d7d3da5884..82aa9dfda0 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -89,6 +89,10 @@ echo -e "\nšŸ¤– Installing CodeBuddy CLI..." run_command "npm install -g @tencent-ai/codebuddy-code@latest" echo "āœ… Done" +echo -e "\nšŸ¤– Installing Junie CLI..." +run_command "npm install -g @jetbrains/junie-cli@latest" +echo "āœ… Done" + # Installing UV (Python package manager) echo -e "\nšŸ Installing UV - Python Package Manager..." run_command "pipx install uv" diff --git a/.github/workflows/scripts/create-github-release.sh b/.github/workflows/scripts/create-github-release.sh index 864e0011ba..996ad6ef9a 100755 --- a/.github/workflows/scripts/create-github-release.sh +++ b/.github/workflows/scripts/create-github-release.sh @@ -56,6 +56,8 @@ gh release create "$VERSION" \ .genreleases/spec-kit-template-bob-ps-"$VERSION".zip \ .genreleases/spec-kit-template-vibe-sh-"$VERSION".zip \ .genreleases/spec-kit-template-vibe-ps-"$VERSION".zip \ + .genreleases/spec-kit-template-junie-sh-"$VERSION".zip \ + .genreleases/spec-kit-template-junie-ps-"$VERSION".zip \ .genreleases/spec-kit-template-kimi-sh-"$VERSION".zip \ .genreleases/spec-kit-template-kimi-ps-"$VERSION".zip \ .genreleases/spec-kit-template-generic-sh-"$VERSION".zip \ diff --git a/.github/workflows/scripts/create-release-packages.ps1 b/.github/workflows/scripts/create-release-packages.ps1 index 60ad3da97c..ca0079a37a 100644 --- a/.github/workflows/scripts/create-release-packages.ps1 +++ b/.github/workflows/scripts/create-release-packages.ps1 @@ -14,7 +14,7 @@ .PARAMETER Agents Comma or space separated subset of agents to build (default: all) - Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, shai, tabnine, agy, vibe, kimi, generic + Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, junie, shai, tabnine, agy, vibe, kimi, generic .PARAMETER Scripts Comma or space separated subset of script types to build (default: both) @@ -470,7 +470,7 @@ function Build-Variant { } # Define all agents and scripts -$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'generic') +$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'junie', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'generic') $AllScripts = @('sh', 'ps') function Normalize-List { diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 620da02337..0330b5ef81 100755 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -288,6 +288,9 @@ build_variant() { vibe) mkdir -p "$base_dir/.vibe/prompts" generate_commands vibe md "\$ARGUMENTS" "$base_dir/.vibe/prompts" "$script" ;; + junie) + mkdir -p "$base_dir/.junie/commands" + generate_commands junie md "\$ARGUMENTS" "$base_dir/.junie/commands" "$script" ;; kimi) mkdir -p "$base_dir/.kimi/skills" create_kimi_skills "$base_dir/.kimi/skills" "$script" ;; @@ -300,7 +303,7 @@ build_variant() { } # Determine agent list -ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi generic) +ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli junie kimi generic) ALL_SCRIPTS=(sh ps) norm_list() { diff --git a/AGENTS.md b/AGENTS.md index 8f0742eb8f..51b7a78dee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -46,6 +46,7 @@ Specify supports multiple AI agents by generating agent-specific command files a | **Tabnine CLI** | `.tabnine/agent/commands/` | TOML | `tabnine` | Tabnine CLI | | **Kimi Code** | `.kimi/skills/` | Markdown | `kimi` | Kimi Code CLI (Moonshot AI) | | **IBM Bob** | `.bob/commands/` | Markdown | N/A (IDE-based) | IBM Bob IDE | +| **Junie CLI** | `.junie/commands/` | Markdown | `junie` | JetBrains' Junie CLI | | **Generic** | User-specified via `--ai-commands-dir` | Markdown | N/A | Bring your own agent | ### Step-by-Step Integration Guide @@ -322,6 +323,7 @@ Require a command-line tool to be installed: - **SHAI**: `shai` CLI - **Tabnine CLI**: `tabnine` CLI - **Kimi Code**: `kimi` CLI +- **Junie CLI**: `junie` CLI ### IDE-Based Agents diff --git a/README.md b/README.md index 006d552270..41a491dba8 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,7 @@ See Spec-Driven Development in action across different scenarios with these comm | [SHAI (OVHcloud)](https://github.com/ovh/shai) | āœ… | | | [Tabnine CLI](https://docs.tabnine.com/main/getting-started/tabnine-cli) | āœ… | | | [Mistral Vibe](https://github.com/mistralai/mistral-vibe) | āœ… | | +| [Junie CLI](https://junie.jetbrains.com/) | āœ… | | | [Kimi Code](https://code.kimi.com/) | āœ… | | | [Windsurf](https://windsurf.com/) | āœ… | | | [Antigravity (agy)](https://antigravity.google/) | āœ… | Requires `--ai-skills` | @@ -195,14 +196,14 @@ The `specify` command supports the following options: | Command | Description | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `init` | Initialize a new Specify project from the latest template | -| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `kiro-cli`, `shai`, `qodercli`, `vibe`, `kimi`) | +| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `kiro-cli`, `shai`, `qodercli`, `vibe`, `kimi`, `junie`) | ### `specify init` Arguments & Options | Argument/Option | Type | Description | | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `` | Argument | Name for your new project directory (optional if using `--here`, or use `.` for current directory) | -| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `kiro-cli` (`kiro` alias), `agy`, `bob`, `qodercli`, `vibe`, `kimi`, or `generic` (requires `--ai-commands-dir`) | +| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `kiro-cli` (`kiro` alias), `agy`, `bob`, `qodercli`, `vibe`, `kimi`, `junie`, or `generic` (requires `--ai-commands-dir`) | | `--ai-commands-dir` | Option | Directory for agent command files (required with `--ai generic`, e.g. `.myagent/commands/`) | | `--script` | Option | Script variant to use: `sh` (bash/zsh) or `ps` (PowerShell) | | `--ignore-agent-tools` | Flag | Skip checks for AI agent tools like Claude Code | @@ -244,6 +245,9 @@ specify init my-project --ai shai # Initialize with Mistral Vibe support specify init my-project --ai vibe +# Initialize with Junie CLI support +specify init my-project --ai junie + # Initialize with IBM Bob support specify init my-project --ai bob diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index e0f2854846..2d062197a3 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -30,12 +30,12 @@ # # 5. Multi-Agent Support # - Handles agent-specific file paths and naming conventions -# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Tabnine CLI, Kiro CLI, Mistral Vibe, Kimi Code, Antigravity or Generic +# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Tabnine CLI, Kiro CLI, Mistral Vibe, Kimi Code, Junie CLI, Antigravity or Generic # - Can update single agents or all existing agent files # - Creates default Claude file if no agent files exist # # Usage: ./update-agent-context.sh [agent_type] -# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic +# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|junie|generic # Leave empty to update all existing agent files set -e @@ -83,6 +83,7 @@ AGY_FILE="$REPO_ROOT/.agent/rules/specify-rules.md" BOB_FILE="$AGENTS_FILE" VIBE_FILE="$REPO_ROOT/.vibe/agents/specify-agents.md" KIMI_FILE="$REPO_ROOT/KIMI.md" +JUNIE_FILE="$REPO_ROOT/.junie/guidelines.md" # Template file TEMPLATE_FILE="$REPO_ROOT/.specify/templates/agent-file-template.md" @@ -675,12 +676,15 @@ update_specific_agent() { kimi) update_agent_file "$KIMI_FILE" "Kimi Code" || return 1 ;; + junie) + update_agent_file "$JUNIE_FILE" "Junie CLI" || return 1 + ;; generic) log_info "Generic agent: no predefined context file. Use the agent-specific update script for your agent." ;; *) log_error "Unknown agent type '$agent_type'" - log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic" + log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|junie|generic" exit 1 ;; esac @@ -730,6 +734,7 @@ update_all_existing_agents() { update_if_new "$AGY_FILE" "Antigravity" update_if_new "$VIBE_FILE" "Mistral Vibe" update_if_new "$KIMI_FILE" "Kimi Code" + update_if_new "$JUNIE_FILE" "Junie CLI" # If no agent files exist, create a default Claude file if [[ "$found_agent" == false ]]; then @@ -754,7 +759,7 @@ print_summary() { fi echo - log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic]" + log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|junie|generic]" } #============================================================================== diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index 30e1e0e693..cc7fb813d6 100644 --- a/scripts/powershell/update-agent-context.ps1 +++ b/scripts/powershell/update-agent-context.ps1 @@ -9,7 +9,7 @@ Mirrors the behavior of scripts/bash/update-agent-context.sh: 2. Plan Data Extraction 3. Agent File Management (create from template or update existing) 4. Content Generation (technology stack, recent changes, timestamp) - 5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, tabnine, kiro-cli, agy, bob, vibe, qodercli, kimi, generic) + 5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, tabnine, kiro-cli, agy, bob, vibe, qodercli, kimi, junie, generic) .PARAMETER AgentType Optional agent key to update a single agent. If omitted, updates all existing agent files (creating a default Claude file if none exist). @@ -25,7 +25,7 @@ Relies on common helper functions in common.ps1 #> param( [Parameter(Position=0)] - [ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','tabnine','kiro-cli','agy','bob','qodercli','vibe','kimi','generic')] + [ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','tabnine','kiro-cli','agy','bob','qodercli','vibe','kimi','junie','generic')] [string]$AgentType ) @@ -64,6 +64,7 @@ $AGY_FILE = Join-Path $REPO_ROOT '.agent/rules/specify-rules.md' $BOB_FILE = Join-Path $REPO_ROOT 'AGENTS.md' $VIBE_FILE = Join-Path $REPO_ROOT '.vibe/agents/specify-agents.md' $KIMI_FILE = Join-Path $REPO_ROOT 'KIMI.md' +$JUNIE_FILE = Join-Path $REPO_ROOT '.junie/guidelines.md' $TEMPLATE_FILE = Join-Path $REPO_ROOT '.specify/templates/agent-file-template.md' @@ -408,8 +409,9 @@ function Update-SpecificAgent { 'bob' { Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob' } 'vibe' { Update-AgentFile -TargetFile $VIBE_FILE -AgentName 'Mistral Vibe' } 'kimi' { Update-AgentFile -TargetFile $KIMI_FILE -AgentName 'Kimi Code' } + 'junie' { Update-AgentFile -TargetFile $JUNIE_FILE -AgentName 'Junie CLI' } 'generic' { Write-Info 'Generic agent: no predefined context file. Use the agent-specific update script for your agent.' } - default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|generic'; return $false } + default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|junie|generic'; return $false } } } @@ -435,6 +437,7 @@ function Update-AllExistingAgents { if (Test-Path $BOB_FILE) { if (-not (Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob')) { $ok = $false }; $found = $true } if (Test-Path $VIBE_FILE) { if (-not (Update-AgentFile -TargetFile $VIBE_FILE -AgentName 'Mistral Vibe')) { $ok = $false }; $found = $true } if (Test-Path $KIMI_FILE) { if (-not (Update-AgentFile -TargetFile $KIMI_FILE -AgentName 'Kimi Code')) { $ok = $false }; $found = $true } + if (Test-Path $JUNIE_FILE) { if (-not (Update-AgentFile -TargetFile $JUNIE_FILE -AgentName 'Junie CLI')) { $ok = $false }; $found = $true } if (-not $found) { Write-Info 'No existing agent files found, creating default Claude file...' if (-not (Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code')) { $ok = $false } @@ -449,7 +452,7 @@ function Print-Summary { if ($NEW_FRAMEWORK) { Write-Host " - Added framework: $NEW_FRAMEWORK" } if ($NEW_DB -and $NEW_DB -ne 'N/A') { Write-Host " - Added database: $NEW_DB" } Write-Host '' - Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|generic]' + Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|junie|generic]' } function Main { diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index 8509db7efe..cbf62a9b6b 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -272,6 +272,13 @@ def _format_rate_limit_error(status_code: int, headers: httpx.Headers, url: str) "install_url": "https://code.kimi.com/", "requires_cli": True, }, + "junie": { + "name": "Junie CLI", + "folder": ".junie/", + "commands_subdir": "commands", + "install_url": "https://junie.jetbrains.com/", + "requires_cli": True, + }, "generic": { "name": "Generic (bring your own agent)", "folder": None, # Set dynamically via --ai-commands-dir diff --git a/src/specify_cli/agents.py b/src/specify_cli/agents.py index 9927daee8c..d871cf5281 100644 --- a/src/specify_cli/agents.py +++ b/src/specify_cli/agents.py @@ -135,6 +135,12 @@ class CommandRegistrar: "format": "markdown", "args": "$ARGUMENTS", "extension": "/SKILL.md" + }, + "junie": { + "dir": ".junie/commands", + "format": "markdown", + "args": "$ARGUMENTS", + "extension": ".md" } } diff --git a/tests/test_agent_config_consistency.py b/tests/test_agent_config_consistency.py index 6831fad360..b1f778f4f2 100644 --- a/tests/test_agent_config_consistency.py +++ b/tests/test_agent_config_consistency.py @@ -233,3 +233,52 @@ def test_kimi_in_github_release_output(self): def test_ai_help_includes_kimi(self): """CLI help text for --ai should include kimi.""" assert "kimi" in AI_ASSISTANT_HELP + + # --- Junie CLI consistency checks --- + + def test_junie_in_agent_config(self): + """AGENT_CONFIG should include junie with correct folder and commands_subdir.""" + assert "junie" in AGENT_CONFIG + assert AGENT_CONFIG["junie"]["folder"] == ".junie/" + assert AGENT_CONFIG["junie"]["commands_subdir"] == "commands" + assert AGENT_CONFIG["junie"]["requires_cli"] is True + + def test_junie_in_extension_registrar(self): + """Extension command registrar should include junie using .junie/commands.""" + cfg = CommandRegistrar.AGENT_CONFIGS + + assert "junie" in cfg + junie_cfg = cfg["junie"] + assert junie_cfg["dir"] == ".junie/commands" + assert junie_cfg["format"] == "markdown" + assert junie_cfg["extension"] == ".md" + + def test_junie_in_release_agent_lists(self): + """Bash and PowerShell release scripts should include junie in agent lists.""" + sh_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.sh").read_text(encoding="utf-8") + ps_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.ps1").read_text(encoding="utf-8") + + sh_match = re.search(r"ALL_AGENTS=\(([^)]*)\)", sh_text) + assert sh_match is not None + sh_agents = sh_match.group(1).split() + + ps_match = re.search(r"\$AllAgents = @\(([^)]*)\)", ps_text) + assert ps_match is not None + ps_agents = re.findall(r"'([^']+)'", ps_match.group(1)) + + assert "junie" in sh_agents + assert "junie" in ps_agents + + def test_junie_in_agent_context_scripts(self): + """Agent context scripts should support junie agent type.""" + bash_text = (REPO_ROOT / "scripts" / "bash" / "update-agent-context.sh").read_text(encoding="utf-8") + pwsh_text = (REPO_ROOT / "scripts" / "powershell" / "update-agent-context.ps1").read_text(encoding="utf-8") + + assert "junie" in bash_text + assert "JUNIE_FILE" in bash_text + assert "junie" in pwsh_text + assert "JUNIE_FILE" in pwsh_text + + def test_ai_help_includes_junie(self): + """CLI help text for --ai should include junie.""" + assert "junie" in AI_ASSISTANT_HELP From abc626ae6e2251bf9f68f83dc1ec61f72735473e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20R=C3=B6=C3=9Fner?= Date: Tue, 17 Mar 2026 17:09:04 +0100 Subject: [PATCH 2/2] #332: Ensure release scripts generate Junie command files in `.junie/commands` and update related test validation. --- .github/workflows/scripts/create-release-packages.ps1 | 4 ++++ tests/test_agent_config_consistency.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/create-release-packages.ps1 b/.github/workflows/scripts/create-release-packages.ps1 index ca0079a37a..02b300c6c7 100644 --- a/.github/workflows/scripts/create-release-packages.ps1 +++ b/.github/workflows/scripts/create-release-packages.ps1 @@ -431,6 +431,10 @@ function Build-Variant { $cmdDir = Join-Path $baseDir ".qoder/commands" Generate-Commands -Agent 'qodercli' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script } + 'junie' { + $cmdDir = Join-Path $baseDir ".junie/commands" + Generate-Commands -Agent 'junie' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script + } 'shai' { $cmdDir = Join-Path $baseDir ".shai/commands" Generate-Commands -Agent 'shai' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script diff --git a/tests/test_agent_config_consistency.py b/tests/test_agent_config_consistency.py index b1f778f4f2..229a1c45ef 100644 --- a/tests/test_agent_config_consistency.py +++ b/tests/test_agent_config_consistency.py @@ -254,7 +254,7 @@ def test_junie_in_extension_registrar(self): assert junie_cfg["extension"] == ".md" def test_junie_in_release_agent_lists(self): - """Bash and PowerShell release scripts should include junie in agent lists.""" + """Bash and PowerShell release scripts should include junie and build .junie/commands.""" sh_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.sh").read_text(encoding="utf-8") ps_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.ps1").read_text(encoding="utf-8") @@ -269,6 +269,10 @@ def test_junie_in_release_agent_lists(self): assert "junie" in sh_agents assert "junie" in ps_agents + # Ensure the release scripts actually generate Junie command files targeting .junie/commands. + assert re.search(r"junie.*\.junie/commands", sh_text, re.S) is not None + assert re.search(r"junie.*\.junie/commands", ps_text, re.S) is not None + def test_junie_in_agent_context_scripts(self): """Agent context scripts should support junie agent type.""" bash_text = (REPO_ROOT / "scripts" / "bash" / "update-agent-context.sh").read_text(encoding="utf-8")