diff --git a/.gitignore b/.gitignore index 37e4512..c3bcec7 100644 --- a/.gitignore +++ b/.gitignore @@ -74,4 +74,5 @@ integrations/cursor/rules/ integrations/aider/CONVENTIONS.md integrations/windsurf/.windsurfrules integrations/openclaw/* +integrations/qwen/agents/ !integrations/openclaw/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9aaa30..1344371 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -214,6 +214,10 @@ The test: *is this agent for the user, or for the vendor?* An agent that solves the user's problem using a service belongs here. A service's quickstart guide wearing an agent costume does not. +### Tool-Specific Compatibility + +**Qwen Code Compatibility**: Agent bodies support `${variable}` templating for dynamic context (e.g., `${project_name}`, `${task_description}`). Qwen SubAgents use minimal frontmatter: only `name` and `description` are required; `color`, `emoji`, and `version` fields are omitted as Qwen doesn't use them. + ### What Makes a Great Agent? **Great agents have**: diff --git a/README.md b/README.md index 17f3fc5..1b5f95a 100644 --- a/README.md +++ b/README.md @@ -464,6 +464,7 @@ The Agency works natively with Claude Code, and ships conversion + install scrip - **[Aider](https://aider.chat)** — single `CONVENTIONS.md` → `./CONVENTIONS.md` - **[Windsurf](https://codeium.com/windsurf)** — single `.windsurfrules` → `./.windsurfrules` - **[OpenClaw](https://github.com/openclaw/openclaw)** — `SOUL.md` + `AGENTS.md` + `IDENTITY.md` per agent +- **[Qwen Code](https://github.com/QwenLM/qwen-code)** — `.md` SubAgent files → `~/.qwen/agents/` --- @@ -675,6 +676,27 @@ See [integrations/openclaw/README.md](integrations/openclaw/README.md) for detai +
+Qwen Code + +SubAgents are installed to `.qwen/agents/` in your project root (project-scoped). + +```bash +# Convert and install (run from your project root) +cd /your/project +./scripts/convert.sh --tool qwen +./scripts/install.sh --tool qwen +``` + +**Usage in Qwen Code:** +- Reference by name: `Use the frontend-developer agent to review this component` +- Or let Qwen auto-delegate based on task context +- Manage via `/agents` command in interactive mode + +> 📚 [Qwen SubAgents Docs](https://qwenlm.github.io/qwen-code-docs/en/users/features/sub-agents/) + +
+ --- ### Regenerating After Changes @@ -692,7 +714,7 @@ When you add new agents or edit existing ones, regenerate all integration files: - [ ] Interactive agent selector web tool - [x] Multi-agent workflow examples -- see [examples/](examples/) -- [x] Multi-tool integration scripts (Claude Code, GitHub Copilot, Antigravity, Gemini CLI, OpenCode, OpenClaw, Cursor, Aider, Windsurf) +- [x] Multi-tool integration scripts (Claude Code, GitHub Copilot, Antigravity, Gemini CLI, OpenCode, OpenClaw, Cursor, Aider, Windsurf, Qwen Code) - [ ] Video tutorials on agent design - [ ] Community agent marketplace - [ ] Agent "personality quiz" for project matching diff --git a/scripts/convert.sh b/scripts/convert.sh index f38e918..0503dbf 100755 --- a/scripts/convert.sh +++ b/scripts/convert.sh @@ -17,6 +17,7 @@ # aider — Single CONVENTIONS.md for Aider # windsurf — Single .windsurfrules for Windsurf # openclaw — OpenClaw SOUL.md files (openclaw_workspace//SOUL.md) +# qwen — Qwen Code SubAgent files (~/.qwen/agents/*.md) # all — All tools (default) # # Output is written to integrations// relative to the repo root. @@ -297,6 +298,41 @@ HEREDOC fi } +convert_qwen() { + local file="$1" + local name description tools slug outfile body + + name="$(get_field "name" "$file")" + description="$(get_field "description" "$file")" + tools="$(get_field "tools" "$file")" + slug="$(slugify "$name")" + body="$(get_body "$file")" + + outfile="$OUT_DIR/qwen/agents/${slug}.md" + mkdir -p "$(dirname "$outfile")" + + # Qwen Code SubAgent format: .md with YAML frontmatter in ~/.qwen/agents/ + # name and description required; tools optional (only if present in source) + if [[ -n "$tools" ]]; then + cat > "$outfile" < "$outfile" </dev/null 2>&1 || [[ -d "${HOME}/.c detect_aider() { command -v aider >/dev/null 2>&1; } detect_openclaw() { command -v openclaw >/dev/null 2>&1 || [[ -d "${HOME}/.openclaw" ]]; } detect_windsurf() { command -v windsurf >/dev/null 2>&1 || [[ -d "${HOME}/.codeium" ]]; } +detect_qwen() { command -v qwen >/dev/null 2>&1 || [[ -d "${HOME}/.qwen" ]]; } is_detected() { case "$1" in @@ -125,6 +127,7 @@ is_detected() { cursor) detect_cursor ;; aider) detect_aider ;; windsurf) detect_windsurf ;; + qwen) detect_qwen ;; *) return 1 ;; esac } @@ -141,6 +144,7 @@ tool_label() { cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;; aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;; windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;; + qwen) printf "%-14s %s" "Qwen Code" "(~/.qwen/agents)" ;; esac } @@ -196,7 +200,7 @@ interactive_select() { # --- controls --- printf "\n" printf " ------------------------------------------------\n" - printf " ${C_CYAN}[1-9]${C_RESET} toggle ${C_CYAN}[a]${C_RESET} all ${C_CYAN}[n]${C_RESET} none ${C_CYAN}[d]${C_RESET} detected\n" + printf " ${C_CYAN}[1-%s]${C_RESET} toggle ${C_CYAN}[a]${C_RESET} all ${C_CYAN}[n]${C_RESET} none ${C_CYAN}[d]${C_RESET} detected\n" "${#ALL_TOOLS[@]}" printf " ${C_GREEN}[Enter]${C_RESET} install ${C_RED}[q]${C_RESET} quit\n" printf "\n" printf " >> " @@ -410,6 +414,26 @@ install_windsurf() { warn "Windsurf: project-scoped. Run from your project root to install there." } +install_qwen() { + local src="$INTEGRATIONS/qwen/agents" + local dest="${PWD}/.qwen/agents" + local count=0 + + [[ -d "$src" ]] || { err "integrations/qwen missing. Run convert.sh first."; return 1; } + + mkdir -p "$dest" + + local f + while IFS= read -r -d '' f; do + cp "$f" "$dest/" + (( count++ )) || true + done < <(find "$src" -maxdepth 1 -name "*.md" -print0) + + ok "Qwen Code: installed $count agents to $dest" + warn "Qwen Code: project-scoped. Run from your project root to install there." + warn "Tip: Run '/agents manage' in Qwen Code to refresh, or restart session" +} + install_tool() { case "$1" in claude-code) install_claude_code ;; @@ -421,6 +445,7 @@ install_tool() { cursor) install_cursor ;; aider) install_aider ;; windsurf) install_windsurf ;; + qwen) install_qwen ;; esac }