Skip to content

Conversation

@es-zx
Copy link

@es-zx es-zx commented Sep 28, 2025

TLDR

This pull request introduces a complete spec-driven development workflow by adding the /add-spec command and associated template files. This enables users to follow a structured approach to feature development using specifications and steering documents.

Dive Deeper

The changes implement a Kiro-style Spec Driven Development approach with the following key additions:

  1. New /add-spec slash command that copies spec scaffolding templates to the user's project

  2. Spec templates located in packages/cli/src/ui/commands/spec/ include:

    • QWEN.md documentation explaining the spec-driven workflow
    • Template files in .qwen/commands/ for various spec-related commands
    • Configuration patterns for steering and specification files
  3. The command implementation includes logic to:

    • Safely copy template files to the project directory
    • Skip existing files to prevent overwriting user content
    • Report which files were created vs. skipped
    • Handle errors gracefully with appropriate messages
  4. Comprehensive tests are included to validate the functionality

This feature provides a structured development approach that guides users through requirements gathering, design, and task planning before implementation.

Reviewer Test Plan

  1. Pull the code and build the project: npm run build
  2. Test the new command by running: npx @qwen-code/qwen-code and then typing /add-spec
  3. Verify that spec template files are copied to the current directory
  4. You will see that a .qwen folder has been created in the project root directory.
  5. Restart Qwen, some additional slash commands will be added.

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

@ihatenodejs
Copy link

I like this feature idea, and I'll do some testing with bun as well, which I believe is missing from this. In terms of the prompts, have you taken a close look at them? The new commands add too much to the context window, in my opinion. With some cleanup, I think this could be a really good feature.

@es-zx
Copy link
Author

es-zx commented Sep 29, 2025

n

My prompt comes from Kiro AI IDE, and I think it is already in its most perfect state. Kiro directly reads the prompt and generates documents, so the prompt tends to be larger.
The GitHub Spec Kit uses commands to copy a template and then modify it. Since Qwen does not have the ability to partially read documents, both approaches consume tokens equal to the entire document.
Also, I tested that Kiro performs better than the Spec Kit because it has a steering function that can align new specifications with existing ones.

@es-zx es-zx requested a review from ihatenodejs September 30, 2025 07:01
@ihatenodejs
Copy link

Do you know if they have any copyright over the prompts? I'll do some testing with some prompt variations, but so far the prompt seems to be handled by Qwen very well.

@es-zx
Copy link
Author

es-zx commented Oct 1, 2025

Do you know if they have any copyright over the prompts? I'll do some testing with some prompt variations, but so far the prompt seems to be handled by Qwen very well.

Thanks for the reminder, I've now added the MIT LICENSE file.
The prompts is copied from https://github.com/gotalab/cc-sdd/

@Mingholy
Copy link
Collaborator

Spec-kit seems to provide similar functionalities, so we're not going to maintain a set of built-in spec commands, unless it's a big improvement and we're doing a lot better than the community version.

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