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 b577783845..6b1e115a47 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-trae-sh-"$VERSION".zip \ diff --git a/.github/workflows/scripts/create-release-packages.ps1 b/.github/workflows/scripts/create-release-packages.ps1 index aa79a95568..cc915ef8aa 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, trae, 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, trae, generic .PARAMETER Scripts Comma or space separated subset of script types to build (default: both) @@ -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 @@ -475,7 +479,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', 'trae', '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', 'trae', '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 77dac397ab..0c4f61b724 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" ;; @@ -303,7 +306,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 trae 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 trae generic) ALL_SCRIPTS=(sh ps) norm_list() { diff --git a/AGENTS.md b/AGENTS.md index 77f54d05a8..b12f15c4cd 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 | | **Trae** | `.trae/rules/` | Markdown | N/A (IDE-based) | Trae IDE | | **Generic** | User-specified via `--ai-commands-dir` | Markdown | N/A | Bring your own agent | @@ -323,6 +324,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 b3c6235e5b..8d379c4600 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,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` | @@ -200,14 +201,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 | @@ -249,6 +250,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 0e33772f9d..40c221c776 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|trae|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|trae|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" TRAE_FILE="$REPO_ROOT/.trae/rules/AGENTS.md" # Template file @@ -676,6 +677,9 @@ update_specific_agent() { kimi) update_agent_file "$KIMI_FILE" "Kimi Code" || return 1 ;; + junie) + update_agent_file "$JUNIE_FILE" "Junie CLI" || return 1 + ;; trae) update_agent_file "$TRAE_FILE" "Trae" || return 1 ;; @@ -684,7 +688,7 @@ update_specific_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|trae|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|trae|generic" exit 1 ;; esac @@ -743,6 +747,7 @@ update_all_existing_agents() { _update_if_new "$AGY_FILE" "Antigravity" || _all_ok=false _update_if_new "$VIBE_FILE" "Mistral Vibe" || _all_ok=false _update_if_new "$KIMI_FILE" "Kimi Code" || _all_ok=false + _update_if_new "$JUNIE_FILE" "Junie CLI" || _all_ok=false _update_if_new "$TRAE_FILE" "Trae" || _all_ok=false # If no agent files exist, create a default Claude file @@ -770,7 +775,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|trae|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|trae|generic]" } #============================================================================== diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index c0e0a674f8..5b786576c5 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, trae, 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, trae, 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','trae','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','trae','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' $TRAE_FILE = Join-Path $REPO_ROOT '.trae/rules/AGENTS.md' $TEMPLATE_FILE = Join-Path $REPO_ROOT '.specify/templates/agent-file-template.md' @@ -409,9 +410,10 @@ 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' } 'trae' { Update-AgentFile -TargetFile $TRAE_FILE -AgentName 'Trae' } '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|trae|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|trae|generic'; return $false } } } @@ -437,6 +439,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 (Test-Path $TRAE_FILE) { if (-not (Update-AgentFile -TargetFile $TRAE_FILE -AgentName 'Trae')) { $ok = $false }; $found = $true } if (-not $found) { Write-Info 'No existing agent files found, creating default Claude file...' @@ -452,7 +455,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 ff2364d29a..919cb2b731 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -275,6 +275,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, + }, "trae": { "name": "Trae", "folder": ".trae/", diff --git a/src/specify_cli/agents.py b/src/specify_cli/agents.py index 6f9aaa910b..50b3430bea 100644 --- a/src/specify_cli/agents.py +++ b/src/specify_cli/agents.py @@ -136,6 +136,12 @@ class CommandRegistrar: "args": "$ARGUMENTS", "extension": "/SKILL.md" }, + "junie": { + "dir": ".junie/commands", + "format": "markdown", + "args": "$ARGUMENTS", + "extension": ".md" + }, "trae": { "dir": ".trae/rules", "format": "markdown", diff --git a/tests/test_agent_config_consistency.py b/tests/test_agent_config_consistency.py index 1d6a4b2df1..adc873d3cc 100644 --- a/tests/test_agent_config_consistency.py +++ b/tests/test_agent_config_consistency.py @@ -309,3 +309,56 @@ def test_trae_in_powershell_validate_set(self): def test_ai_help_includes_trae(self): """CLI help text for --ai should include trae.""" assert "trae" 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 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") + + 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 + + # 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") + 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