@hupan56/wlkj 2.7.11 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/bin/cli.js +375 -78
  2. package/package.json +29 -29
  3. package/templates/.qoder/.runtime/ctx-cache-5660152f1d6dd819.md +23 -0
  4. package/templates/.qoder/.runtime/ctx-cache-afdce0dac06b25b0.md +23 -0
  5. package/templates/.qoder/.runtime/search-cache-eae7644e7b122f35.txt +1 -0
  6. package/templates/.qoder/learning/eval-history.jsonl +28 -0
  7. package/templates/data/index/wiki-index.json +8 -0
  8. package/templates/qoder/agents/insight-planning.md +1 -1
  9. package/templates/qoder/agents/insight-research.md +28 -15
  10. package/templates/qoder/commands/optional/wl-insight.md +159 -161
  11. package/templates/qoder/commands/optional/wl-report.md +4 -4
  12. package/templates/qoder/commands/optional/wl-status.md +2 -2
  13. package/templates/qoder/commands/wl-code.md +2 -2
  14. package/templates/qoder/commands/wl-design.md +2 -2
  15. package/templates/qoder/commands/wl-init.md +3 -3
  16. package/templates/qoder/commands/wl-prd.md +2 -2
  17. package/templates/qoder/commands/wl-req.md +43 -0
  18. package/templates/qoder/commands/wl-search.md +8 -8
  19. package/templates/qoder/commands/wl-task.md +17 -17
  20. package/templates/qoder/commands/wl-test.md +41 -15
  21. package/templates/qoder/config.yaml +17 -1
  22. package/templates/qoder/hooks/session-start.py +12 -22
  23. package/templates/qoder/nul +4 -0
  24. package/templates/qoder/rules/wl-pipeline.md +22 -48
  25. package/templates/qoder/scripts/README.md +139 -0
  26. package/templates/qoder/scripts/common/autotest_auth.py +109 -0
  27. package/templates/qoder/scripts/common/bootstrap.py +145 -0
  28. package/templates/qoder/scripts/common/check_publish.py +98 -0
  29. package/templates/qoder/scripts/common/cmd_registry.py +112 -0
  30. package/templates/qoder/scripts/common/config.py +187 -0
  31. package/templates/qoder/scripts/common/contract.py +317 -0
  32. package/templates/qoder/scripts/common/developer.py +2 -1
  33. package/templates/qoder/scripts/common/feishu.py +10 -9
  34. package/templates/qoder/scripts/common/guard.py +159 -0
  35. package/templates/qoder/scripts/common/identity.py +121 -2
  36. package/templates/qoder/scripts/common/kg_capabilities.py +182 -0
  37. package/templates/qoder/scripts/common/mcp_base.py +268 -0
  38. package/templates/qoder/scripts/common/paths.py +187 -1
  39. package/templates/qoder/scripts/common/result.py +223 -0
  40. package/templates/qoder/scripts/common/roles.py +60 -0
  41. package/templates/qoder/scripts/common/task_utils.py +21 -9
  42. package/templates/qoder/scripts/common/test_extract.py +115 -0
  43. package/templates/qoder/scripts/kg/__init__.py +11 -0
  44. package/templates/qoder/scripts/kg/build_entity_registry.py +196 -0
  45. package/templates/qoder/scripts/kg/build_relations.py +127 -0
  46. package/templates/qoder/scripts/{build_style_index.py → kg/build_style_index.py} +39 -10
  47. package/templates/qoder/scripts/kg/build_workflows.py +144 -0
  48. package/templates/qoder/scripts/{context_pack.py → kg/context_pack.py} +18 -11
  49. package/templates/qoder/scripts/{enrich_prompt.py → kg/enrich_prompt.py} +232 -226
  50. package/templates/qoder/scripts/{extract_api_params.py → kg/extract.py} +398 -246
  51. package/templates/qoder/scripts/{kg.py → kg/kg.py} +638 -708
  52. package/templates/qoder/scripts/{kg_build.py → kg/kg_build.py} +618 -612
  53. package/templates/qoder/scripts/{kg_build_db.py → kg/kg_build_db.py} +333 -327
  54. package/templates/qoder/scripts/{kg_duckdb.py → kg/kg_duckdb.py} +38 -37
  55. package/templates/qoder/scripts/{kg_incremental.py → kg/kg_incremental.py} +420 -393
  56. package/templates/qoder/scripts/{kg_link_db.py → kg/kg_link_db.py} +230 -224
  57. package/templates/qoder/scripts/{kg_semantic.py → kg/kg_semantic.py} +156 -150
  58. package/templates/qoder/scripts/kg/prefetch.py +359 -0
  59. package/templates/qoder/scripts/{search_index.py → kg/search_index.py} +70 -14
  60. package/templates/qoder/scripts/mcp/__init__.py +11 -0
  61. package/templates/qoder/scripts/{kg_mcp_server.py → mcp/kg_mcp_server.py} +77 -272
  62. package/templates/qoder/scripts/{lanhu_stdio_wrapper.py → mcp/lanhu_stdio_wrapper.py} +125 -119
  63. package/templates/qoder/scripts/{check_mcp.py → mcp/mcp_doctor.py} +515 -298
  64. package/templates/qoder/scripts/{mcp_launcher.py → mcp/mcp_launcher.py} +442 -414
  65. package/templates/qoder/scripts/{mysql_mcp_server.py → mcp/mysql_mcp_server.py} +347 -396
  66. package/templates/qoder/scripts/{zentao_mcp_server.py → mcp/zentao_mcp_server.py} +384 -424
  67. package/templates/qoder/scripts/report/__init__.py +11 -0
  68. package/templates/qoder/scripts/{add_session.py → report/add_session.py} +250 -244
  69. package/templates/qoder/scripts/{archive_prd.py → report/archive_prd.py} +383 -377
  70. package/templates/qoder/scripts/{eval_prd.py → report/eval_prd.py} +73 -11
  71. package/templates/qoder/scripts/{export.py → report/export.py} +63 -0
  72. package/templates/qoder/scripts/{fill_prototype.py → report/fill_prototype.py} +6 -0
  73. package/templates/qoder/scripts/{gen_design_doc.py → report/gen_design_doc.py} +400 -394
  74. package/templates/qoder/scripts/{learn.py → report/learn.py} +152 -146
  75. package/templates/qoder/scripts/{learn_aggregate.py → report/learn_aggregate.py} +207 -201
  76. package/templates/qoder/scripts/{report.py → report/report.py} +287 -281
  77. package/templates/qoder/scripts/report/req.py +222 -0
  78. package/templates/qoder/scripts/report/role.py +33 -0
  79. package/templates/qoder/scripts/{status.py → report/status.py} +634 -628
  80. package/templates/qoder/scripts/setup/__init__.py +11 -0
  81. package/templates/qoder/scripts/setup/carriers.py +662 -0
  82. package/templates/qoder/scripts/{init_doctor.py → setup/init_doctor.py} +63 -26
  83. package/templates/qoder/scripts/{install_qoderwork.py → setup/install_qoderwork.py} +36 -26
  84. package/templates/qoder/scripts/{platform_doctor.py → setup/platform_doctor.py} +265 -259
  85. package/templates/qoder/scripts/{repo_root.py → setup/repo_root.py} +112 -106
  86. package/templates/qoder/scripts/{setup.py → setup/setup.py} +147 -0
  87. package/templates/qoder/scripts/{setup_lanhu.py → setup/setup_lanhu.py} +973 -963
  88. package/templates/qoder/scripts/task/__init__.py +11 -0
  89. package/templates/qoder/scripts/{git_sync.py → task/git_sync.py} +52 -31
  90. package/templates/qoder/scripts/{syncgate.py → task/syncgate.py} +6 -0
  91. package/templates/qoder/scripts/task/task.py +221 -0
  92. package/templates/qoder/scripts/task/task_lifecycle.py +596 -0
  93. package/templates/qoder/scripts/task/task_query.py +161 -0
  94. package/templates/qoder/scripts/task/task_relations.py +424 -0
  95. package/templates/qoder/scripts/{team_sync.py → task/team_sync.py} +93 -20
  96. package/templates/qoder/scripts/test/__init__.py +11 -0
  97. package/templates/qoder/scripts/{autotest.py → test/autotest.py} +1174 -1751
  98. package/templates/qoder/scripts/{autotest_batch.py → test/autotest_batch.py} +242 -224
  99. package/templates/qoder/scripts/test/autotest_data.py +675 -0
  100. package/templates/qoder/scripts/{autotest_run.py → test/autotest_run.py} +309 -297
  101. package/templates/qoder/scripts/{benchmark.py → test/benchmark.py} +6 -0
  102. package/templates/qoder/scripts/{kg_auto_login.py → test/kg_auto_login.py} +202 -196
  103. package/templates/qoder/scripts/{kg_test_runner.py → test/kg_test_runner.py} +7 -1
  104. package/templates/qoder/scripts/{page_probe.py → test/page_probe.py} +465 -459
  105. package/templates/qoder/scripts/wlkj.py +116 -0
  106. package/templates/qoder/settings.json +1 -10
  107. package/templates/qoder/skills/design-import/SKILL.md +226 -226
  108. package/templates/qoder/skills/design-review/SKILL.md +82 -82
  109. package/templates/qoder/skills/prd-generator/SKILL.md +26 -16
  110. package/templates/qoder/skills/prd-review/SKILL.md +5 -5
  111. package/templates/qoder/skills/prototype-generator/SKILL.md +256 -256
  112. package/templates/qoder/skills/spec-coder/SKILL.md +4 -4
  113. package/templates/qoder/skills/spec-generator/SKILL.md +4 -4
  114. package/templates/qoder/skills/test-generator/SKILL.md +5 -5
  115. package/templates/qoder/skills/wl-code/SKILL.md +4 -4
  116. package/templates/qoder/skills/wl-commit/SKILL.md +4 -4
  117. package/templates/qoder/skills/wl-design/SKILL.md +3 -3
  118. package/templates/qoder/skills/wl-init/SKILL.md +8 -8
  119. package/templates/qoder/skills/wl-insight/SKILL.md +5 -5
  120. package/templates/qoder/skills/wl-prd-full/SKILL.md +6 -6
  121. package/templates/qoder/skills/wl-prd-quick/SKILL.md +6 -6
  122. package/templates/qoder/skills/wl-prd-review/SKILL.md +4 -4
  123. package/templates/qoder/skills/wl-report/SKILL.md +7 -7
  124. package/templates/qoder/skills/wl-search/SKILL.md +13 -13
  125. package/templates/qoder/skills/wl-spec/SKILL.md +5 -5
  126. package/templates/qoder/skills/wl-status/SKILL.md +5 -5
  127. package/templates/qoder/skills/wl-task/SKILL.md +6 -6
  128. package/templates/qoder/skills/wl-test/SKILL.md +102 -39
  129. package/templates/root/AGENTS.md +39 -40
  130. package/templates/qoder/hooks/inject-workflow-state.py +0 -169
  131. package/templates/qoder/scripts/__pycache__/check_mcp_launch.cpython-39.pyc +0 -0
  132. package/templates/qoder/scripts/__pycache__/install_qoderwork.cpython-39.pyc +0 -0
  133. package/templates/qoder/scripts/__pycache__/mcp_launcher.cpython-39.pyc +0 -0
  134. package/templates/qoder/scripts/__pycache__/platform_doctor.cpython-39.pyc +0 -0
  135. package/templates/qoder/scripts/check_carriers.py +0 -238
  136. package/templates/qoder/scripts/check_mcp_launch.py +0 -183
  137. package/templates/qoder/scripts/check_qoderwork_consistency.py +0 -166
  138. package/templates/qoder/scripts/collect_prds.py +0 -31
  139. package/templates/qoder/scripts/common/mentions.py +0 -134
  140. package/templates/qoder/scripts/common/utf8.py +0 -38
  141. package/templates/qoder/scripts/extract_routes.py +0 -54
  142. package/templates/qoder/scripts/extract_routes_tree.py +0 -78
  143. package/templates/qoder/scripts/handoff.py +0 -22
  144. package/templates/qoder/scripts/init_developer.py +0 -76
  145. package/templates/qoder/scripts/parse_prds.py +0 -33
  146. package/templates/qoder/scripts/role.py +0 -51
  147. package/templates/qoder/scripts/sync_carriers.py +0 -259
  148. package/templates/qoder/scripts/task.py +0 -1261
  149. package/templates/qoder/scripts/workspace_init.py +0 -102
  150. package/templates/qoder/skills/prompt-enrich/SKILL.md +0 -90
  151. package/templates/qoder/skills/prototype-generator/SKILL.md.zcode-79180-2af4721f-f9a6-412c-88db-c0af680d211b.tmp +0 -0
  152. /package/templates/qoder/scripts/{secure-ls.js → test/secure-ls.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-commit
3
- description: "代码提交 + push + 同步,带质量门禁。Git commit + push + sync with pre-commit quality gate. 用户说'提交代码''commit''推上去''保存代码''提交一下'时触发。需用户确认(DANGERONS)。"
4
- trigger: "用户说'提交''commit''推上去''保存代码''提交一下''/wl-commit'"
3
+ description: "代码提交 + push + 同步,带质量门禁。Git commit + push + sync with pre-commit quality gate. 需用户确认(DANGERONS)。"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'提交''commit''推上去''保存代码''提交一下''/wl-c
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-commit — 代码提交 + 质量门禁 + 同步
17
17
 
@@ -70,7 +70,7 @@ git push
70
70
 
71
71
  提交成功后埋点(写当前开发者的 journal,供 /wl-status 健康度统计):
72
72
  ```bash
73
- python "$R/.qoder/scripts/learn.py" record commit_done "{\"files\": <改动文件数>, \"task\": \"<关联任务ID或空>\"}"
73
+ python "$R/.qoder/scripts/report/learn.py" record commit_done "{\"files\": <改动文件数>, \"task\": \"<关联任务ID或空>\"}"
74
74
  ```
75
75
  > 失败静默忽略,绝不阻塞提交流程。
76
76
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-design
3
- description: "设计工序入口: import 录入设计稿→spec.json(默认) / generate 按设计spec出原型 / review 评审原型。用户说'录入设计稿''按设计出原型''评审原型'或输入 /wl-design 时触发。"
4
- trigger: "用户说'录入设计稿''Figma稿录入''按设计出原型''评审原型''/wl-design'"
3
+ description: "设计工序入口: import 录入设计稿→spec.json(默认) / generate 按设计spec出原型 / review 评审原型。"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'录入设计稿''Figma稿录入''按设计出原型''评审
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-design — 设计工序入口(/wl-design 命令入口)
17
17
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-init
3
- description: "初始化/切换开发者身份 + 环境体检。Initialize/switch developer identity + environment health check. 用户说'初始化''我是谁''换开发者''环境检查''/wl-init''设置一下''开始用'时触发。"
4
- trigger: "首次使用、换人、或遇到环境问题时;用户说'初始化''换开发者''环境检查''体检'"
3
+ description: "初始化/切换开发者身份 + 环境体检。Initialize/switch developer identity + environment health check. "
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "首次使用、换人、或遇到环境问题时;用户说'初始化
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-init — 开发者身份 + 环境体检
17
17
 
@@ -28,14 +28,14 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
28
28
 
29
29
  ### 无参数(仅体检)
30
30
  ```bash
31
- python "$R/.qoder/scripts/init_doctor.py"
31
+ python "$R/.qoder/scripts/setup/init_doctor.py"
32
32
  ```
33
33
  输出 8 段体检报告,每行 `[OK]/[WARN]/[FIX]/[MISS]` 标注。
34
34
 
35
35
  ### 带名字(注册 + 自愈)
36
36
  ```bash
37
- python "$R/.qoder/scripts/init_doctor.py" --fix <名字> [角色]
38
- # 例:python "$R/.qoder/scripts/init_doctor.py" --fix 小王 pm
37
+ python "$R/.qoder/scripts/setup/init_doctor.py" --fix <名字> [角色]
38
+ # 例:python "$R/.qoder/scripts/setup/init_doctor.py" --fix 小王 pm
39
39
  ```
40
40
  做 3 件事:
41
41
  1. 写 `.qoder/.developer`(key=value 格式)
@@ -44,7 +44,7 @@ python "$R/.qoder/scripts/init_doctor.py" --fix <名字> [角色]
44
44
 
45
45
  ### 仅自愈(不换人)
46
46
  ```bash
47
- python "$R/.qoder/scripts/init_doctor.py" --fix
47
+ python "$R/.qoder/scripts/setup/init_doctor.py" --fix
48
48
  ```
49
49
 
50
50
  ## 体检覆盖的 8 段
@@ -71,6 +71,6 @@ python "$R/.qoder/scripts/init_doctor.py" --fix
71
71
  体检/注册本身不需要 push(只改本地 `.developer`)。但若 `--fix` 触发了图谱重建,
72
72
  完成后建议跑一次:
73
73
  ```bash
74
- python "$R/.qoder/scripts/team_sync.py" push
74
+ python "$R/.qoder/scripts/task/team_sync.py" push
75
75
  ```
76
76
  让队友拿到刷新后的索引。
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-insight
3
- description: "需求探索 + 外部调研 + 未来规划。流水线的'上游探索站',负责发现需求、对标竞品、做 Gap 分析和 roadmap。把'该做什么、为什么做'想清楚,结论交给 /wl-prd-full 落地。用户说'调研一下''竞品分析''接下来做什么''路线图''探讨一下需求''我发现个机会''规划下个版本'时触发。"
4
- trigger: "用户说'调研''竞品''对标''规划''路线图''roadmap''探讨需求''接下来做什么''发现个机会''下个版本做什么''/wl-insight'"
3
+ description: "需求探索 + 外部调研 + 未来规划。流水线的'上游探索站',负责发现需求、对标竞品、做 Gap 分析和 roadmap。把'该做什么、为什么做'想清楚,结论交给 /wl-prd-full 落地。"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'调研''竞品''对标''规划''路线图''roadmap''探讨
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-insight — 需求探索(7 站之前的「探索站」· 产品工位)
17
17
 
@@ -55,7 +55,7 @@ insight(探索/调研/规划)→ [用户确认转PRD] → prd(落地)→
55
55
  ## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
56
56
 
57
57
  - `.qoder/.developer` — 当前探索者(报告归属)
58
- - **现状锚点**:`python "$R/.qoder/scripts/context_pack.py" <关键词> --platform <web|app>`(必跑,探索不能脱离现状凭空想)
58
+ - **现状锚点**:`python "$R/.qoder/scripts/kg/context_pack.py" <关键词> --platform <web|app>`(必跑,探索不能脱离现状凭空想)
59
59
  - `.qoder/learning/feedback.jsonl` — 历史 insight 报告索引(可能为空)
60
60
  - 相关历史 PRD:`data/docs/prd/`(看已经做了什么,避免重复)
61
61
 
@@ -186,7 +186,7 @@ prd 以 reference 模式(mode: reference)承接,读取 insight 报告作
186
186
 
187
187
  insight 报告**默认不 push**(个人探索草稿)。用户说"发出去/同步/分享给团队"才:
188
188
  ```bash
189
- python "$R/.qoder/scripts/team_sync.py" push
189
+ python "$R/.qoder/scripts/task/team_sync.py" push
190
190
  ```
191
191
 
192
192
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-prd-full
3
- description: "完整档 PRD + 原型(13 章,正经需求)。新模块/新业务/新流程用这个。支持 参考:<insight报告> 衔接探索站。用户说'写个需求''生成PRD''做个原型''保单这块加个功能''写个产品需求文档'或输入 /wl-prd-full 时触发。先问平台!"
4
- trigger: "用户描述正经需求、要 PRD、要原型、要 mockup,或直接 /wl-prd-full"
3
+ description: "完整档 PRD + 原型(13 章,正经需求)。新模块/新业务/新流程用这个。支持 参考:<insight报告> 衔接探索站。先问平台!"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户描述正经需求、要 PRD、要原型、要 mockup,或直
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-prd-full — 完整档 PRD + 原型(/wl-prd-full 命令入口)
17
17
 
@@ -46,10 +46,10 @@ Read 指定 insight 报告 → 把现状锚定 + 选中的机会/Gap 作为 PRD
46
46
 
47
47
  ## 完整流程(详细见 command 文件)
48
48
 
49
- 1. **并行取全上下文**:先读当前角色(`python "$R/.qoder/scripts/role.py"` 输出 pm/design/dev/test/admin 之一),按角色传 `--role`,让上下文匹配角色视角:
49
+ 1. **并行取全上下文**:先读当前角色(`python "$R/.qoder/scripts/report/role.py"` 输出 pm/design/dev/test/admin 之一),按角色传 `--role`,让上下文匹配角色视角:
50
50
  ```bash
51
- ROLE=$(python "$R/.qoder/scripts/role.py" 2>/dev/null || echo pm)
52
- python "$R/.qoder/scripts/kg.py" context <词> --platform <p> --role "$ROLE"
51
+ ROLE=$(python "$R/.qoder/scripts/report/role.py" 2>/dev/null || echo pm)
52
+ python "$R/.qoder/scripts/kg/kg.py" context <词> --platform <p> --role "$ROLE"
53
53
  ```
54
54
  > 不硬编码 pm:dev 写 PRD 能拿到代码视角、设计师拿到页面+风格视角,比统一 PM 视角更"准"。
55
55
  2. **轻反思 + 批量确认**:AI 自动补全背景/目标/指标,只把真缺失的 1-2 点一次性问完
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-prd-quick
3
- description: "小改动极速出 Mini-PRD(6 章)。加字段/加按钮/改文案/加导出等零星需求专用。用户说'加个字段''加个导出按钮''改下文案''快速出个需求'时触发。先问平台!"
4
- trigger: "用户说小改动/加字段/加按钮/改文案/快速出 PRD,或直接 /wl-prd-quick"
3
+ description: "小改动极速出 Mini-PRD(6 章)。加字段/加按钮/改文案/加导出等零星需求专用。先问平台!"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说小改动/加字段/加按钮/改文案/快速出 PRD,或
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-prd-quick — 小改动极速出 Mini-PRD(/wl-prd-quick 命令入口)
17
17
 
@@ -38,11 +38,11 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
38
38
 
39
39
  ## 3 步极速流程(详细见 command 文件)
40
40
 
41
- 1. 先读当前角色再取上下文(不硬编码 pm,让 dev/设计师拿到匹配视角):
41
+ 1. **先 prefetch(预测 + 批量预取,禁止串行 search)**:
42
42
  ```bash
43
- ROLE=$(python "$R/.qoder/scripts/role.py" 2>/dev/null || echo pm)
44
- python "$R/.qoder/scripts/kg.py" context <词> --platform <p> --role "$ROLE"
43
+ python "$R/.qoder/scripts/kg/prefetch.py" "<需求描述>" --platform <p>
45
44
  ```
45
+ prefetch 一次返回代码/字段/API/Wiki/历史PRD 的合并结果。**之后不要再用 search/find/grep 逐个查词**——那会变成 6+ 次串行往返,是轮次爆炸的根因。prefetch 不够时才补调一次。
46
46
  2. 一次 Write:Mini-PRD(prd-quick-template.md,6 章)+ 微型原型(只画 diff)
47
47
  3. "出好了,确认发布吗?" → 归档 + push
48
48
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-prd-review
3
- description: "评审 PRD 完整性与质量(7 项 checklist + EVA 评分)。用户说'评审PRD''检查需求文档''PRD质量怎么样''这个 PRD 合格吗''帮我看看这个需求文档'时触发。"
4
- trigger: "用户说要评审/检查/审核 PRD 质量,或直接 /wl-prd-review"
3
+ description: "评审 PRD 完整性与质量(7 项 checklist + EVA 评分)。"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说要评审/检查/审核 PRD 质量,或直接 /wl-prd-review
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-prd-review — 评审 PRD 质量(/wl-prd-review 命令入口)
17
17
 
@@ -24,7 +24,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
24
24
 
25
25
  拿到一份 PRD,检查它够不够格发布/交付下游:
26
26
  1. **7 项 checklist**:用户故事清晰 / 验收可测 / 优先级已标 / 模块已识别 / 非功能已列 / 边界已考虑 / 依赖已识别
27
- 2. **EVA 客观评分**:`python "$R/.qoder/scripts/eval_prd.py" <PRD> [原型]`,≥80% 才 PASS
27
+ 2. **EVA 客观评分**:`python "$R/.qoder/scripts/report/eval_prd.py" <PRD> [原型]`,≥80% 才 PASS
28
28
  3. **合并报告**:PASS → 可发布;不 PASS → 修复清单
29
29
 
30
30
  ## 定位要评审的 PRD
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-report
3
- description: "生成日报/周报,严格按当前开发者隔离。Generate daily/weekly work report, isolated by current developer. 用户说'写日报''周报''我今天干了啥''这周做了什么''出个报告'时触发。"
4
- trigger: "用户说'日报''周报''我干了啥''今天做了什么''本周工作''出报告''/wl-report'"
3
+ description: "生成日报/周报,严格按当前开发者隔离。Generate daily/weekly work report, isolated by current developer. "
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'日报''周报''我干了啥''今天做了什么''本周工
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-report — 日报 / 周报(按开发者隔离)
17
17
 
@@ -34,7 +34,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
34
34
 
35
35
  ```bash
36
36
  # 1. 我的任务
37
- python "$R/.qoder/scripts/task.py" list --mine
37
+ python "$R/.qoder/scripts/task/task.py" list --mine
38
38
 
39
39
  # 2. 我的提交(按 git author 过滤)
40
40
  git log --author=<开发者名> --since="<时间范围>" --pretty=format:"%h %s (%ar)" --no-merges
@@ -100,7 +100,7 @@ PM / 设计岗常一天在开会、评审,没有 git 提交,纯靠 commit
100
100
 
101
101
  保存到 `workspace/members/{dev}/journal/{YYYY-MM-DD}-{daily|weekly}.md`,然后:
102
102
  ```bash
103
- python "$R/.qoder/scripts/team_sync.py" push
103
+ python "$R/.qoder/scripts/task/team_sync.py" push
104
104
  ```
105
105
  让团队/上级看到。
106
106
 
@@ -118,8 +118,8 @@ python "$R/.qoder/scripts/team_sync.py" push
118
118
  ### 方式 B: webhook(任何环境,脚本化)
119
119
  如果没有连接器,用引擎自带的 webhook 推送:
120
120
  ```bash
121
- python "$R/.qoder/scripts/report.py" daily --push-feishu
122
- python "$R/.qoder/scripts/report.py" weekly --push-feishu
121
+ python "$R/.qoder/scripts/report/report.py" daily --push-feishu
122
+ python "$R/.qoder/scripts/report/report.py" weekly --push-feishu
123
123
  ```
124
124
  这会通过 config.yaml 里配的飞书 bot webhook 发卡片通知。
125
125
  两种方式不冲突,连接器更富交互,webhook 更可靠无依赖。
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-search
3
- description: "查代码/业务/API/字段/PRD + 知识图谱(影响分析/覆盖矩阵/功能画像/业务流程/多跳遍历)的唯一入口。用户说'查一下''代码在哪''搜保险''考勤API''字段含义''改这个影响谁''哪些功能没测试''资产盘点有几步''XX功能画像'时触发。"
4
- trigger: "用户问代码/业务/API/字段/页面在哪,或说'查''搜''找''有哪些文件''定位''影响''覆盖''功能画像''业务流程''调用链'"
3
+ description: "查代码/业务/API/字段/PRD + 知识图谱(影响分析/覆盖矩阵/功能画像/业务流程/多跳遍历)的唯一入口。"
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -13,7 +13,7 @@ trigger: "用户问代码/业务/API/字段/页面在哪,或说'查''搜''找'
13
13
  ```bash
14
14
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
15
15
  ```
16
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
16
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
17
17
 
18
18
  > ⚠️ 这是查代码、业务、知识图谱的**唯一入口**。禁止直接 grep `data/code/` 全库。
19
19
 
@@ -29,7 +29,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
29
29
  **所有能力都有两条路,功能等价:**
30
30
 
31
31
  - **QoderWork 环境**(有 `mcp__qoder-knowledge-graph` 工具):AI 直接调 MCP 工具,更快
32
- - **Qoder IDE / Quest / CLI**(无 MCP):一律跑 `python "$R/.qoder/scripts/kg.py" <子命令>`
32
+ - **Qoder IDE / Quest / CLI**(无 MCP):一律跑 `python "$R/.qoder/scripts/kg/kg.py" <子命令>`
33
33
 
34
34
  > 不确定在哪个环境?优先试 MCP 工具;MCP 工具不存在就用 kg.py。两条路返回的数据一致。
35
35
 
@@ -68,19 +68,19 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
68
68
 
69
69
  ```bash
70
70
  # 搜字段用法(返回字段标签 + 使用文件)
71
- python "$R/.qoder/scripts/search_index.py" --field <字段名>
71
+ python "$R/.qoder/scripts/kg/search_index.py" --field <字段名>
72
72
 
73
73
  # 搜同类页面示例(table/form/detail/modal/dashboard)
74
- python "$R/.qoder/scripts/search_index.py" --style <类型> [--platform web|app]
74
+ python "$R/.qoder/scripts/kg/search_index.py" --style <类型> [--platform web|app]
75
75
 
76
76
  # 浏览所有关键词 Top50
77
- python "$R/.qoder/scripts/search_index.py" --list
77
+ python "$R/.qoder/scripts/kg/search_index.py" --list
78
78
 
79
79
  # 项目模块概览
80
- python "$R/.qoder/scripts/search_index.py" --modules
80
+ python "$R/.qoder/scripts/kg/search_index.py" --modules
81
81
 
82
82
  # 组件使用统计
83
- python "$R/.qoder/scripts/search_index.py" --components
83
+ python "$R/.qoder/scripts/kg/search_index.py" --components
84
84
  ```
85
85
 
86
86
  ## 一次取全(推荐写 PRD/Spec 前)
@@ -88,7 +88,7 @@ python "$R/.qoder/scripts/search_index.py" --components
88
88
  要一次性拿到代码+页面+字段+PRD+API+样式+图标,用上下文打包,支持**角色裁剪**只看相关部分:
89
89
 
90
90
  ```bash
91
- python "$R/.qoder/scripts/kg.py" context <业务词> --platform <web|app> --role <pm|design|dev|test|admin>
91
+ python "$R/.qoder/scripts/kg/kg.py" context <业务词> --platform <web|app> --role <pm|design|dev|test|admin>
92
92
  ```
93
93
 
94
94
  角色裁剪说明:
@@ -97,7 +97,7 @@ python "$R/.qoder/scripts/kg.py" context <业务词> --platform <web|app> --role
97
97
  - `--role dev`:只看代码+字段+API+Wiki
98
98
  - `--role test`:只看代码+PRD+API
99
99
 
100
- > 等价旧命令:`python "$R/.qoder/scripts/context_pack.py" <业务词> --platform <web|app>`
100
+ > 等价旧命令:`python "$R/.qoder/scripts/kg/context_pack.py" <业务词> --platform <web|app>`
101
101
 
102
102
  ## 决策树:该用哪个能力?
103
103
 
@@ -123,8 +123,8 @@ python "$R/.qoder/scripts/kg.py" context <业务词> --platform <web|app> --role
123
123
 
124
124
  kg.py 全容错,索引缺失会给出友好提示。遇到"知识图谱未构建"类提示:
125
125
  - 对 AI 说「初始化」(/wl-init)自动刷新
126
- - 或 `python "$R/.qoder/scripts/kg_build.py"` 手动构建
127
- - 或 `python "$R/.qoder/scripts/init_doctor.py" --fix` 自检修复
126
+ - 或 `python "$R/.qoder/scripts/kg/kg_build.py"` 手动构建
127
+ - 或 `python "$R/.qoder/scripts/setup/init_doctor.py" --fix` 自检修复
128
128
 
129
129
  ## 高频场景对照
130
130
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-spec
3
- description: "从已确认 PRD 生成开发 Spec 文档(/wl-spec 命令入口)。Generate or review technical Spec from PRD + Design. 用户说'生成规格''写spec''出技术方案''把PRD转开发文档'或输入 /wl-spec 时触发。"
4
- trigger: "PRD 确认/发布后;用户说'生成Spec''写技术规格''/wl-spec'"
3
+ description: "从已确认 PRD 生成开发 Spec 文档(/wl-spec 命令入口)。Generate or review technical Spec from PRD + Design. "
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "PRD 确认/发布后;用户说'生成Spec''写技术规格''/wl-spec
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-spec — 生成开发 Spec(/wl-spec 命令入口)
17
17
 
@@ -26,7 +26,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
26
26
  - `.qoder/.current-task` — 当前任务(决定 spec 存哪个 task 目录)
27
27
  - 扫描 PRD 来源:`data/docs/prd/`(已发布)+
28
28
  `workspace/members/{dev}/drafts/REQ-*.md`(草稿),找出还没 Spec 的 PRD
29
- - 字段命名约定:`python "$R/.qoder/scripts/search_index.py" --field <字段名>`
29
+ - 字段命名约定:`python "$R/.qoder/scripts/kg/search_index.py" --field <字段名>`
30
30
  - 团队 Java 约定(MyBatis Plus + RESTful + BigDecimal 金额)见
31
31
  `.qoder/skills/spec-generator/SKILL.md` 的 Step 3
32
32
 
@@ -39,7 +39,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
39
39
  5. 通知开发评审
40
40
  6. 发布后自动同步:
41
41
  ```bash
42
- python "$R/.qoder/scripts/team_sync.py" push
42
+ python "$R/.qoder/scripts/task/team_sync.py" push
43
43
  ```
44
44
 
45
45
  ## Review 模式
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-status
3
- description: "项目状态/路线图/健康度。Project status: current sprint / roadmap / health score. 用户说'项目怎么样''进度''健康度''路线图''现在在做什么''整体情况'时触发。"
4
- trigger: "用户说'项目怎么样''进度''健康度''路线图''整体情况''/wl-status'"
3
+ description: "项目状态/路线图/健康度。Project status: current sprint / roadmap / health score. "
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'项目怎么样''进度''健康度''路线图''整体情况'
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-status — 项目状态总览
17
17
 
@@ -27,7 +27,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
27
27
  ## 维度 1:current(当前迭代)
28
28
 
29
29
  ```bash
30
- python "$R/.qoder/scripts/task.py" list
30
+ python "$R/.qoder/scripts/task/task.py" list
31
31
  ```
32
32
  展示:
33
33
  - 当前活动任务(标 `*` 的那条)
@@ -60,7 +60,7 @@ python "$R/.qoder/scripts/task.py" list
60
60
  ## 团队同步健康(必跑)
61
61
 
62
62
  ```bash
63
- python "$R/.qoder/scripts/team_sync.py" status
63
+ python "$R/.qoder/scripts/task/team_sync.py" status
64
64
  ```
65
65
  看 ahead/behind 是否对齐,未同步产出有几个。
66
66
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: wl-task
3
- description: "任务管理 + RICE 优先级 + 依赖排期。7 站流水线的'任务'站,产品在这里把 PRD 落成任务。Task management with RICE prioritization. 用户说'建任务''排优先级''开始做这个''任务做完了''列一下任务''归档''排期'时触发。"
4
- trigger: "用户说'建任务''建个任务''排优先级''开始做''做完了''看任务''列任务''归档''排期''甘特图''/wl-task'"
3
+ description: "任务管理 + RICE 优先级 + 依赖排期。7 站流水线的'任务'站,产品在这里把 PRD 落成任务。Task management with RICE prioritization. "
4
+ trigger: "user invokes /wl-* command explicitly"
5
5
  ---
6
6
 
7
7
 
@@ -11,7 +11,7 @@ trigger: "用户说'建任务''建个任务''排优先级''开始做''做完了'
11
11
  ```bash
12
12
  R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
13
13
  ```
14
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
14
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
15
15
 
16
16
  # wl-task — 任务管理(7 站之「任务」站 · 产品工位)
17
17
 
@@ -40,7 +40,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
40
40
 
41
41
  - `.qoder/.developer` — 当前开发者(assignee 默认值)
42
42
  - `.qoder/.current-task` — 当前活动任务("开始做""完成了"默认对它操作)
43
- - 列出已有任务:`python "$R/.qoder/scripts/task.py" list`
43
+ - 列出已有任务:`python "$R/.qoder/scripts/task/task.py" list`
44
44
  - 衔接 PRD:扫 `workspace/members/{dev}/drafts/REQ-*.md` + `data/docs/prd/REQ-*.md`
45
45
 
46
46
  ## 🔒 三道前置检查(任何动作前先做,保证健壮)
@@ -56,7 +56,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
56
56
  **create(最高频)—— PRD 衔接不丢字段:**
57
57
  - 有 PRD → 从 PRD 提取标题/模块/验收点,**别让用户重述**;把 REQ-ID 记进 task.json 的 `tags`。
58
58
  - 无 PRD → 用用户给的一句话当标题。
59
- - 建完 push:`python "$R/.qoder/scripts/team_sync.py" push`
59
+ - 建完 push:`python "$R/.qoder/scripts/task/team_sync.py" push`
60
60
 
61
61
  **rank(RICE)—— 一次取全,别逐个问:**
62
62
  1. `task.py list --status planning` 拿全待排任务
@@ -105,7 +105,7 @@ RICE = Reach × Impact × Confidence ÷ Effort
105
105
 
106
106
  `create` / `finish` / `archive` 改了任务状态,都要推给团队(用户永不碰 git):
107
107
  ```bash
108
- python "$R/.qoder/scripts/team_sync.py" push
108
+ python "$R/.qoder/scripts/task/team_sync.py" push
109
109
  ```
110
110
 
111
111
  ## finish 后:自动生成测试交接画像(可选增强)