mirror of
https://github.com/msitarzewski/agency-agents
synced 2026-04-25 11:18:05 +00:00
Merge pull request #147 from muleyprasad/main
Welcome Qwen Code as the 9th converter target! Follows existing patterns well.
This commit is contained in:
commit
b9437990cd
1
.gitignore
vendored
1
.gitignore
vendored
@ -74,4 +74,5 @@ integrations/cursor/rules/
|
||||
integrations/aider/CONVENTIONS.md
|
||||
integrations/windsurf/.windsurfrules
|
||||
integrations/openclaw/*
|
||||
integrations/qwen/agents/
|
||||
!integrations/openclaw/README.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**:
|
||||
|
||||
24
README.md
24
README.md
@ -471,6 +471,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/`
|
||||
|
||||
---
|
||||
|
||||
@ -682,6 +683,27 @@ See [integrations/openclaw/README.md](integrations/openclaw/README.md) for detai
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Qwen Code</strong></summary>
|
||||
|
||||
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/)
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
### Regenerating After Changes
|
||||
@ -699,7 +721,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
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
# aider — Single CONVENTIONS.md for Aider
|
||||
# windsurf — Single .windsurfrules for Windsurf
|
||||
# openclaw — OpenClaw SOUL.md files (openclaw_workspace/<agent>/SOUL.md)
|
||||
# qwen — Qwen Code SubAgent files (~/.qwen/agents/*.md)
|
||||
# all — All tools (default)
|
||||
#
|
||||
# Output is written to integrations/<tool>/ relative to the repo root.
|
||||
@ -312,6 +313,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" <<HEREDOC
|
||||
---
|
||||
name: ${slug}
|
||||
description: ${description}
|
||||
tools: ${tools}
|
||||
---
|
||||
${body}
|
||||
HEREDOC
|
||||
else
|
||||
cat > "$outfile" <<HEREDOC
|
||||
---
|
||||
name: ${slug}
|
||||
description: ${description}
|
||||
---
|
||||
${body}
|
||||
HEREDOC
|
||||
fi
|
||||
}
|
||||
|
||||
# Aider and Windsurf are single-file formats — accumulate into temp files
|
||||
# then write at the end.
|
||||
AIDER_TMP="$(mktemp)"
|
||||
@ -408,6 +444,7 @@ run_conversions() {
|
||||
opencode) convert_opencode "$file" ;;
|
||||
cursor) convert_cursor "$file" ;;
|
||||
openclaw) convert_openclaw "$file" ;;
|
||||
qwen) convert_qwen "$file" ;;
|
||||
aider) accumulate_aider "$file" ;;
|
||||
windsurf) accumulate_windsurf "$file" ;;
|
||||
esac
|
||||
@ -443,7 +480,7 @@ main() {
|
||||
esac
|
||||
done
|
||||
|
||||
local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "all")
|
||||
local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen" "all")
|
||||
local valid=false
|
||||
for t in "${valid_tools[@]}"; do [[ "$t" == "$tool" ]] && valid=true && break; done
|
||||
if ! $valid; then
|
||||
@ -459,7 +496,7 @@ main() {
|
||||
|
||||
local tools_to_run=()
|
||||
if [[ "$tool" == "all" ]]; then
|
||||
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw")
|
||||
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen")
|
||||
else
|
||||
tools_to_run=("$tool")
|
||||
fi
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
# aider -- Copy CONVENTIONS.md to current directory
|
||||
# windsurf -- Copy .windsurfrules to current directory
|
||||
# openclaw -- Copy workspaces to ~/.openclaw/agency-agents/
|
||||
# qwen -- Copy SubAgents to ~/.qwen/agents/ (user-wide) or .qwen/agents/ (project)
|
||||
# all -- Install for all detected tools (default)
|
||||
#
|
||||
# Flags:
|
||||
@ -84,7 +85,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
INTEGRATIONS="$REPO_ROOT/integrations"
|
||||
|
||||
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf)
|
||||
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf qwen)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Usage
|
||||
@ -116,6 +117,7 @@ detect_opencode() { command -v opencode >/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
|
||||
@ -128,6 +130,7 @@ is_detected() {
|
||||
cursor) detect_cursor ;;
|
||||
aider) detect_aider ;;
|
||||
windsurf) detect_windsurf ;;
|
||||
qwen) detect_qwen ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
@ -144,6 +147,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
|
||||
}
|
||||
|
||||
@ -199,7 +203,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 " >> "
|
||||
@ -413,6 +417,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 ;;
|
||||
@ -424,6 +448,7 @@ install_tool() {
|
||||
cursor) install_cursor ;;
|
||||
aider) install_aider ;;
|
||||
windsurf) install_windsurf ;;
|
||||
qwen) install_qwen ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user