From dc9f881fc3006c1bf58614d8587896888df5a7c0 Mon Sep 17 00:00:00 2001 From: maodao Date: Mon, 22 Sep 2025 12:54:14 +0800 Subject: [PATCH 1/2] feat: support iflow cli --- .../workflows/scripts/create-github-release.sh | 2 ++ .../scripts/create-release-packages.sh | 4 ++++ AGENTS.md | 7 +++++-- README.md | 5 +++-- scripts/bash/update-agent-context.sh | 17 +++++++++++++---- scripts/powershell/update-agent-context.ps1 | 9 ++++++--- src/specify_cli/__init__.py | 15 ++++++++++++--- templates/plan-template.md | 2 +- 8 files changed, 46 insertions(+), 15 deletions(-) diff --git a/.github/workflows/scripts/create-github-release.sh b/.github/workflows/scripts/create-github-release.sh index 0257520f5..e913623a2 100644 --- a/.github/workflows/scripts/create-github-release.sh +++ b/.github/workflows/scripts/create-github-release.sh @@ -38,5 +38,7 @@ gh release create "$VERSION" \ .genreleases/spec-kit-template-auggie-ps-"$VERSION".zip \ .genreleases/spec-kit-template-roo-sh-"$VERSION".zip \ .genreleases/spec-kit-template-roo-ps-"$VERSION".zip \ + .genreleases/spec-kit-template-iflow-sh-"$VERSION".zip \ + .genreleases/spec-kit-template-iflow-ps-"$VERSION".zip \ --title "Spec Kit Templates - $VERSION_NO_V" \ --notes-file release_notes.md \ No newline at end of file diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 1a12e5582..f54c34d47 100644 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -172,6 +172,10 @@ build_variant() { roo) mkdir -p "$base_dir/.roo/commands" generate_commands roo md "\$ARGUMENTS" "$base_dir/.roo/commands" "$script" ;; + iflow) + mkdir -p "$base_dir/.iflow/commands" + generate_commands IFLOW md "\$ARGUMENTS" "$base_dir/.iflow/commands" "$script" + [[ -f agent_templates/iflow/IFLOW.md ]] && cp agent_templates/iflow/IFLOW.md "$base_dir/IFLOW.md" ;; esac ( cd "$base_dir" && zip -r "../spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip" . ) echo "Created $GENRELEASES_DIR/spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip" diff --git a/AGENTS.md b/AGENTS.md index 59b995668..d6b4502d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -38,6 +38,7 @@ Specify supports multiple AI agents by generating agent-specific command files a | **Qwen Code** | `.qwen/commands/` | TOML | `qwen` | Alibaba's Qwen Code CLI | | **opencode** | `.opencode/command/` | Markdown | `opencode` | opencode CLI | | **Windsurf** | `.windsurf/workflows/` | Markdown | N/A (IDE-based) | Windsurf IDE workflows | +| **iFlow CLI** | `.iflow/commands/` | TOML/Markdown | `iflow` | Alibaba's iFlow CLI | ### Step-by-Step Integration Guide @@ -55,7 +56,8 @@ AI_CHOICES = { "cursor": "Cursor", "qwen": "Qwen Code", "opencode": "opencode", - "windsurf": "Windsurf" # Add new agent here + "windsurf": "Windsurf", # Add new agent here + "iflow": "iFlow CLI", } ``` @@ -70,6 +72,7 @@ agent_folder_map = { "opencode": ".opencode/", "codex": ".codex/", "windsurf": ".windsurf/", # Add new agent folder here + "iflow": ".iflow/", "kilocode": ".kilocode/", "auggie": ".auggie/", "copilot": ".github/" @@ -99,7 +102,7 @@ Modify `.github/workflows/scripts/create-release-packages.sh`: ##### Add to ALL_AGENTS array: ```bash -ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf) +ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf iflow) ``` ##### Add case statement for directory structure: diff --git a/README.md b/README.md index 7572728cf..3ac01d841 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ Want to see Spec Kit in action? Watch our [video overview](https://www.youtube.c | [Kilo Code](https://github.com/Kilo-Org/kilocode) | ✅ | | | [Auggie CLI](https://docs.augmentcode.com/cli/overview) | ✅ | | | [Roo Code](https://roocode.com/) | ✅ | | +| [iFlow CLI](https://iflow.ai/cli) | ✅ | | | [Codex CLI](https://github.com/openai/codex) | ⚠️ | Codex [does not support](https://github.com/openai/codex/issues/2890) custom arguments for slash commands. | ## 🔧 Specify CLI Reference @@ -125,7 +126,7 @@ The `specify` command supports the following options: | Argument/Option | Type | Description | |------------------------|----------|------------------------------------------------------------------------------| | `` | Argument | Name for your new project directory (optional if using `--here`) | -| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, or `roo` | +| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, or `iflow` | | `--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 | | `--no-git` | Flag | Skip git repository initialization | @@ -232,7 +233,7 @@ Our research and experimentation focus on: ## 🔧 Prerequisites - **Linux/macOS** (or WSL2 on Windows) -- AI coding agent: [Claude Code](https://www.anthropic.com/claude-code), [GitHub Copilot](https://code.visualstudio.com/), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Cursor](https://cursor.sh/), [Qwen CLI](https://github.com/QwenLM/qwen-code), [opencode](https://opencode.ai/), [Codex CLI](https://github.com/openai/codex), or [Windsurf](https://windsurf.com/) +- AI coding agent: [Claude Code](https://www.anthropic.com/claude-code), [GitHub Copilot](https://code.visualstudio.com/), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Cursor](https://cursor.sh/), [Qwen CLI](https://github.com/QwenLM/qwen-code), [opencode](https://opencode.ai/), [Codex CLI](https://github.com/openai/codex), [Windsurf](https://windsurf.com/), [Roo Code](https://roocode.com/), or [iFlow CLI](https://platform.iflow.cn/cli/quickstart) - [uv](https://docs.astral.sh/uv/) for package management - [Python 3.11+](https://www.python.org/downloads/) - [Git](https://git-scm.com/downloads) diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index d3cc422ed..4755fccd2 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 +# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, iFlow # - 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|qwen|opencode|codex|windsurf +# Agent types: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|iflow # Leave empty to update all existing agent files set -e @@ -64,6 +64,7 @@ GEMINI_FILE="$REPO_ROOT/GEMINI.md" COPILOT_FILE="$REPO_ROOT/.github/copilot-instructions.md" CURSOR_FILE="$REPO_ROOT/.cursor/rules/specify-rules.mdc" QWEN_FILE="$REPO_ROOT/QWEN.md" +IFLOW_FILE="$REPO_ROOT/IFLOW.md" AGENTS_FILE="$REPO_ROOT/AGENTS.md" WINDSURF_FILE="$REPO_ROOT/.windsurf/rules/specify-rules.md" KILOCODE_FILE="$REPO_ROOT/.kilocode/rules/specify-rules.md" @@ -580,9 +581,12 @@ update_specific_agent() { roo) update_agent_file "$ROO_FILE" "Roo Code" ;; + iflow) + update_agent_file "$IFLOW_FILE" "iFlow CLI" + ;; *) log_error "Unknown agent type '$agent_type'" - log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo" + log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|iflow" exit 1 ;; esac @@ -642,6 +646,11 @@ update_all_existing_agents() { found_agent=true fi + if [[ -f "$IFLOW_FILE" ]]; then + update_agent_file "$IFLOW_FILE" "iFlow CLI" + found_agent=true + fi + # If no agent files exist, create a default Claude file if [[ "$found_agent" == false ]]; then log_info "No existing agent files found, creating default Claude file..." @@ -665,7 +674,7 @@ print_summary() { fi echo - log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo]" + log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|iflow]" } #============================================================================== diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index 8f4830a95..e130e3f91 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, qwen, opencode, codex, windsurf) + 5. Multi-Agent Support (claude, gemini, copilot, cursor, qwen, opencode, codex, windsurf, iflow) .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','qwen','opencode','codex','windsurf','kilocode','auggie','roo')] + [ValidateSet('claude','gemini','copilot','cursor','qwen','opencode','codex','windsurf','kilocode','auggie','roo', 'iflow')] [string]$AgentType ) @@ -49,6 +49,7 @@ $GEMINI_FILE = Join-Path $REPO_ROOT 'GEMINI.md' $COPILOT_FILE = Join-Path $REPO_ROOT '.github/copilot-instructions.md' $CURSOR_FILE = Join-Path $REPO_ROOT '.cursor/rules/specify-rules.mdc' $QWEN_FILE = Join-Path $REPO_ROOT 'QWEN.md' +$IFLOW_FILE = Join-Path $REPO_ROOT 'IFLOW.md' $AGENTS_FILE = Join-Path $REPO_ROOT 'AGENTS.md' $WINDSURF_FILE = Join-Path $REPO_ROOT '.windsurf/rules/specify-rules.md' $KILOCODE_FILE = Join-Path $REPO_ROOT '.kilocode/rules/specify-rules.md' @@ -370,13 +371,14 @@ function Update-SpecificAgent { 'copilot' { Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot' } 'cursor' { Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE' } 'qwen' { Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code' } + 'iflow' { Update-AgentFile -TargetFile $IFLOW_FILE -AgentName 'iFlow CLI' } 'opencode' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'opencode' } 'codex' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex CLI' } 'windsurf' { Update-AgentFile -TargetFile $WINDSURF_FILE -AgentName 'Windsurf' } 'kilocode' { Update-AgentFile -TargetFile $KILOCODE_FILE -AgentName 'Kilo Code' } 'auggie' { Update-AgentFile -TargetFile $AUGGIE_FILE -AgentName 'Auggie CLI' } 'roo' { Update-AgentFile -TargetFile $ROO_FILE -AgentName 'Roo Code' } - default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo'; return $false } + default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|iflow'; return $false } } } @@ -388,6 +390,7 @@ function Update-AllExistingAgents { if (Test-Path $COPILOT_FILE) { if (-not (Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot')) { $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 $IFLOW_FILE) { if (-not (Update-AgentFile -TargetFile $IFLOW_FILE -AgentName 'iFlow CLI')) { $ok = $false }; $found = $true } if (Test-Path $AGENTS_FILE) { if (-not (Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex/opencode')) { $ok = $false }; $found = $true } if (Test-Path $WINDSURF_FILE) { if (-not (Update-AgentFile -TargetFile $WINDSURF_FILE -AgentName 'Windsurf')) { $ok = $false }; $found = $true } if (Test-Path $KILOCODE_FILE) { if (-not (Update-AgentFile -TargetFile $KILOCODE_FILE -AgentName 'Kilo Code')) { $ok = $false }; $found = $true } diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index 0bc419fb2..6afcb11a3 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -75,6 +75,7 @@ def _github_auth_headers(cli_token: str | None = None) -> dict: "kilocode": "Kilo Code", "auggie": "Auggie CLI", "roo": "Roo Code", + "iflow": "iFlow CLI", } # Add script type choices SCRIPT_TYPE_CHOICES = {"sh": "POSIX Shell (bash/zsh)", "ps": "PowerShell"} @@ -748,7 +749,7 @@ def ensure_executable_scripts(project_path: Path, tracker: StepTracker | None = @app.command() def init( project_name: str = typer.Argument(None, help="Name for your new project directory (optional if using --here)"), - ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, copilot, cursor, qwen, opencode, codex, windsurf, kilocode, or auggie"), + ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, copilot, cursor, qwen, opencode, codex, windsurf, kilocode, auggie, or iflow"), script_type: str = typer.Option(None, "--script", help="Script type to use: sh or ps"), ignore_agent_tools: bool = typer.Option(False, "--ignore-agent-tools", help="Skip checks for AI agent tools like Claude Code"), no_git: bool = typer.Option(False, "--no-git", help="Skip git repository initialization"), @@ -779,6 +780,7 @@ def init( specify init my-project --ai codex specify init my-project --ai windsurf specify init my-project --ai auggie + specify init my-project --ai iflow specify init --ignore-agent-tools my-project specify init --here --ai claude specify init --here --ai codex @@ -893,6 +895,10 @@ def init( if not check_tool("auggie", "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli"): install_url = "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli" agent_tool_missing = True + elif selected_ai == "iflow": + if not check_tool("iflow", "https://iflow.ai/cli"): + install_url = "https://iflow.ai/cli" + agent_tool_missing = True # GitHub Copilot and Cursor checks are not needed as they're typically available in supported IDEs if agent_tool_missing: @@ -1017,7 +1023,8 @@ def init( "kilocode": ".kilocode/", "auggie": ".augment/", "copilot": ".github/", - "roo": ".roo/" + "roo": ".roo/", + "iflow": ".iflow/" } if selected_ai in agent_folder_map: @@ -1095,6 +1102,7 @@ def check(): tracker.add("opencode", "opencode") tracker.add("codex", "Codex CLI") tracker.add("auggie", "Auggie CLI") + tracker.add("iflow", "iFlow CLI") git_ok = check_tool_for_tracker("git", tracker) claude_ok = check_tool_for_tracker("claude", tracker) @@ -1108,6 +1116,7 @@ def check(): opencode_ok = check_tool_for_tracker("opencode", tracker) codex_ok = check_tool_for_tracker("codex", tracker) auggie_ok = check_tool_for_tracker("auggie", tracker) + iflow_ok = check_tool_for_tracker("iflow", tracker) console.print(tracker.render()) @@ -1115,7 +1124,7 @@ def check(): if not git_ok: console.print("[dim]Tip: Install git for repository management[/dim]") - if not (claude_ok or gemini_ok or cursor_ok or qwen_ok or windsurf_ok or kilocode_ok or opencode_ok or codex_ok or auggie_ok): + if not (claude_ok or gemini_ok or cursor_ok or qwen_ok or windsurf_ok or kilocode_ok or opencode_ok or codex_ok or auggie_ok or iflow_ok): console.print("[dim]Tip: Install an AI assistant for the best experience[/dim]") diff --git a/templates/plan-template.md b/templates/plan-template.md index e812b4126..0aba83697 100644 --- a/templates/plan-template.md +++ b/templates/plan-template.md @@ -24,7 +24,7 @@ scripts: → Update Progress Tracking: Initial Constitution Check 5. Execute Phase 0 → research.md → If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns" -6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code or `AGENTS.md` for opencode). +6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code, `AGENTS.md` for opencode, `ROO.md` for Roo Code, or `IFLOW.md` for iFlow CLI). 7. Re-evaluate Constitution Check section → If new violations: Refactor design, return to Phase 1 → Update Progress Tracking: Post-Design Constitution Check From f671af24001399c48de10d3035d5dca4e5762711 Mon Sep 17 00:00:00 2001 From: maodao Date: Mon, 22 Sep 2025 12:57:45 +0800 Subject: [PATCH 2/2] feat: support iflow cli --- README.md | 2 +- src/specify_cli/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3ac01d841..d999c5c35 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Want to see Spec Kit in action? Watch our [video overview](https://www.youtube.c | [Kilo Code](https://github.com/Kilo-Org/kilocode) | ✅ | | | [Auggie CLI](https://docs.augmentcode.com/cli/overview) | ✅ | | | [Roo Code](https://roocode.com/) | ✅ | | -| [iFlow CLI](https://iflow.ai/cli) | ✅ | | +| [iFlow CLI](https://platform.iflow.cn/cli/quickstart) | ✅ | | | [Codex CLI](https://github.com/openai/codex) | ⚠️ | Codex [does not support](https://github.com/openai/codex/issues/2890) custom arguments for slash commands. | ## 🔧 Specify CLI Reference diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index 6afcb11a3..0406ede72 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -896,8 +896,8 @@ def init( install_url = "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli" agent_tool_missing = True elif selected_ai == "iflow": - if not check_tool("iflow", "https://iflow.ai/cli"): - install_url = "https://iflow.ai/cli" + if not check_tool("iflow", "https://platform.iflow.cn/cli/quickstart"): + install_url = "https://platform.iflow.cn/cli/quickstart" agent_tool_missing = True # GitHub Copilot and Cursor checks are not needed as they're typically available in supported IDEs