fix: migrate Qwen Code CLI from TOML to Markdown format (#1589)#1730
fix: migrate Qwen Code CLI from TOML to Markdown format (#1589)#1730fuyongde wants to merge 1 commit intogithub:mainfrom
Conversation
Qwen Code CLI v0.10.0 deprecated TOML format and fully switched to
Markdown as the core format for configuration and interaction files.
- Update create-release-packages.sh: generate .md files with $ARGUMENTS
instead of .toml files with {{args}} for qwen agent
- Update create-release-packages.ps1: same change for PowerShell script
- Update AGENTS.md: reflect Qwen's new Markdown format in docs and
remove Qwen from TOML format section
- Update tests/test_ai_skills.py: add commands_dir_qwen fixture and
tests covering Markdown-format skills installation for Qwen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
019c671 to
90e6436
Compare
There was a problem hiding this comment.
Pull request overview
Migrates Qwen Code CLI support from TOML to Markdown across release packaging, documentation, and tests to match Qwen Code CLI v0.10.0+ expectations.
Changes:
- Generate Qwen command files as
.mdwith$ARGUMENTSin both bash and PowerShell release packaging scripts. - Update
AGENTS.mdto reflect Qwen’s Markdown command format (and remove it from the TOML list). - Add/extend tests to cover Qwen Markdown command directories and preservation of existing Qwen commands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tests/test_ai_skills.py |
Adds Qwen Markdown fixtures/tests for skills installation and command preservation. |
AGENTS.md |
Updates Qwen format documentation from TOML → Markdown. |
.github/workflows/scripts/create-release-packages.sh |
Switches Qwen release package command generation to Markdown with $ARGUMENTS. |
.github/workflows/scripts/create-release-packages.ps1 |
Mirrors the bash script change for Qwen in PowerShell packaging. |
Comments suppressed due to low confidence (1)
tests/test_ai_skills.py:412
- These test templates are written without an explicit encoding. Since
install_ai_skills()reads templates as UTF-8, setencoding="utf-8"on thesewrite_text()calls to avoid locale-dependent failures on Windows/CI.
(cmds_dir / "speckit.specify.md").write_text(
"---\ndescription: Create or update the feature specification.\n---\n\n# Specify\n\nBody.\n"
)
(cmds_dir / "speckit.plan.md").write_text(
"---\ndescription: Generate implementation plan.\n---\n\n# Plan\n\nBody.\n"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cmd_dir.mkdir(parents=True, exist_ok=True) | ||
| for name in ["speckit.specify.md", "speckit.plan.md", "speckit.tasks.md"]: | ||
| (cmd_dir / name).write_text(f"# {name}\nContent here\n") | ||
| return cmd_dir |
There was a problem hiding this comment.
The fixture writes Markdown files without an explicit encoding. Path.write_text() defaults to the platform locale, while install_ai_skills() reads with UTF-8, so this can fail on non-UTF-8 locales. Write these files with encoding="utf-8" (as the other fixtures in this file already do) to keep tests deterministic.
This issue also appears on line 407 of the same file.
| def test_existing_commands_preserved_qwen(self, project_dir, templates_dir, commands_dir_qwen): | ||
| """install_ai_skills must NOT remove pre-existing .qwen/commands files.""" | ||
| assert len(list(commands_dir_qwen.glob("speckit.*"))) == 3 | ||
|
|
||
| install_ai_skills(project_dir, "qwen") | ||
|
|
There was a problem hiding this comment.
templates_dir is included as a fixture parameter but is not used by this test (and adds unrelated setup of .claude/commands). Drop the unused fixture to keep the test focused and reduce unnecessary work.
| ### TOML Format | ||
|
|
||
| Used by: Gemini, Qwen, Tabnine | ||
| Used by: Gemini, Tabnine | ||
|
|
There was a problem hiding this comment.
This section correctly removes Qwen from the TOML list, but the earlier “Markdown Format” section’s “Used by:” list still omits Qwen even though it’s now documented as Markdown in the supported agents table. Add Qwen there to keep the documentation consistent.
| # NOTE: We substitute {ARGS} internally. Outward tokens differ intentionally: | ||
| # * Markdown/prompt (claude, copilot, cursor-agent, opencode): $ARGUMENTS | ||
| # * TOML (gemini, qwen, tabnine): {{args}} | ||
| # * Markdown/prompt (claude, copilot, cursor-agent, opencode, qwen): $ARGUMENTS | ||
| # * TOML (gemini, tabnine): {{args}} | ||
| # This keeps formats readable without extra abstraction. |
There was a problem hiding this comment.
This comment lists only a subset of Markdown/prompt agents, but many other agents in this script also use $ARGUMENTS. Consider either enumerating all Markdown-based agents here or rewording to avoid an incomplete list (e.g., “Markdown/prompt-based agents: $ARGUMENTS”).
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback where applicable. When not applicable, please explain why. Thanks!
Summary
Background
Qwen Code CLI v0.10.0 deprecated the TOML format and fully switched to Markdown as the core format for configuration and interaction files. The
current spec-kit codebase still retained logic for adapting to Qwen Code CLI's TOML format, leading to compatibility issues with the latest version.
Reference: https://qwenlm.github.io/qwen-code-docs/en/users/features/commands/#4-custom-commands
Changes
1. Release Scripts
.mdfiles with$ARGUMENTSinstead of.tomlfiles with{{args}}2. Documentation
3. Tests
commands_dir_qwenfixture for Markdown-format Qwen commandstest_qwen_md_commands_dir_installs_skillsto verify skills installation from Markdown templatestest_existing_commands_preserved_qwento ensure existing commands are not removedTest plan
specify init --ai qwenwith Qwen Code CLI v0.10.0+Compatibility
specify init --ai qwenFixes #1589