From e60dbbc769fb720246e5985862f81934e3512d7f Mon Sep 17 00:00:00 2001 From: zakyirsyaad Date: Fri, 9 Oct 2026 10:56:43 +0700 Subject: [PATCH 1/2] fix(qwen): ship agent context in .qwen/QWEN.md instead of installer docs `.qwen/QWEN.md` is copied to `~/.qwen/QWEN.md`, which Qwen Code loads as home-level agent context in every session. Its current content describes the install template itself -- 'This directory contains ECC's Qwen CLI install template', the `./install.sh` invocation, and the managed-module list -- so every Qwen session spends its context budget on installer documentation while getting none of the baseline workflow, coding standards, or security checklist. Every other harness target ships real agent context here: `.gemini/GEMINI.md` ('provides Gemini CLI with the baseline ECC workflow, review standards, and security checks') and `.codex/AGENTS.md` ('supplements the root AGENTS.md with Codex-specific guidance'). Qwen was the only target whose context file described the installer. Rewrite it against the GEMINI.md structure and add two Qwen-specific sections: - A Claude-tool-name to Qwen-tool-id mapping. ECC skills, rules, and agent prompts are authored for Claude Code, so a Qwen agent following them needs the translation to act correctly. - An explicit 'Not Available On This Target' note. Hook runtime files are not selected for Qwen, so an agent must not report a hook-enforced guard or cost-tracking metric as active. Also records that mcp-configs/ is a baseline catalog rather than a merged settings file. The displaced install documentation is not lost: docs/QWEN-GUIDE.md already covers install, layout, ecc-install-state.json, updating, uninstalling, and the hook scope decision, so QWEN.md now points there instead of duplicating it. Counts in the Overview (68 agents / 293 skills / 94 commands) are verified against the repo and match the figure GEMINI.md already states. --- .qwen/QWEN.md | 82 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 66 insertions(+), 16 deletions(-) diff --git a/.qwen/QWEN.md b/.qwen/QWEN.md index dd27e3d2e..4e52ca71c 100644 --- a/.qwen/QWEN.md +++ b/.qwen/QWEN.md @@ -1,25 +1,75 @@ -# Qwen CLI Configuration +# ECC for Qwen Code -This directory contains ECC's Qwen CLI install template. +This file provides Qwen Code with the baseline ECC workflow, review standards, and security checks for installations that use the `qwen` target. -## Runtime Location +## Overview -The source `.qwen/` directory in this repository is copied into a user's home-level `~/.qwen/` install root when running: +ECC is a cross-harness coding system with 68 specialized agents, 293 skills, and 94 commands. -```bash -./install.sh --target qwen --profile minimal -``` +The Qwen target installs the full managed manifest surface into `~/.qwen/`: `rules/`, `agents/`, `commands/`, `skills/`, and `mcp-configs/`. Qwen Code loads both `~/.qwen/QWEN.md` and `~/.qwen/AGENTS.md` at the home level, so this file carries Qwen-specific guidance and leaves repo-wide operating rules to `AGENTS.md`. -The managed install also writes `~/.qwen/ecc-install-state.json` so future ECC updates and uninstalls can distinguish ECC-owned files from user-owned Qwen configuration. +For install layout, updating, and uninstalling, see `docs/QWEN-GUIDE.md`. -## Installed Surface +## Core Workflow -The Qwen target installs the same managed manifest modules used by other harness adapters: +1. Plan before editing large features. +2. Prefer test-first changes for bug fixes and new functionality. +3. Review for security before shipping. +4. Keep changes self-contained, readable, and easy to revert. -- `rules/` -- `agents/` -- `commands/` -- `skills/` -- `mcp-configs/` +## Coding Standards -Hook runtime files are intentionally not selected for Qwen until the Qwen hook/event contract is verified. +- Prefer immutable updates over in-place mutation. +- Keep functions small and files focused. +- Validate user input at boundaries. +- Never hardcode secrets. +- Fail loudly with clear error messages instead of silently swallowing problems. + +## Security Checklist + +Before any commit: + +- No hardcoded API keys, passwords, or tokens +- All external input validated +- Parameterized queries for database writes +- Sanitized HTML output where applicable +- Authz/authn checked for sensitive paths +- Error messages scrubbed of sensitive internals + +## Delivery Standards + +- Use conventional commits: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`, `ci` +- Run targeted verification for touched areas before shipping +- Prefer contained local implementations over adding new third-party runtime dependencies + +## Reading ECC Content On Qwen Code + +ECC skills, rules, and agent prompts are authored against Claude Code tool names. Qwen Code uses different identifiers, so translate them when following instructions: + +| In ECC content | Qwen Code tool | +| --- | --- | +| `Read` | `read_file` | +| `Write` | `write_file` | +| `Edit`, `MultiEdit` | `edit` | +| `Bash` | `run_shell_command` | +| `Grep` | `grep_search` | +| `Glob` | `glob` | +| `WebFetch` | `web_fetch` | +| `TodoWrite` | `todo_write` | +| `Task` | `agent` | +| `WebSearch` | not available; use `web_fetch` against a known URL | + +Invoke a skill with the `skill` tool using the plain kebab-case name exactly as the session catalog lists it. Dispatch a subagent with the `agent` tool; top-level subagents run in the background and report through a completion notification rather than returning inline. + +Some Qwen Code tools are deferred until their schema is reviewed — reach them with `tool_search`, then invoke them with `tool_call`. `web_fetch`, `send_message`, `task_stop`, and `record_artifact` are deferred by default, so a skill that names one of those is still actionable. + +## Not Available On This Target + +Hook runtime files are intentionally not selected for Qwen until its hook/event contract is confirmed (see the Scope section of `docs/QWEN-GUIDE.md`). Hook-driven ECC features therefore do not run here: do not report a hook-enforced guard, format-on-save pass, or cost-tracking metric as active. `mcp-configs/` ships connector baselines but is not merged into Qwen's own settings, so an MCP-backed skill needs its server registered before it can work. + +## ECC Areas To Reuse + +- `AGENTS.md` for repo-wide operating rules +- `skills/` for deep workflow guidance +- `commands/` for slash-command patterns worth adapting into prompts/macros +- `mcp-configs/` for shared connector baselines From 0bb8403249efdc1c83d5dc537146d0d4414534a8 Mon Sep 17 00:00:00 2001 From: zakyirsyaad Date: Fri, 9 Oct 2026 13:38:43 +0700 Subject: [PATCH 2/2] fix(qwen): correct three claims in the Qwen context file Review corrections, each verified against an installed Qwen Code 0.25.0: 1. web_search does exist. The mapping table said WebSearch had no Qwen equivalent; Qwen Code exposes web_search as a deferred tool backed by a DashScope search agent. Now qualified by provider, with web_fetch as the fallback, and web_search added to the deferred-tools sentence. 2. docs/QWEN-GUIDE.md is not installed. The installer copies .qwen/QWEN.md to ~/.qwen/ but does not copy docs/, so a relative reference to the guide is dead in any session outside an ECC checkout. Now states that explicitly and links the guide in the repository. 3. The AGENTS.md loading claim is now version-qualified. It is accurate for 0.25.0 under default settings -- with no context.fileName configured, Qwen's own debug log resolves "Final ordered QWEN.md,AGENTS.md paths to read" to both files -- but AGENTS.md is not the documented default context filename, so the sentence no longer asserts unconditional behaviour and points at context.fileName instead. --- .qwen/QWEN.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.qwen/QWEN.md b/.qwen/QWEN.md index 4e52ca71c..292d8359c 100644 --- a/.qwen/QWEN.md +++ b/.qwen/QWEN.md @@ -6,9 +6,9 @@ This file provides Qwen Code with the baseline ECC workflow, review standards, a ECC is a cross-harness coding system with 68 specialized agents, 293 skills, and 94 commands. -The Qwen target installs the full managed manifest surface into `~/.qwen/`: `rules/`, `agents/`, `commands/`, `skills/`, and `mcp-configs/`. Qwen Code loads both `~/.qwen/QWEN.md` and `~/.qwen/AGENTS.md` at the home level, so this file carries Qwen-specific guidance and leaves repo-wide operating rules to `AGENTS.md`. +The Qwen target installs the full managed manifest surface into `~/.qwen/`: `rules/`, `agents/`, `commands/`, `skills/`, and `mcp-configs/`. This file carries Qwen-specific guidance; repo-wide operating rules live in `AGENTS.md`. Qwen Code 0.25.0 loads both at the home level under default settings, but `AGENTS.md` is not the documented default context filename, so set `context.fileName` if a later release stops loading it. -For install layout, updating, and uninstalling, see `docs/QWEN-GUIDE.md`. +`docs/QWEN-GUIDE.md` covers install layout, updating, and uninstalling. It lives in the ECC repository and is **not** copied into `~/.qwen/`, so read it from a checkout or from . ## Core Workflow @@ -57,15 +57,15 @@ ECC skills, rules, and agent prompts are authored against Claude Code tool names | `WebFetch` | `web_fetch` | | `TodoWrite` | `todo_write` | | `Task` | `agent` | -| `WebSearch` | not available; use `web_fetch` against a known URL | +| `WebSearch` | `web_search` where the provider supports it; otherwise `web_fetch` against a known URL | Invoke a skill with the `skill` tool using the plain kebab-case name exactly as the session catalog lists it. Dispatch a subagent with the `agent` tool; top-level subagents run in the background and report through a completion notification rather than returning inline. -Some Qwen Code tools are deferred until their schema is reviewed — reach them with `tool_search`, then invoke them with `tool_call`. `web_fetch`, `send_message`, `task_stop`, and `record_artifact` are deferred by default, so a skill that names one of those is still actionable. +Some Qwen Code tools are deferred until their schema is reviewed — reach them with `tool_search`, then invoke them with `tool_call`. `web_fetch`, `web_search`, `send_message`, `task_stop`, and `record_artifact` are deferred by default, so a skill that names one of those is still actionable. ## Not Available On This Target -Hook runtime files are intentionally not selected for Qwen until its hook/event contract is confirmed (see the Scope section of `docs/QWEN-GUIDE.md`). Hook-driven ECC features therefore do not run here: do not report a hook-enforced guard, format-on-save pass, or cost-tracking metric as active. `mcp-configs/` ships connector baselines but is not merged into Qwen's own settings, so an MCP-backed skill needs its server registered before it can work. +Hook runtime files are intentionally not selected for Qwen until its hook/event contract is confirmed (see the Scope section of `docs/QWEN-GUIDE.md` in the ECC repository). Hook-driven ECC features therefore do not run here: do not report a hook-enforced guard, format-on-save pass, or cost-tracking metric as active. `mcp-configs/` ships connector baselines but is not merged into Qwen's own settings, so an MCP-backed skill needs its server registered before it can work. ## ECC Areas To Reuse