A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.
Shell
fix(qwen): document the 0.25.1 floor and reserve Qwen's launch placeholders (#1143)
Michael Sitarzewski652b2692f8d8
diff --git a/.github/workflows/lint-agents.yml b/.github/workflows/lint-agents.ymlindex 7eea6dfc..1366e2d9 100644--- a/.github/workflows/lint-agents.yml+++ b/.github/workflows/lint-agents.yml@@ -108,3 +108,7 @@ jobs:- name: Reject folded frontmatter fixturesif: steps.rules.outputs.changed == 'true'run: bash scripts/test-folded-frontmatter.sh++ - name: Reject Qwen launch placeholders+ if: steps.rules.outputs.changed == 'true'+ run: bash scripts/test-lint-qwen-placeholders.shdiff --git a/README.md b/README.mdindex 89f77d99..f4f8c2e3 100644--- a/README.md+++ b/README.md@@ -1003,6 +1003,8 @@ See [integrations/openclaw/README.md](integrations/openclaw/README.md) for detaiSubAgents are installed to `.qwen/agents/` in your project root (project-scoped).+> Requires Qwen Code 0.25.1 or later. Earlier releases can't launch agents whose code examples contain `${…}` placeholders ([#1081](https://github.com/msitarzewski/agency-agents/issues/1081)).+```bash# Convert and install (run from your project root)cd /your/projectdiff --git a/integrations/qwen/README.md b/integrations/qwen/README.mdindex 602106b2..b09af133 100644--- a/integrations/qwen/README.md+++ b/integrations/qwen/README.md@@ -5,6 +5,19 @@ Qwen Code uses project-scoped `.md` SubAgent files in `.qwen/agents/`.The generated files come from `scripts/convert.sh --tool qwen`, which writes oneSubAgent Markdown file per agency agent into `integrations/qwen/agents/`.+## Requirements++Qwen Code **0.25.1 or later**. Earlier releases treat every `${name}` in a+SubAgent's prompt as a value to fill and refuse to launch the agent when they+have none ("Missing context values for the following keys: …"). Several agents+show `${name}` in their code examples, so on those releases they can't be+launched. From 0.25.1, Qwen leaves any `${name}` it doesn't fill as written+([#1081](https://github.com/msitarzewski/agency-agents/issues/1081)).++Qwen does fill three names: `${task_prompt}`, `${hook_context}` and+`${external_inputs_override}`. `scripts/lint-agents.sh` rejects them in agent+bodies, so no agent text is replaced at launch.+## GenerateFrom the repository root:diff --git a/scripts/lint-agents.sh b/scripts/lint-agents.shindex 3e413e6d..f1dbf5cd 100755--- a/scripts/lint-agents.sh+++ b/scripts/lint-agents.sh@@ -169,6 +169,16 @@ lint_file() {warnings=$((warnings + 1))fi+ # 4b. Qwen Code substitutes ${task_prompt}, ${hook_context} and+ # ${external_inputs_override} into a SubAgent's prompt at launch. From 0.25.1+ # it leaves every other ${name} as written (older releases refuse any name+ # they can't fill, #1081). One of these three in a body would be silently+ # replaced, so the names are reserved.+ if grep -qE '\$\{(task_prompt|hook_context|external_inputs_override)\}' <<<"$body"; then+ echo "ERROR $file: uses a placeholder Qwen Code fills at launch (\${task_prompt}, \${hook_context} or \${external_inputs_override}) — rename it"+ errors=$((errors + 1))+ fi+local soul_headers=0local agents_headers=0local fence_marker="" fence_len=0 fence_indent=0 fence_line=0diff --git a/scripts/test-lint-qwen-placeholders.sh b/scripts/test-lint-qwen-placeholders.shnew file mode 100755index 00000000..4cea3e41--- /dev/null+++ b/scripts/test-lint-qwen-placeholders.sh@@ -0,0 +1,25 @@+#!/usr/bin/env bash+# Qwen Code fills three ${name} placeholders into a SubAgent's prompt at launch+# (#1081). The linter must reject those three in an agent body and keep+# accepting every other ${name}, which Qwen 0.25.1+ leaves as written.+set -euo pipefail+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"+scratch="$(mktemp -d)"+trap 'rm -rf "$scratch"' EXIT+write_agent() {+ printf '%s\n' '---' 'name: Example Agent' 'description: Checks placeholder handling' 'color: blue' '---' \+ '## Identity' '## Core Mission' '## Critical Rules' '```bash' "echo \"$1\"" '```' > "$scratch/agent.md"+}+for key in task_prompt hook_context external_inputs_override; do+ write_agent "\${$key}"+ if bash "$SCRIPT_DIR/lint-agents.sh" "$scratch/agent.md" > "$scratch/result.log" 2>&1; then+ echo "FAIL: linter accepted the Qwen launch placeholder \${$key}" >&2; exit 1+ fi+ grep -q 'placeholder Qwen Code fills at launch' "$scratch/result.log"+done+for text in '${name}' '${BACKUP_DIR}' '${task_prompt_suffix}' '$task_prompt'; do+ write_agent "$text"+ bash "$SCRIPT_DIR/lint-agents.sh" "$scratch/agent.md" > "$scratch/result.log" 2>&1 \+ || { cat "$scratch/result.log" >&2; echo "FAIL: linter rejected ordinary text $text" >&2; exit 1; }+done+echo 'PASS: Qwen launch placeholders are rejected while other ${name} placeholders pass'