feat(skills): add repository knowledge lifecycle - #9999
Draft
HiWhaleW wants to merge 2 commits into
Draft
Conversation
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.
What this PR does
This PR adds a project-level knowledge lifecycle skill that routes repository knowledge to the artifact matching its lifecycle, keeps one canonical source per fact, and distinguishes analyze-only behavior from authorized writes. It also adds a bounded knowledge-closeout step to the existing feature and bug-fix workflows, plus a short design record for the accepted v1 decisions and scope.
Why it's needed
Qwen Code already has instructions, current documentation, design records, GitHub state, executable constraints, and temporary work artifacts, but its development workflows do not share a decision process for choosing which source should own newly learned information. The new skill reduces duplicated facts, stale handoffs, and temporary status leaking into durable documentation without introducing a new store or index.
Reviewer Test Plan
How to verify
npm run preflightin the full source tree.0.22.0with local Ollamaqwen3:8b, then test both plan mode and explicit/knowledge-lifecycleinvocation against the four-file fixture.Results
format,lint,build, andtypecheckpassed. CLI tests finished with 24 files passed and 1 failed:AuthDialog.test.tsxhas a stable MiniMax navigation assertion failure unrelated to this documentation-only diff. Core tests initially had 10 failures because the source tree lacked.git; after restoring Git metadata, the targetedgitUtils.test.tsrerun passed 12/12.skillandread_filewere registered; write tools were not registered; fixture hashes did not change.knowledge-lifecycle, and the session ended before the fourth file. This is not claimed as a successful end-to-end routing verification./knowledge-lifecycleplus auto-edit, the first edit was rejected because the file had not yet been read. After reading, Qwen Code changed onlycurrent-behavior.md(--dry-run→--preview), reread it successfully, and all other fixture hashes remained unchanged.qwen3:8bmodel was removed.Evidence (Before & After)
N/A — project workflow documentation only; no user-facing UI or runtime behavior changes.
Tested on
Environment (optional)
macOS, Qwen Code
0.22.0, and a temporary local Ollamaqwen3:8bmodel. The model was deleted after verification.Risk & Scope
Linked Issues
Fixes #9781
中文说明
本 PR 做了什么
本 PR 新增一个项目级知识生命周期 Skill,根据信息生命周期将仓库知识路由到正确工件,确保一条事实只有一个权威来源,并区分只读分析与已授权写入。同时,它在现有 Feature 与 Bug 修复流程中加入一个有边界的知识收尾步骤,并用一份简短设计记录保存第一版已接受的决策和范围。
为什么需要它
Qwen Code 已有工作指令、当前文档、设计记录、GitHub 状态、可执行约束和临时工作工件,但开发流程之间缺少一套共同的判断机制,用于决定新获得的信息应该由哪个来源负责。新 Skill 在不引入新存储或新索引的前提下,减少重复事实、过期交接以及临时状态进入长期文档的问题。
Reviewer Test Plan
如何验证
npm run preflight。0.22.0与本地 Ollamaqwen3:8b,针对四文件 fixture 分别测试 plan 模式和显式/knowledge-lifecycle调用。结果
format、lint、build、typecheck通过。CLI 测试为 24 个文件通过、1 个失败:AuthDialog.test.tsx存在稳定的 MiniMax 导航断言失败,与本次纯文档 diff 无关。Core 测试最初因源码树缺少.git出现 10 个失败;恢复 Git 元数据后,定向复跑gitUtils.test.ts为 12/12 通过。skill与read_file,未注册写工具;fixture 哈希未变化。knowledge-lifecycle,并在读取第 4 个文件前结束。本 PR 不把它表述为端到端路由验证成功。/knowledge-lifecycle加 auto-edit 时,首次编辑因尚未读取文件被拒绝;读取后,Qwen Code 只修改了current-behavior.md(--dry-run→--preview),复读成功,其他 fixture 哈希均未变化。qwen3:8b模型。前后证据
N/A——仅修改项目工作流文档,没有用户可见 UI 或运行时行为变化。
已测试系统
环境
macOS、Qwen Code
0.22.0,以及临时使用的本地 Ollamaqwen3:8b模型。验证完成后已删除该模型。风险与范围
关联 Issue
Fixes #9781