Skip to content

Conversation

@AndersHsueh
Copy link
Contributor

@AndersHsueh AndersHsueh commented Oct 28, 2025

  • Add QwenSlashCommandConfigurator for .qwen/commands/ structure
  • Add QwenConfigurator to main registry
  • Update README.md to include Qwen Code in supported tools list
  • Register Qwen in both slash command and main tool registries
  • Implement proper YAML frontmatter for Qwen command files
  • Follow OpenSpec's established patterns for AI tool integration

for Chinese:
1 ## 概述
2 为 OpenSpec 添加 Qwen Code 支持,使其能够使用原生斜杠命令。
3
4 ## 变更内容
5 - 添加了 QwenSlashCommandConfigurator,用于生成 .qwen/commands/ 目录结构
6 - 添加了 QwenConfigurator 并注册到主配置器系统
7 - 在 README.md 中添加了 Qwen Code 到支持的 AI 工具列表
8 - 在斜杠命令和主工具注册表中注册了 Qwen
9 - 为 Qwen 命令文件实现了适当的 YAML frontmatter
10 - 遵循了 OpenSpec 建立的 AI 工具集成模式
11
12 ## 文件变更
13 - src/core/configurators/slash/qwen.ts - Qwen 斜杠命令配置器
14 - src/core/configurators/qwen.ts - Qwen 主配置器
15 - src/core/configurators/slash/registry.ts - 注册 Qwen 到斜杠命令注册表
16 - src/core/configurators/registry.ts - 注册 Qwen 到主注册表
17 - src/core/config.ts - 在 AI 工具列表中添加 Qwen
18 - README.md - 在支持的工具列表中添加 Qwen Code
19
20 ## 测试
21 - 所有 TypeScript 编译通过
22 - 所有 243 个测试用例通过
23 - 与现有功能完全兼容
24
25 ## 使用说明
26 用户现在可以在 openspec init 过程中选择 Qwen Code 工具,系统将在 .qwen/commands/ 目录中生成三个斜杠命令文件:
27 - openspec-proposal.md
28 - openspec-apply.md
29 - openspec-archive.md
30
31 这样 Qwen Code 用户就可以使用 /openspec-proposal/openspec-apply/openspec-archive 命令参与 OpenSpec
工作流程。

Summary by CodeRabbit

  • New Features

    • Added Qwen Code as a supported AI tool with OpenSpec slash commands (/openspec-proposal, /openspec-apply, /openspec-archive) and configuration support.
  • Documentation

    • Updated README to include Qwen Code command reference and configuration directory.
  • Tests

    • Added tests covering Qwen configuration, slash command generation, and update behaviors.
  • Chores

    • Updated TypeScript dev dependency to v5.9.3.

@AndersHsueh AndersHsueh requested a review from TabishB as a code owner October 28, 2025 15:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

Adds Qwen Code support across docs, config, configurators, registries, and tests; bumps TypeScript devDependency; minor .gitignore newline fix.

Changes

Cohort / File(s) Summary
Docs & Gitignore
README.md, .gitignore
Added Qwen Code row to Supported Native Slash Commands; minor newline formatting fix in .gitignore.
Build deps
package.json
Bumped devDependency typescript from ^5.9.2 to ^5.9.3.
Core config
src/core/config.ts
Added new AI_TOOLS entry for "Qwen Code" (value: 'qwen', available: true, successLabel: 'Qwen Code').
Tool configurator
src/core/configurators/qwen.ts
New QwenConfigurator implementing ToolConfigurator; name='Qwen Code', configFileName='QWEN.md', isAvailable=true, and async configure(projectPath, _openspecDir) which injects agents template into QWEN.md between OpenSpec markers.
Configurator registry
src/core/configurators/registry.ts
Imported and instantiated QwenConfigurator; registered under key 'qwen'.
Slash-command configurator
src/core/configurators/slash/qwen.ts
New QwenSlashCommandConfigurator implementing SlashCommandConfigurator; defines toolId='qwen', isAvailable=true, FILE_PATHS for .qwen/commands/openspec-*.md, and FRONTMATTER strings; implements getRelativePath and getFrontmatter.
Slash-command registry
src/core/configurators/slash/registry.ts
Imported and registered QwenSlashCommandConfigurator instance under 'qwen'.
Tests
test/core/init.test.ts, test/core/update.test.ts
Added tests for creating/updating QWEN.md and .qwen/commands/openspec-*.md, marker injection, AGENTS.md handling, refresh/update behaviors, and related log assertions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Registry as Tool Registry
    participant QwenConfig as QwenConfigurator
    participant SlashConfig as QwenSlashConfigurator
    participant Template as TemplateManager
    participant FS as FileSystemUtils

    User->>Registry: init('qwen')
    Registry->>QwenConfig: configure(projectPath)
    QwenConfig->>Template: getAgentsStandardTemplate()
    Template-->>QwenConfig: templateContent
    QwenConfig->>FS: updateFileWithMarkers(projectPath + '/QWEN.md', templateContent)
    FS-->>QwenConfig: OK
    Registry->>SlashConfig: configure slash commands
    SlashConfig->>Template: build command templates (frontmatter + body)
    Template-->>SlashConfig: commandTemplate
    SlashConfig->>FS: ensure/update `.qwen/commands/openspec-*.md`
    FS-->>SlashConfig: OK
    Registry-->>User: complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Attention points:
    • src/core/configurators/slash/qwen.ts: verify FILE_PATHS ↔ FRONTMATTER alignment and YAML correctness.
    • src/core/configurators/qwen.ts: confirm OPENSPEC_MARKERS usage preserves pre/post file content and handles missing files.
    • Registry files: ensure consistent key 'qwen' and import paths/exports match surrounding registries.
    • Tests: check for duplicated test blocks and ensure idempotency/cleanup between tests.

Possibly related PRs

Poem

🐰 I hopped through code and left a trace,
Qwen's small files tucked into place.
Markers set and templates sewn,
Tiny commands find a home—
A carrot-cheer for this neat space! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: add Qwen Code support with slash command integration" directly and accurately reflects the primary objective of the changeset. The title captures both key aspects: the addition of Qwen Code as a new AI tool and the implementation of slash command integration (QwenSlashCommandConfigurator). The language is concise, clear, and follows conventional commit format without vague terms or noise. The changes across multiple files (new configurators, registry updates, config.ts, README.md, and tests) all serve this central purpose of enabling Qwen Code support with slash commands, making the title an appropriate summary of the main change.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c78f5b and ba985db.

📒 Files selected for processing (1)
  • test/core/init.test.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/core/init.test.ts

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
README_CN.md (1)

331-331: Minor grammar clarification on line 331.

Consider adding a measure word for clarity: change "提供较少结构" to "提供较少的结构" or rephrase as "提供的结构较少" for better grammatical flow.

src/core/configurators/qwen.ts (2)

23-23: Consider adding a newline at end of file.

The file is missing a trailing newline, which is a common convention in many codebases and can prevent issues with certain tools and version control systems.

Apply this diff:

   }
 }
+

12-12: Use _openspecDir prefix to indicate intentionally unused parameter, consistent with AgentsStandardConfigurator.

The openspecDir parameter is intentionally unused—all configurators (Claude, Cline, CodeBuddy, Agents) write their config files to the project root, not the openspec directory. However, AgentsStandardConfigurator marks this with _openspecDir following TypeScript conventions. Rename the parameter to _openspecDir in QwenConfigurator (and similarly in Claude, Cline, CodeBuddy) for consistency.

supportQwen.md (1)

54-54: Consider addressing markdown style issues.

Static analysis detected minor markdown formatting issues:

  1. Lines 54 and 249: Fenced code blocks are missing language specifiers. Consider adding language identifiers (e.g., ```bash or ```text).

  2. Lines 187-189, 230: Commands with $ prefix without showing output. While this is a common convention, the linter suggests either showing output or removing the $ prefix for documentation clarity.

Example fix for line 54:

-```
+```bash
 .qwen/
 ├── commands/
 │   ├── openspec-proposal.md

Example fix for lines 187-189:

-$ openspec init
-$ verify .qwen/commands/
-$ test slash commands
+openspec init
+# Verify .qwen/commands/ directory exists
+# Test slash commands availability

Also applies to: 187-189, 230-230, 249-249

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a665807 and bc722d6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • README.md (1 hunks)
  • README_CN.md (1 hunks)
  • package.json (1 hunks)
  • src/core/config.ts (1 hunks)
  • src/core/configurators/qwen.ts (1 hunks)
  • src/core/configurators/registry.ts (2 hunks)
  • src/core/configurators/slash/qwen.ts (1 hunks)
  • src/core/configurators/slash/registry.ts (3 hunks)
  • supportQwen.md (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/core/configurators/registry.ts (1)
src/core/configurators/qwen.ts (1)
  • QwenConfigurator (7-23)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/qwen.ts (1)
  • QwenSlashCommandConfigurator (31-42)
src/core/configurators/qwen.ts (4)
src/core/configurators/base.ts (1)
  • ToolConfigurator (1-6)
src/core/templates/index.ts (1)
  • TemplateManager (13-42)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
src/core/config.ts (1)
  • OPENSPEC_MARKERS (3-6)
🪛 LanguageTool
README_CN.md

[uncategorized] ~45-~45: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最少"地"设置
Context: ...ec比较(一目了然) - 轻量级:简单的工作流程,无需API密钥,最少的设置。 - 棕地优先:在0→1之后表现优异。OpenSpec将真实来源与...

(wb4)


[uncategorized] ~111-~111: “关于”组成的介词短语必需位于句首,或请改用"对于"代替。
Context: ...`读取工作流程说明。如果需要提醒,要求它们遵循OpenSpec工作流程。了解更多关于 AGENTS.md 约定。 | ...

(wb2)


[uncategorized] ~331-~331: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...态和差异分离。这在修改现有功能或触摸多个规范时扩展。spec-kit在绿地/0→1方面很强,但在跨规范更新和演变功能方面提供较少结构。 ### 与Kiro.dev相...

(wa5)


[uncategorized] ~344-~344: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:相同"地"规范
Context: ...CodeBuddy、Cursor或任何AGENTS.md兼容的工具,同时共享相同的规范。 每当有人切换工具时运行openspec update,以便您的代理...

(wb4)


[uncategorized] ~346-~346: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最新"地"说明
Context: ... 每当有人切换工具时运行openspec update,以便您的代理获取最新的说明和斜杠命令绑定。 ## 更新OpenSpec 1. 升级包 ...

(wb4)

🪛 markdownlint-cli2 (0.18.1)
supportQwen.md

54-54: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


187-187: Dollar signs used before commands without showing output

(MD014, commands-show-output)


188-188: Dollar signs used before commands without showing output

(MD014, commands-show-output)


189-189: Dollar signs used before commands without showing output

(MD014, commands-show-output)


230-230: Dollar signs used before commands without showing output

(MD014, commands-show-output)


249-249: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (7)
package.json (1)

62-62: Approved: TypeScript patch version bump.

The update from ^5.9.2 to ^5.9.3 is a safe patch-level bump with no breaking changes expected. This is further validated by the PR's successful TypeScript compilation and all 243 tests passing.

src/core/configurators/qwen.ts (1)

1-23: LGTM! Implementation follows established patterns.

The QwenConfigurator correctly implements the ToolConfigurator interface and follows the same pattern as other tool configurators (Claude, Cline, CodeBuddy). It properly uses TemplateManager to retrieve the standard agents template and FileSystemUtils to write the QWEN.md file with marker-based updates.

src/core/configurators/slash/qwen.ts (1)

1-42: LGTM! Slash command configurator is well-structured.

The QwenSlashCommandConfigurator correctly implements the slash command pattern:

  • FILE_PATHS properly maps all three command IDs to .qwen/commands/ directory
  • FRONTMATTER includes valid YAML with appropriate metadata (name, id, category, description)
  • Class implementation cleanly extends SlashCommandConfigurator with minimal boilerplate
  • Follows the established pattern seen in other slash command configurators
src/core/configurators/registry.ts (1)

6-6: LGTM! Registry integration is correct.

The QwenConfigurator is properly imported, instantiated, and registered in the ToolRegistry with the key 'qwen', following the exact pattern used for other tool configurators.

Also applies to: 16-16, 22-22

README.md (1)

106-106: LGTM! Documentation update is accurate.

The Qwen Code entry is properly added to the supported AI tools table with correct slash command names and directory structure (.qwen/commands/), consistent with other tool entries.

src/core/config.ts (1)

33-33: LGTM! Configuration entry is properly structured.

The Qwen Code entry correctly implements the AIToolOption interface with appropriate values:

  • value: 'qwen' matches the registry key
  • available: true enables the tool for selection
  • successLabel provides clear user feedback
src/core/configurators/slash/registry.ts (1)

15-15: LGTM! Slash command registry integration is correct.

The QwenSlashCommandConfigurator is properly imported, instantiated, and registered in the SlashCommandRegistry, following the established pattern for other slash command configurators.

Also applies to: 34-34, 49-49

@AndersHsueh
Copy link
Contributor Author

issue resolved. please check.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/core/configurators/qwen.ts (2)

36-36: Prefix unused parameter with underscore.

The openspecDir parameter is intentionally unused. Following TypeScript conventions and the pattern in AgentsStandardConfigurator (src/core/configurators/agents.ts line 11), prefix it with an underscore to indicate this is intentional.

Apply this diff:

-  async configure(projectPath: string, openspecDir: string): Promise<void> {
+  async configure(projectPath: string, _openspecDir: string): Promise<void> {

48-48: Remove unnecessary comment.

The comment "Ensure the file ends with a newline character" doesn't correspond to any actual code. The newline handling is already managed by FileSystemUtils.updateFileWithMarkers().

Apply this diff:

   }
 }
-// Ensure the file ends with a newline character
supportQwen.md (1)

99-151: Documentation examples don't match actual implementation.

The code examples in this design document show a different implementation approach than what was actually implemented:

Example shows (lines 99-127):

  • commandDir = '.qwen/commands'
  • getTemplateType() method
  • generate() method with loop

Actual implementation (slash/qwen.ts) uses:

  • toolId = 'qwen'
  • getRelativePath() method
  • getFrontmatter() method
  • Leverages base class generateAll() method

This discrepancy could confuse developers trying to understand or maintain the Qwen Code integration. Consider either:

  1. Updating the examples to match the final implementation, or
  2. Adding a note clarifying these are initial design ideas and the actual implementation differs
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc722d6 and 6ea139d.

📒 Files selected for processing (4)
  • README_CN.md (1 hunks)
  • src/core/configurators/qwen.ts (1 hunks)
  • src/core/configurators/slash/qwen.ts (1 hunks)
  • supportQwen.md (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/core/configurators/slash/qwen.ts (2)
src/core/configurators/slash/amazon-q.ts (1)
  • AmazonQSlashCommandConfigurator (40-51)
src/core/configurators/slash/codex.ts (1)
  • CodexSlashCommandConfigurator (15-126)
src/core/configurators/qwen.ts (5)
src/core/configurators/base.ts (1)
  • ToolConfigurator (1-6)
src/core/templates/index.ts (1)
  • TemplateManager (13-42)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
src/core/config.ts (1)
  • OPENSPEC_MARKERS (3-6)
src/core/configurators/agents.ts (2)
  • AgentsStandardConfigurator (7-23)
  • configure (12-22)
supportQwen.md (4)
src/core/configurators/slash/opencode.ts (1)
  • OpenCodeSlashCommandConfigurator (36-81)
src/core/configurators/slash/codex.ts (1)
  • CodexSlashCommandConfigurator (15-126)
src/core/configurators/slash/cline.ts (1)
  • ClineSlashCommandConfigurator (10-27)
src/core/configurators/slash/factory.ts (1)
  • FactorySlashCommandConfigurator (25-41)
🪛 LanguageTool
README_CN.md

[uncategorized] ~45-~45: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最少"地"设置
Context: ...ec比较(一目了然) - 轻量级:简单的工作流程,无需API密钥,最少的设置。 - 棕地优先:在0→1之后表现优异。OpenSpec将真实来源与...

(wb4)


[uncategorized] ~112-~112: “关于”组成的介词短语必需位于句首,或请改用"对于"代替。
Context: ...`读取工作流程说明。如果需要提醒,要求它们遵循OpenSpec工作流程。了解更多关于 AGENTS.md 约定。 | ...

(wb2)


[uncategorized] ~332-~332: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...态和差异分离。这在修改现有功能或触摸多个规范时扩展。spec-kit在绿地/0→1方面很强,但在跨规范更新和演变功能方面提供较少结构。 ### 与Kiro.dev相...

(wa5)


[uncategorized] ~345-~345: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:相同"地"规范
Context: ...CodeBuddy、Cursor或任何AGENTS.md兼容的工具,同时共享相同的规范。 每当有人切换工具时运行openspec update,以便您的代理...

(wb4)


[uncategorized] ~347-~347: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最新"地"说明
Context: ... 每当有人切换工具时运行openspec update,以便您的代理获取最新的说明和斜杠命令绑定。 ## 更新OpenSpec 1. 升级包 ...

(wb4)

🪛 markdownlint-cli2 (0.18.1)
supportQwen.md

9-9: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


14-14: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


20-20: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


25-25: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


30-30: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


36-36: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


43-43: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


77-77: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


78-78: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


83-83: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


87-87: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


96-96: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


129-129: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


153-153: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


175-175: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


192-192: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

README_CN.md

50-50: Link fragments should be valid

(MD051, link-fragments)


54-54: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


187-187: Dollar signs used before commands without showing output

(MD014, commands-show-output)


188-188: Dollar signs used before commands without showing output

(MD014, commands-show-output)


189-189: Dollar signs used before commands without showing output

(MD014, commands-show-output)


230-230: Dollar signs used before commands without showing output

(MD014, commands-show-output)


249-249: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
src/core/configurators/slash/qwen.ts (1)

1-80: LGTM! Clean implementation following established patterns.

The QwenSlashCommandConfigurator implementation is well-structured and follows the same pattern as other simple slash command configurators (e.g., amazon-q.ts). The YAML frontmatter format is appropriate for Qwen Code, and the file paths follow the expected .qwen/commands/ convention.

src/core/configurators/qwen.ts (1)

18-46: Core implementation follows established pattern correctly.

The QwenConfigurator correctly implements the ToolConfigurator interface and follows the same pattern as AgentsStandardConfigurator. It appropriately uses getAgentsStandardTemplate() to generate the QWEN.md configuration file with OpenSpec markers.

@AndersHsueh
Copy link
Contributor Author

OK, fixed it . pls recheck . Tks.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
supportQwen.md (2)

9-9: Consider fixing markdown formatting issues.

The static analysis tool flagged several instances where bold text is used instead of proper headings (MD036). While this doesn't affect functionality, converting these to proper heading levels would improve document structure and navigation.

Example conversion:

-**A. 原生斜杠命令支持**
+#### A. 原生斜杠命令支持

Also applies to: 14-14, 20-20, 25-25, 30-30, 36-36, 43-43, 77-77, 87-87, 96-96, 144-144, 168-168, 190-190, 207-207


78-84: Add language identifiers to fenced code blocks.

The fenced code blocks at lines 78-80 and 83-85 are missing language identifiers, which affects syntax highlighting and accessibility.

Apply this pattern:

-```
+```text
 src/core/configurators/slash/qwen.ts

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 6ea139d9218e421dbfdf10354b2f441659893d9c and faaad57745f180094639e283af75b05fa17c636e.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `src/core/configurators/qwen.ts` (1 hunks)
* `supportQwen.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code graph analysis (1)</summary>

<details>
<summary>src/core/configurators/qwen.ts (4)</summary><blockquote>

<details>
<summary>src/core/configurators/base.ts (1)</summary>

* `ToolConfigurator` (1-6)

</details>
<details>
<summary>src/core/templates/index.ts (1)</summary>

* `TemplateManager` (13-42)

</details>
<details>
<summary>src/utils/file-system.ts (1)</summary>

* `FileSystemUtils` (44-187)

</details>
<details>
<summary>src/core/config.ts (1)</summary>

* `OPENSPEC_MARKERS` (3-6)

</details>

</blockquote></details>

</details><details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

<details>
<summary>supportQwen.md</summary>

9-9: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

14-14: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

20-20: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

25-25: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

30-30: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

36-36: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

43-43: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

77-77: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

78-78: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

83-83: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

87-87: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

96-96: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

144-144: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

168-168: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

190-190: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

207-207: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>src/core/configurators/qwen.ts (2)</summary><blockquote>

`1-26`: **LGTM! Class declaration follows established patterns.**

The QwenConfigurator correctly implements the ToolConfigurator interface with appropriate properties and follows the same structure as other tool configurators in the codebase.

---

`44-54`: **Implementation correctly follows the ToolConfigurator pattern.**

The configure method properly:
- Constructs the file path using path.join
- Retrieves the standard template via TemplateManager
- Updates the file with OpenSpec markers using FileSystemUtils

This matches the established pattern used by other configurators in the codebase.

</blockquote></details>
<details>
<summary>supportQwen.md (1)</summary><blockquote>

`1-46`: **The review comment is based on incorrect assumptions about this repository's documentation conventions.**

This repository places documentation files in the root directory (README.md, CHANGELOG.md, AGENTS.md, openspec-parallel-merge-plan.md), not in a docs/ subdirectory. The supportQwen.md file follows this established pattern and is properly placed. Its commit history shows it was intentionally added as a feature (`feat: add Qwen Code support with slash command integration`) with subsequent fixes, indicating it is finalized documentation, not temporary design notes.



> Likely an incorrect or invalid review comment.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@AndersHsueh AndersHsueh force-pushed the feature/support-qwen-code branch from faaad57 to 3dbf824 Compare October 28, 2025 16:02
@AndersHsueh
Copy link
Contributor Author

removed unused files.

@AndersHsueh AndersHsueh changed the title ffeat: add Qwen Code support with slash command integration feat: add Qwen Code support with slash command integration Oct 28, 2025
@Huge
Copy link

Huge commented Oct 29, 2025

Looks good from a quick review.
This would be a worthy base for supporting Gemini CLI also as they are based on one another.

@TabishB
Copy link
Contributor

TabishB commented Oct 29, 2025

@AndersHsueh We need to regenerate the lock file, since we update the package.json here. Also we're missing some unit tests for this. Happy to help add this in/fix this, just let me know and I'll take care of it.

@AndersHsueh
Copy link
Contributor Author

AndersHsueh commented Oct 30, 2025

@TabishB , thanks .
I am a new GitHub user, I don't know how to use it for commit code . need your help .

@TabishB
Copy link
Contributor

TabishB commented Oct 30, 2025

@AndersHsueh No worries, I'll have this fixed.

@AndersHsueh
Copy link
Contributor Author

Thanks a lot @TabishB

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
test/core/init.test.ts (1)

352-398: Good test coverage for Qwen init flow.

The test validates file creation and content appropriately. However, for consistency with other tool tests (Claude, Cline), consider adding two companion tests:

  1. Update existing QWEN.md with markers during init (similar to lines 121-137 for Claude and 154-170 for Cline): validates that init adds OpenSpec markers to pre-existing QWEN.md while preserving custom content.
  2. Mark Qwen as already configured during extend mode (similar to lines 727-795 for other tools): validates that running init twice marks Qwen as configured on the second run.

Example for test #1:

it('should update existing QWEN.md with markers', async () => {
  queueSelections('qwen', DONE);

  const qwenPath = path.join(testDir, 'QWEN.md');
  const existingContent = '# My Qwen Instructions\nCustom instructions here';
  await fs.writeFile(qwenPath, existingContent);

  await initCommand.execute(testDir);

  const updatedContent = await fs.readFile(qwenPath, 'utf-8');
  expect(updatedContent).toContain('<!-- OPENSPEC:START -->');
  expect(updatedContent).toContain("@/openspec/AGENTS.md");
  expect(updatedContent).toContain('openspec update');
  expect(updatedContent).toContain('<!-- OPENSPEC:END -->');
  expect(updatedContent).toContain('Custom instructions here');
});

Example for test #2:

it('should mark Qwen as already configured during extend mode', async () => {
  queueSelections('qwen', DONE, 'qwen', DONE);
  await initCommand.execute(testDir);
  await initCommand.execute(testDir);

  const secondRunArgs = mockPrompt.mock.calls[1][0];
  const qwenChoice = secondRunArgs.choices.find(
    (choice: any) => choice.value === 'qwen'
  );
  expect(qwenChoice.configured).toBe(true);
});
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3dbf824 and d67e0fc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • src/core/configurators/qwen.ts (1 hunks)
  • test/core/init.test.ts (1 hunks)
  • test/core/update.test.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/core/configurators/qwen.ts
🧰 Additional context used
🧬 Code graph analysis (2)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
  • fileExists (76-86)
test/core/update.test.ts (1)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
🔇 Additional comments (4)
test/core/update.test.ts (4)

76-109: LGTM!

The test correctly validates that the update command refreshes existing QWEN.md while preserving surrounding content and updating the OpenSpec block. Console logging assertions are appropriate.


152-191: LGTM!

The test correctly validates that existing Qwen slash command files are refreshed with updated content while preserving frontmatter. The assertion for "Work through tasks sequentially" confirms the apply workflow is properly injected.


193-231: LGTM!

The test correctly validates that the update command only refreshes existing Qwen slash command files and does not create missing ones. This behavior is consistent with other tools and prevents unexpected file creation.


245-249: LGTM!

The test correctly validates that update does not create QWEN.md if it doesn't exist, maintaining the expected behavior of only updating existing configuration files.

AndersHsueh and others added 9 commits November 3, 2025 00:16
- Add QwenSlashCommandConfigurator for .qwen/commands/ structure
- Add QwenConfigurator to main registry
- Update README.md to include Qwen Code in supported tools list
- Register Qwen in both slash command and main tool registries
- Implement proper YAML frontmatter for Qwen command files
- Follow OpenSpec's established patterns for AI tool integration

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add comprehensive JSDoc comments to Qwen configurator files
- Add Qwen Code entry to README_CN.md support table
- Fix file ending newline in src/core/configurators/qwen.ts
- Address CodeRabbit review suggestions for improved documentation coverage

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix unused parameter naming convention (_openspecDir)
- Keep only necessary changes for Qwen Code support

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove README_CN.md and supportQwen.md from git tracking
- These files are now ignored via .gitignore
- Keep only necessary files for the OpenSpec project

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove duplicate documentation comment for configure method
- Keep only the updated comment that correctly documents the unused parameter

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@TabishB TabishB force-pushed the feature/support-qwen-code branch from d67e0fc to 6c78f5b Compare November 2, 2025 13:17
@TabishB
Copy link
Contributor

TabishB commented Nov 2, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TabishB
Copy link
Contributor

TabishB commented Nov 2, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@AndersHsueh
Copy link
Contributor Author

@TabishB Thank you for your help! I can see the additional test coverage and other fixes you've added.
Could you please let me know what else needs to be done in order to get this feature merged into
main? Much appreciated!

@TabishB TabishB merged commit 8f9c3c7 into Fission-AI:main Nov 3, 2025
7 checks passed
@TabishB
Copy link
Contributor

TabishB commented Nov 3, 2025

@AndersHsueh Hey we're all good! I just forgot to press merge! Thanks for the contrib, will be released in the next hour ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants