feat(qwencode): forward prompt-hook fields and emit QWEN.local.md for localRoot rules - #2526
Merged
Merged
Conversation
… localRoot rules Two Qwen Code follow-ups: Hooks: prompt-type hooks (Qwen Code PR #3388) were emitted without their required prompt body and optional model override — Qwen Code loaded the hook and failed it silently at runtime — and import stripped both fields from existing prompt hooks. Copy prompt/model gated on the prompt type on generate, add both to the import entry schema and conversion, and warn at generate time when a prompt hook has no prompt body. Rules: Qwen Code v0.16.2 (PR #4394) added the personal project context file .qwen/QWEN.local.md, loaded after the shared QWEN.md. localRoot rules were silently dropped for qwencode; they now materialize as .qwen/QWEN.local.md via the separate-local-file mode, with a deletion glob override and a hand-maintained gitignore entry (Qwen Code does not gitignore the file itself). The remaining gap from the issue — import reading the Claude-parity project .mcp.json (code-only surface in v0.18.1) — is deferred to #2525 until upstream documents it. Closes #2507 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d comment Address review findings on #2526: reference QWENCODE_LOCAL_RULE_FILE_NAME from the gitignore entry and the rules factory meta instead of duplicating the literal, and update the canonical model-field comment that still claimed the qwencode adapter does not forward it. The local-root import round-trip gap (codebase-wide convention) is tracked in #2527. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
@dyoshikawa Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves two of the three Qwen Code gaps from the issue; the third is split out to #2525.
Hooks: prompt hooks emitted without
prompt/modelQwen Code's
prompthook type (PR #3388, hooks doc) requires apromptbody (with$ARGUMENTSinterpolation) and accepts an optionalmodel. rulesync admitted the type but never copied either field — the generated hook loaded in Qwen Code and failed silently at runtime — and import stripped both from existing prompt hooks.prompt/modelgated ontype === "prompt"(same pattern as the command/http gating).QwencodeHookEntrySchemaand the canonical conversion (round-trip covered by tests).promptbody now warns at generate time.Rules:
.qwen/QWEN.local.md(localRoot) supportQwen Code v0.16.2 (PR #4394, memory doc) loads the personal project context file
.qwen/QWEN.local.mdafter the sharedQWEN.md.localRoot: truerules were silently dropped for qwencode.separate-local-filelocalRoot mode withQWEN.local.mdunder.qwen/(project scope only — the processor already skips localRoot handling in global mode).getLocalRootDeletionGloboverride points deletion at.qwen/QWEN.local.md(the settable root dir is the project root).**/.qwen/QWEN.local.md(emitted but never committable; Qwen Code does not gitignore it),pnpm dev gitignoreran.Deferred
Gap 3 (import reading the Claude-parity project
.mcp.json, code-only in v0.18.1) is deferred to #2525 per the issue's own recommendation, until upstream documents the surface.Docs updated in
file-formats.md(hooks prose + Qwen rules note), mirrored toskills/rulesync/.Closes #2507
🤖 Generated with Claude Code