@hupan56/wlkj 2.6.0 → 2.7.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 (125) hide show
  1. package/bin/cli.js +261 -11
  2. package/package.json +1 -1
  3. package/templates/qoder/agents/insight-planning.md +67 -0
  4. package/templates/qoder/agents/insight-research.md +61 -0
  5. package/templates/qoder/agents/prd-reference.md +8 -2
  6. package/templates/qoder/commands/optional/wl-insight.md +275 -0
  7. package/templates/qoder/commands/{wl-report.md → optional/wl-report.md} +13 -5
  8. package/templates/qoder/commands/{wl-spec.md → optional/wl-spec.md} +1 -1
  9. package/templates/qoder/commands/{wl-status.md → optional/wl-status.md} +28 -2
  10. package/templates/qoder/commands/wl-code.md +10 -2
  11. package/templates/qoder/commands/wl-commit.md +1 -1
  12. package/templates/qoder/commands/wl-design-draw.md +78 -0
  13. package/templates/qoder/commands/wl-design-scan.md +108 -0
  14. package/templates/qoder/commands/wl-design-spec.md +154 -0
  15. package/templates/qoder/commands/wl-design.md +32 -0
  16. package/templates/qoder/commands/wl-init.md +24 -3
  17. package/templates/qoder/commands/wl-prd-full.md +226 -0
  18. package/templates/qoder/commands/wl-prd-quick.md +134 -0
  19. package/templates/qoder/commands/wl-prd-review.md +104 -0
  20. package/templates/qoder/commands/wl-prd.md +17 -311
  21. package/templates/qoder/commands/wl-search.md +66 -30
  22. package/templates/qoder/commands/wl-task.md +290 -59
  23. package/templates/qoder/commands/wl-test.md +92 -24
  24. package/templates/qoder/config.yaml +51 -15
  25. package/templates/qoder/hooks/inject-workflow-state.py +2 -2
  26. package/templates/qoder/hooks/session-start.py +82 -51
  27. package/templates/qoder/rules/wl-pipeline.md +216 -105
  28. package/templates/qoder/scripts/__pycache__/search_index.cpython-39.pyc +0 -0
  29. package/templates/qoder/scripts/archive_prd.py +377 -0
  30. package/templates/qoder/scripts/autotest.py +1715 -0
  31. package/templates/qoder/scripts/autotest_batch.py +224 -0
  32. package/templates/qoder/scripts/autotest_run.py +297 -0
  33. package/templates/qoder/scripts/benchmark.py +210 -209
  34. package/templates/qoder/scripts/build_style_index.py +444 -4
  35. package/templates/qoder/scripts/check_carriers.py +238 -0
  36. package/templates/qoder/scripts/check_mcp.py +298 -0
  37. package/templates/qoder/scripts/check_qoderwork_consistency.py +166 -0
  38. package/templates/qoder/scripts/common/events.py +46 -0
  39. package/templates/qoder/scripts/common/extract.py +419 -0
  40. package/templates/qoder/scripts/common/graph_traverse.py +533 -0
  41. package/templates/qoder/scripts/common/paths.py +89 -0
  42. package/templates/qoder/scripts/common/pip_install.py +144 -0
  43. package/templates/qoder/scripts/common/platform_guard.py +61 -0
  44. package/templates/qoder/scripts/common/search_engine.py +205 -205
  45. package/templates/qoder/scripts/common/terms.py +57 -0
  46. package/templates/qoder/scripts/common/ts_extract.py +536 -0
  47. package/templates/qoder/scripts/context_pack.py +73 -13
  48. package/templates/qoder/scripts/enrich_prompt.py +226 -0
  49. package/templates/qoder/scripts/eval_prd.py +318 -231
  50. package/templates/qoder/scripts/export.py +487 -487
  51. package/templates/qoder/scripts/extract_api_params.py +246 -0
  52. package/templates/qoder/scripts/extract_routes.py +54 -0
  53. package/templates/qoder/scripts/extract_routes_tree.py +78 -0
  54. package/templates/qoder/scripts/fill_prototype.py +707 -0
  55. package/templates/qoder/scripts/gen_design_doc.py +394 -0
  56. package/templates/qoder/scripts/git_sync.py +27 -15
  57. package/templates/qoder/scripts/init_doctor.py +292 -40
  58. package/templates/qoder/scripts/install_qoderwork.py +366 -9
  59. package/templates/qoder/scripts/kg.py +708 -0
  60. package/templates/qoder/scripts/kg_auto_login.py +196 -0
  61. package/templates/qoder/scripts/kg_build.py +612 -0
  62. package/templates/qoder/scripts/kg_build_db.py +327 -0
  63. package/templates/qoder/scripts/kg_duckdb.py +549 -0
  64. package/templates/qoder/scripts/kg_incremental.py +393 -0
  65. package/templates/qoder/scripts/kg_link_db.py +224 -0
  66. package/templates/qoder/scripts/kg_mcp_server.py +801 -0
  67. package/templates/qoder/scripts/kg_semantic.py +150 -0
  68. package/templates/qoder/scripts/kg_test_runner.py +241 -0
  69. package/templates/qoder/scripts/lanhu_stdio_wrapper.py +119 -0
  70. package/templates/qoder/scripts/learn.py +118 -39
  71. package/templates/qoder/scripts/learn_aggregate.py +201 -0
  72. package/templates/qoder/scripts/mcp_launcher.py +359 -0
  73. package/templates/qoder/scripts/mysql_mcp_server.py +396 -0
  74. package/templates/qoder/scripts/repo_root.py +106 -0
  75. package/templates/qoder/scripts/role.py +12 -0
  76. package/templates/qoder/scripts/run_weekly_update.bat +5 -0
  77. package/templates/qoder/scripts/run_weekly_update.sh +5 -0
  78. package/templates/qoder/scripts/search_index.py +307 -60
  79. package/templates/qoder/scripts/secure-ls.js +5640 -0
  80. package/templates/qoder/scripts/setup.py +706 -641
  81. package/templates/qoder/scripts/setup_lanhu.py +963 -0
  82. package/templates/qoder/scripts/status.py +250 -11
  83. package/templates/qoder/scripts/sync_carriers.py +259 -0
  84. package/templates/qoder/scripts/syncgate.py +2 -2
  85. package/templates/qoder/scripts/task.py +75 -0
  86. package/templates/qoder/scripts/team_sync.py +60 -4
  87. package/templates/qoder/scripts/workspace_init.py +1 -1
  88. package/templates/qoder/skills/design-import/SKILL.md +226 -0
  89. package/templates/qoder/skills/design-import/figma-workflow.md +81 -0
  90. package/templates/qoder/skills/design-review/SKILL.md +82 -25
  91. package/templates/qoder/skills/prd-generator/SKILL.md +184 -60
  92. package/templates/qoder/skills/prd-review/SKILL.md +18 -1
  93. package/templates/qoder/skills/prompt-enrich/SKILL.md +90 -0
  94. package/templates/qoder/skills/prototype-generator/SKILL.md +256 -141
  95. package/templates/qoder/skills/prototype-generator/SKILL.md.zcode-79180-2af4721f-f9a6-412c-88db-c0af680d211b.tmp +0 -0
  96. package/templates/qoder/skills/spec-coder/SKILL.md +18 -1
  97. package/templates/qoder/skills/spec-generator/SKILL.md +18 -1
  98. package/templates/qoder/skills/test-generator/SKILL.md +15 -2
  99. package/templates/qoder/skills/wl-code/SKILL.md +55 -36
  100. package/templates/qoder/skills/wl-commit/SKILL.md +89 -76
  101. package/templates/qoder/skills/wl-design/SKILL.md +55 -0
  102. package/templates/qoder/skills/wl-init/SKILL.md +76 -67
  103. package/templates/qoder/skills/wl-insight/SKILL.md +201 -81
  104. package/templates/qoder/skills/wl-prd-full/SKILL.md +69 -0
  105. package/templates/qoder/skills/wl-prd-quick/SKILL.md +49 -0
  106. package/templates/qoder/skills/wl-prd-review/SKILL.md +34 -0
  107. package/templates/qoder/skills/wl-report/SKILL.md +131 -107
  108. package/templates/qoder/skills/wl-search/SKILL.md +141 -75
  109. package/templates/qoder/skills/wl-spec/SKILL.md +49 -39
  110. package/templates/qoder/skills/wl-status/SKILL.md +83 -61
  111. package/templates/qoder/skills/wl-task/SKILL.md +132 -58
  112. package/templates/qoder/skills/wl-test/SKILL.md +406 -40
  113. package/templates/qoder/templates/prototype-app.html +13 -8
  114. package/templates/qoder/templates/prototype-web.html +376 -93
  115. package/templates/root/AGENTS.md +89 -34
  116. package/templates/root/requirements.txt +21 -0
  117. package/templates/root//344/275/277/347/224/250/350/257/264/346/230/216.md +259 -259
  118. package/templates/root//346/226/260/346/211/213/346/214/207/345/215/227.md +186 -186
  119. package/templates/qoder/agents/prd-planning.md +0 -57
  120. package/templates/qoder/agents/prd-research.md +0 -34
  121. package/templates/qoder/commands/wl-insight.md +0 -51
  122. package/templates/qoder/scripts/__pycache__/init_doctor.cpython-39.pyc +0 -0
  123. package/templates/qoder/scripts/__pycache__/setup.cpython-39.pyc +0 -0
  124. package/templates/qoder/scripts/common/__pycache__/developer.cpython-39.pyc +0 -0
  125. package/templates/qoder/skills/wl-prd/SKILL.md +0 -92
@@ -1,186 +1,186 @@
1
- # 新手指南
2
-
3
- > 不需要懂代码、不需要懂 git。会说中文就能用。
4
-
5
- ---
6
-
7
- ## 一、开始前准备
8
-
9
- ### 必须有
10
-
11
- - 一台电脑(Windows / Mac)
12
- - 已装 **Node.js 16+**(去 nodejs.org 下载,装了就有 npx)
13
- - 已装 **Python 3.9+**(去 python.org 下载)
14
-
15
- ### 可选(没有也能用)
16
-
17
- - **git**:团队协作用。没装也行,自己写 PRD / 查代码 / 建任务都不影响
18
- - **Qoder 客户端**(IDE / Quest / QoderWork 任一):用 AI 对话驱动。没有也能用命令行
19
- - **飞书群机器人**:自动推送通知。没有不影响功能
20
-
21
- ---
22
-
23
- ## 二、新项目第一次使用(只做一次)
24
-
25
- 建一个空文件夹,进去,跑一条命令:
26
-
27
- ```
28
- mkdir 我的项目
29
- cd 我的项目
30
- npx wlkj init
31
- ```
32
-
33
- 它会自动完成一切:
34
- 1. 安装完整工作流引擎(搜索/PRD/任务/报告/导出 全部就绪)
35
- 2. 探测你的名字(从 git 配置读,或问你"叫什么名字")
36
- 3. 注册你的开发者身份
37
- 4. 装 git(如果没有,会问你要不要自动装)
38
- 5. 拉取源码建索引(如果配了 git 地址)
39
- 6. 注册周五自动更新(询问式)
40
- 7. 装 QoderWork 技能(检测到桌面端时询问)
41
-
42
- 看到下面这样就成功了:
43
-
44
- ```
45
- ✓ 开发者: 你的名字
46
- ✓ 知识图谱就绪
47
- 安装完成! 现在可以开始了
48
- ```
49
-
50
- > 想指定名字?`npx wlkj init 小王`
51
- > 想指定角色?`npx wlkj init 小王 dev`
52
-
53
- ---
54
-
55
- ## 三、日常使用(3 种方式,任选)
56
-
57
- ### 方式 A:直接说话(推荐)
58
-
59
- 在 Qoder 对话框里直接用中文说:
60
-
61
- | 你说什么 | 会发生什么 |
62
- |---------|-----------|
63
- | "写个保险异常筛选的需求" | 生成 PRD + 原型 |
64
- | "查一下考勤代码在哪" | 搜索代码 |
65
- | "建个任务:登录优化" | 建任务 |
66
- | "今天干了啥" | 出日报 |
67
- | "项目怎么样" | 看进度健康度 |
68
-
69
- ### 方式 B:斜杠命令(精确)
70
-
71
- 输入 `/` 会列出所有命令。常用的:
72
-
73
- | 命令 | 作用 |
74
- |------|------|
75
- | `/wl-prd` | 写需求 |
76
- | `/wl-search` | 查代码 |
77
- | `/wl-task` | 管任务 |
78
- | `/wl-status` | 看进度 |
79
- | `/wl-report` | 出报告 |
80
- | `/wl-init` | 拉取团队最新 |
81
-
82
- ### 方式 C:命令行(兜底,无 Qoder 时)
83
-
84
- ```
85
- python .qoder/scripts/search_index.py 保险
86
- python .qoder/scripts/task.py create "登录优化"
87
- python .qoder/scripts/report.py daily
88
- ```
89
-
90
- ---
91
-
92
- ## 四、你能做什么
93
-
94
- ### 写需求
95
-
96
- | 想做的事 | 怎么说 |
97
- |---------|--------|
98
- | 写完整需求文档 | "写个 XXX 的需求" |
99
- | 写小改动需求 | "快速写个 XXX" |
100
- | 头脑风暴 | "脑暴一下 XXX 功能" |
101
- | 做规划 | "规划 XXX 的路线图" |
102
- | 画原型 | 随需求自动生成 |
103
-
104
- ### 查代码(不懂代码也能查)
105
-
106
- | 想做的事 | 怎么说 |
107
- |---------|--------|
108
- | 找业务代码 | "保险的代码在哪" |
109
- | 找 API | "考勤有哪些 API" |
110
- | 找字段用法 | "nickName 字段在哪用" |
111
- | 找同类页面 | "系统里有哪些列表页" |
112
-
113
- ### 管任务
114
-
115
- | 想做的事 | 怎么说 / 命令 |
116
- |---------|--------------|
117
- | 建任务 | "建个任务:登录优化" |
118
- | 设截止日期 | "给登录优化设截止日期 7月15" |
119
- | 标记依赖 | "登录优化依赖数据库迁移" |
120
- | 看哪些能开始 | "哪些任务可以开始" |
121
- | 看哪些被卡住 | "哪些任务被阻塞" |
122
- | 看甘特图 | "看任务排期" |
123
- | 完成任务 | "这个任务做完了" |
124
-
125
- ### 看进度 / 出报告
126
-
127
- | 想做的事 | 怎么说 |
128
- |---------|--------|
129
- | 看项目健康度 | "项目怎么样" |
130
- | 看我的任务 | "我的任务有哪些" |
131
- | 出日报 | "今天干了啥" |
132
- | 出周报 | "这周干了啥" |
133
-
134
- ---
135
-
136
- ## 五、团队协作
137
-
138
- ### 团队第一次配置(只做一次)
139
-
140
- 1. **填源码地址**:打开 `.qoder/config.yaml`,找到 `git_sync.projects`,把 `url` 改成你们团队的 git 地址(文件里有 `← 改成你的` 提示)
141
- 2. **注册自动更新**(全队只需一台机器):运行 `python .qoder/scripts/setup_weekly_cron.bat`
142
- 3. **配飞书**(可选):`.qoder/config.yaml` 里 `feishu` 段,填 webhook 地址,设 `enabled: true`
143
-
144
- ### 每个成员加入
145
-
146
- ```
147
- npx wlkj init 你的名字
148
- ```
149
-
150
- 每人跑一次就行。
151
-
152
- ### 日常协作
153
-
154
- | 场景 | 你做什么 | 自动发生什么 |
155
- |------|---------|------------|
156
- | 写了 PRD 想分享 | 说"同步" | 推到团队仓库 |
157
- | 想拿队友的最新 | 说"拉取最新" | 自动拉取 |
158
- | 看全队进度 | "项目怎么样" | 显示全员任务 |
159
- | 派任务给人 | 建任务时指定负责人 | 任务标记归属 |
160
-
161
- ---
162
-
163
- ## 六、看不到命令怎么办
164
-
165
- | 现象 | 解决 |
166
- |------|------|
167
- | Quest 里输 `/` 没反应 | **新建一个对话**(改了配置后必须新建对话) |
168
- | QoderWork 里没命令 | 跑 `python .qoder/scripts/install_qoderwork.py`,然后**重启 QoderWork** |
169
- | 命令报错 | 跑 `python .qoder/scripts/init_doctor.py --fix` 自动修复 |
170
-
171
- ---
172
-
173
- ## 七、速查表
174
-
175
- ```
176
- 新项目 → mkdir 文件夹 && cd 文件夹 && npx wlkj init
177
- 写需求 → /wl-prd
178
- 查代码 → /wl-search
179
- 建任务 → /wl-task
180
- 看进度 → /wl-status
181
- 出报告 → /wl-report
182
- 拉最新 → /wl-init
183
- 环境坏了 → python .qoder/scripts/init_doctor.py --fix
184
- ```
185
-
186
- 记不住?直接说中文,AI 会自动识别。
1
+ # 新手指南
2
+
3
+ > 不需要懂代码、不需要懂 git。会说中文就能用。
4
+
5
+ ---
6
+
7
+ ## 一、开始前准备
8
+
9
+ ### 必须有
10
+
11
+ - 一台电脑(Windows / Mac)
12
+ - 已装 **Node.js 16+**(去 nodejs.org 下载,装了就有 npx)
13
+ - 已装 **Python 3.9+**(去 python.org 下载)
14
+
15
+ ### 可选(没有也能用)
16
+
17
+ - **git**:团队协作用。没装也行,自己写 PRD / 查代码 / 建任务都不影响
18
+ - **Qoder 客户端**(IDE / Quest / QoderWork 任一):用 AI 对话驱动。没有也能用命令行
19
+ - **飞书群机器人**:自动推送通知。没有不影响功能
20
+
21
+ ---
22
+
23
+ ## 二、新项目第一次使用(只做一次)
24
+
25
+ 建一个空文件夹,进去,跑一条命令:
26
+
27
+ ```
28
+ mkdir 我的项目
29
+ cd 我的项目
30
+ npx wlkj init
31
+ ```
32
+
33
+ 它会自动完成一切:
34
+ 1. 安装完整工作流引擎(搜索/PRD/任务/报告/导出 全部就绪)
35
+ 2. 探测你的名字(从 git 配置读,或问你"叫什么名字")
36
+ 3. 注册你的开发者身份
37
+ 4. 装 git(如果没有,会问你要不要自动装)
38
+ 5. 拉取源码建索引(如果配了 git 地址)
39
+ 6. 注册周五自动更新(询问式)
40
+ 7. 装 QoderWork 技能(检测到桌面端时询问)
41
+
42
+ 看到下面这样就成功了:
43
+
44
+ ```
45
+ ✓ 开发者: 你的名字
46
+ ✓ 知识图谱就绪
47
+ 安装完成! 现在可以开始了
48
+ ```
49
+
50
+ > 想指定名字?`npx wlkj init 小王`
51
+ > 想指定角色?`npx wlkj init 小王 dev`
52
+
53
+ ---
54
+
55
+ ## 三、日常使用(3 种方式,任选)
56
+
57
+ ### 方式 A:直接说话(推荐)
58
+
59
+ 在 Qoder 对话框里直接用中文说:
60
+
61
+ | 你说什么 | 会发生什么 |
62
+ |---------|-----------|
63
+ | "写个保险异常筛选的需求" | 生成 PRD + 原型 |
64
+ | "查一下考勤代码在哪" | 搜索代码 |
65
+ | "建个任务:登录优化" | 建任务 |
66
+ | "今天干了啥" | 出日报 |
67
+ | "项目怎么样" | 看进度健康度 |
68
+
69
+ ### 方式 B:斜杠命令(精确)
70
+
71
+ 输入 `/` 会列出所有命令。常用的:
72
+
73
+ | 命令 | 作用 |
74
+ |------|------|
75
+ | `/wl-prd-full` | 写需求 |
76
+ | `/wl-search` | 查代码 |
77
+ | `/wl-task` | 管任务 |
78
+ | `/wl-status` | 看进度 |
79
+ | `/wl-report` | 出报告 |
80
+ | `/wl-init` | 拉取团队最新 |
81
+
82
+ ### 方式 C:命令行(兜底,无 Qoder 时)
83
+
84
+ ```
85
+ python .qoder/scripts/search_index.py 保险
86
+ python .qoder/scripts/task.py create "登录优化"
87
+ python .qoder/scripts/report.py daily
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 四、你能做什么
93
+
94
+ ### 写需求
95
+
96
+ | 想做的事 | 怎么说 |
97
+ |---------|--------|
98
+ | 写完整需求文档 | "写个 XXX 的需求" |
99
+ | 写小改动需求 | "快速写个 XXX" |
100
+ | 头脑风暴 | "脑暴一下 XXX 功能" |
101
+ | 做规划 | "规划 XXX 的路线图" |
102
+ | 画原型 | 随需求自动生成 |
103
+
104
+ ### 查代码(不懂代码也能查)
105
+
106
+ | 想做的事 | 怎么说 |
107
+ |---------|--------|
108
+ | 找业务代码 | "保险的代码在哪" |
109
+ | 找 API | "考勤有哪些 API" |
110
+ | 找字段用法 | "nickName 字段在哪用" |
111
+ | 找同类页面 | "系统里有哪些列表页" |
112
+
113
+ ### 管任务
114
+
115
+ | 想做的事 | 怎么说 / 命令 |
116
+ |---------|--------------|
117
+ | 建任务 | "建个任务:登录优化" |
118
+ | 设截止日期 | "给登录优化设截止日期 7月15" |
119
+ | 标记依赖 | "登录优化依赖数据库迁移" |
120
+ | 看哪些能开始 | "哪些任务可以开始" |
121
+ | 看哪些被卡住 | "哪些任务被阻塞" |
122
+ | 看甘特图 | "看任务排期" |
123
+ | 完成任务 | "这个任务做完了" |
124
+
125
+ ### 看进度 / 出报告
126
+
127
+ | 想做的事 | 怎么说 |
128
+ |---------|--------|
129
+ | 看项目健康度 | "项目怎么样" |
130
+ | 看我的任务 | "我的任务有哪些" |
131
+ | 出日报 | "今天干了啥" |
132
+ | 出周报 | "这周干了啥" |
133
+
134
+ ---
135
+
136
+ ## 五、团队协作
137
+
138
+ ### 团队第一次配置(只做一次)
139
+
140
+ 1. **填源码地址**:打开 `.qoder/config.yaml`,找到 `git_sync.projects`,把 `url` 改成你们团队的 git 地址(文件里有 `← 改成你的` 提示)
141
+ 2. **注册自动更新**(全队只需一台机器):运行 `python .qoder/scripts/setup_weekly_cron.bat`
142
+ 3. **配飞书**(可选):`.qoder/config.yaml` 里 `feishu` 段,填 webhook 地址,设 `enabled: true`
143
+
144
+ ### 每个成员加入
145
+
146
+ ```
147
+ npx wlkj init 你的名字
148
+ ```
149
+
150
+ 每人跑一次就行。
151
+
152
+ ### 日常协作
153
+
154
+ | 场景 | 你做什么 | 自动发生什么 |
155
+ |------|---------|------------|
156
+ | 写了 PRD 想分享 | 说"同步" | 推到团队仓库 |
157
+ | 想拿队友的最新 | 说"拉取最新" | 自动拉取 |
158
+ | 看全队进度 | "项目怎么样" | 显示全员任务 |
159
+ | 派任务给人 | 建任务时指定负责人 | 任务标记归属 |
160
+
161
+ ---
162
+
163
+ ## 六、看不到命令怎么办
164
+
165
+ | 现象 | 解决 |
166
+ |------|------|
167
+ | Quest 里输 `/` 没反应 | **新建一个对话**(改了配置后必须新建对话) |
168
+ | QoderWork 里没命令 | 跑 `python .qoder/scripts/install_qoderwork.py`,然后**重启 QoderWork** |
169
+ | 命令报错 | 跑 `python .qoder/scripts/init_doctor.py --fix` 自动修复 |
170
+
171
+ ---
172
+
173
+ ## 七、速查表
174
+
175
+ ```
176
+ 新项目 → mkdir 文件夹 && cd 文件夹 && npx wlkj init
177
+ 写需求 → /wl-prd-full
178
+ 查代码 → /wl-search
179
+ 建任务 → /wl-task
180
+ 看进度 → /wl-status
181
+ 出报告 → /wl-report
182
+ 拉最新 → /wl-init
183
+ 环境坏了 → python .qoder/scripts/init_doctor.py --fix
184
+ ```
185
+
186
+ 记不住?直接说中文,AI 会自动识别。
@@ -1,57 +0,0 @@
1
- # PRD Planning Agent (Research + Reference)
2
-
3
- ## Required: Load Context First (Pull-Based)
4
- Read the dispatch prompt — it MUST contain: platform (Web/APP/Both),
5
- topic, current developer name. If platform is missing, STOP and report
6
- back: "platform not specified - caller must ask user first (see /wl-prd Step 0)".
7
- For task context, run: python .qoder/scripts/task.py current --source
8
-
9
- ## Recursion Guard
10
- You are the prd-planning sub-agent. Do NOT spawn another prd-planning agent.
11
-
12
- ## Your Role
13
- Combine current reality analysis + future research into a planning report.
14
-
15
- ## Phase 1: Current State Analysis (Reference)
16
- 1. Scan data/code/ for current implementation
17
- 2. Use data/index/keyword-index.json to locate relevant files
18
- 3. Read data/docs/prd/ for existing PRDs
19
- 4. Read data/docs/drafts/ for business context
20
- 5. Summarize: what exists, how it works, current limitations
21
-
22
- ## Phase 2: Ideal State Research (Search Web)
23
- 1. Search for competitor products and features
24
- 2. Search for industry trends and best practices
25
- 3. Search for technical solutions and patterns
26
- 4. Summarize: what the ideal state looks like
27
-
28
- ## Phase 3: Gap Analysis
29
- Compare Phase 1 vs Phase 2:
30
- | Dimension | Current | Ideal | Gap |
31
- Create a table showing all gaps.
32
-
33
- ## Phase 4: Plans
34
- ### Current Plan (MVP)
35
- - What to build NOW based on team capacity
36
- - Prioritized by business value + feasibility
37
- - Only include what can be done in current sprint
38
-
39
- ### Future Plan (Roadmap)
40
- - What to build LATER
41
- - Group by iteration/version
42
- - Mark dependencies between items
43
-
44
- ## Phase 5: Confirm with User
45
- Present the FULL report in one message. Ask all four questions together:
46
- 1. Is the current state analysis accurate?
47
- 2. Is the ideal state aligned with business goals?
48
- 3. Is the MVP scope right?
49
- 4. Is the roadmap priority correct?
50
- Adjust based on feedback — at most 2 adjustment rounds, then finalize
51
- with the user's latest answers (do not loop indefinitely).
52
-
53
- ## Output
54
- 1. Save planning report to: workspace/members/{developer}/drafts/plan-{topic}.md
55
- 2. If the user wants to proceed with the MVP, also generate
56
- PRD + prototype (per /wl-prd Step 6, platform template applies)
57
- **PRD 第一行必须是 `<!-- mode: planning -->`** (syncgate/eval_prd 靠此识别模式).
@@ -1,34 +0,0 @@
1
- # PRD Research Agent (Brainstorm)
2
-
3
- ## Required: Load Context First (Pull-Based)
4
- This platform does NOT auto-inject task context.
5
- Before doing anything else, you MUST:
6
- 1. Read the dispatch prompt to get active task info
7
- 2. If no task info, run: python .qoder/scripts/task.py current --source
8
- 3. Read the task PRD at the path shown
9
-
10
- ## Recursion Guard
11
- You are the prd-research sub-agent.
12
- Do NOT spawn another prd-research agent.
13
-
14
- ## Your Role
15
- You are ONE of N brainstorm agents analyzing a requirement.
16
- Your specific perspective is defined in the dispatch prompt.
17
-
18
- ## Workflow
19
- 1. Read your assigned perspective from dispatch prompt
20
- 2. Search the web for relevant information
21
- 3. Analyze the requirement from your perspective
22
- 4. Write your findings to workspace/members/{pm}/drafts/brainstorm-agent{N}-{perspective}.md
23
- 5. Include: key findings, risks, opportunities, recommendations
24
-
25
- Note: your report is an intermediate artifact - the caller merges all
26
- agent reports into the PRD and then deletes brainstorm-agent*.md files.
27
- 合并生成的最终 PRD 第一行必须是 `<!-- mode: brainstorm -->` (syncgate/eval_prd 靠此识别模式).
28
-
29
- ## Output Format
30
- # Brainstorm Report: {perspective}
31
- ## Key Findings
32
- ## Risks
33
- ## Opportunities
34
- ## Recommendations
@@ -1,51 +0,0 @@
1
- ---
2
- name: wl-insight
3
- description: "Data insight: user feedback analysis + product metrics review in one command"
4
- argument-hint: "[type: feedback/metrics/all] [data or description]"
5
- auto-approve: true
6
- allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
- ---
8
-
9
- # /wl-insight - Data Insight (Feedback + Metrics)
10
-
11
- User input: $ARGUMENTS
12
-
13
- ## Type Detection
14
- - "feedback" or paste feedback text -> Feedback analysis
15
- - "metrics" or paste data table -> Metrics review
16
- - "all" or no keyword -> Both (if data available)
17
- - Default: ask user what they want to analyze
18
-
19
- ## Feedback Analysis
20
- 1. Parse feedback data (text/CSV/paste)
21
- 2. Classify: feature-request / bug / UX / performance / praise / question
22
- 3. Sentiment: positive / neutral / negative
23
- 4. Extract pain points (frequency x severity)
24
- 5. Output:
25
- - Category breakdown
26
- - Top 10 pain points with representative quotes
27
- - Prioritized improvement recommendations
28
- 6. Save to: workspace/members/{dev}/drafts/wl-insight-feedback-{date}.md
29
-
30
- ## Metrics Review
31
- 1. Parse metrics data
32
- 2. North Star decomposition (North Star -> L1 -> L2)
33
- 3. Growth: DAU/WAU/MAU + user segments
34
- 4. Retention: D1/D7/D30 vs industry benchmarks
35
- 5. Conversion funnel: bottleneck identification
36
- 6. A/B experiment interpretation (if data provided)
37
- 7. OKR alignment check
38
- 8. Anomaly attribution (if metric changed)
39
- 9. Output:
40
- - Health overview table
41
- - Key insights (data-backed)
42
- - Action recommendations
43
- 10. Save to: workspace/members/{dev}/drafts/wl-insight-metrics-{date}.md
44
-
45
- ## Combined (all)
46
- Run both analyses. Cross-reference:
47
- - Metrics anomaly + user feedback = root cause
48
- - Feedback trends + metric changes = validation
49
-
50
- ## Output
51
- Always end with: "Use /wl-prd to convert insights into action"
@@ -1,92 +0,0 @@
1
- ---
2
- name: wl-prd
3
- description: "生成 PRD + 平台匹配的原型(/wl-prd 命令入口)。Generate PRD with platform-aware prototype. 用户说'写个需求''生成PRD''做个原型''保单这块加个功能''写个产品需求文档'或输入 /wl-prd 时触发。先问平台!"
4
- trigger: "用户描述需求、要 PRD、要原型、要 mockup,或直接 /wl-prd"
5
- ---
6
-
7
- # wl-prd — PRD + 原型生成(/wl-prd 命令入口)
8
-
9
- > 这是 `/wl-prd` 命令的 skill 入口。QoderWork 的 `/` 列表读 skills,
10
- > 所以本 skill 让 QoderWork 也能用 `/wl-prd`,与 Qoder IDE 保持一致。
11
- > 完整工作流见同名 command 文件 `.qoder/commands/wl-prd.md` 和
12
- > 功能型 skill `.qoder/skills/prd-generator/SKILL.md`。
13
-
14
- ## ⚠️ STEP 0: 必须先问平台(任何分析前)
15
-
16
- ```
17
- 这个需求是针对哪个平台?
18
-
19
- 1. Web 管理端 (fywl-ui) - Ant Design Vue + VxeGrid 风格
20
- 2. APP 移动端 (Carmg-H5) - Vant 风格
21
- 3. 两端都要
22
-
23
- 请选择 (1/2/3):
24
- ```
25
-
26
- **绝不自动判断。绝不假设。绝不跳过。永远先问。等用户回答。**
27
-
28
- | 回答 | 平台 | 项目 | 搜索 flag | 原型模板 |
29
- |------|------|------|-----------|----------|
30
- | 1 / Web / PC / 管理端 | Web | fywl-ui | `--platform web` | prototype-web.html |
31
- | 2 / APP / H5 / 移动端 | APP | Carmg-H5 | `--platform app` | prototype-app.html |
32
- | 3 / 都要 / 两端 | Both | Both | 都跑 | 两个模板,两份原型 |
33
-
34
- ## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
35
-
36
- 会话开始先读(不存在就跳过,不要报错中断):
37
- - `.qoder/.developer` — 当前开发者名(产出存到 `workspace/members/{dev}/drafts/`)
38
- - `.qoder/.current-task` — 当前活动任务
39
- - `data/index/.index-meta.json` — 知识图谱新鲜度(过期提示先 `/wl-init`,不阻塞)
40
-
41
- ## 四种用法(简单)
42
-
43
- | 怎么说 | 做什么 | 出PRD? |
44
- |--------|--------|---------|
45
- | 直接说需求 | 直接生成 | ✅ |
46
- | "深度"或"规划""创新""调研" | 先分析(现状/Gap/SCAMPER)再生成 | ✅ |
47
- | "快速"或"加个字段" | Mini-PRD,跳过 EVA | ✅ |
48
- | "探讨"或"聊聊" | 纯讨论,不出文件 | ❌ |
49
-
50
- > **深度模式** = 先做现状+Gap+多角度分析,再出 PRD。适合大需求/新领域/想创新。
51
- > **探讨模式** = 聊完说"出PRD"→ 自动转默认生成。
52
- >
53
- > **mode 标记**:生成的 PRD 第一行写 `<!-- mode: quick/brainstorm/planning/reference -->`,
54
- > syncgate/eval_prd 靠它识别模式(Quick 跳过 EVA)。模板已带默认值,只改值别删。
55
-
56
- ## 完整流程(默认/深度/快速 模式)
57
-
58
- 按 `.qoder/commands/wl-prd.md` 执行。核心步骤:
59
-
60
- 1. **一次取全上下文**(fast path):
61
- ```bash
62
- python .qoder/scripts/context_pack.py <业务关键词> --platform <web|app>
63
- ```
64
- 2. 读历史 PRD、业务草稿、风格 token
65
- 3. 一次性确认发现(不要一条一条问)
66
- 4. 生成 PRD + 原型(从平台模板开始,填真实字段,diff 高亮)
67
- 5. **EVA 质量门禁**:
68
- ```bash
69
- python .qoder/scripts/eval_prd.py <draft-prd.md> <prototype.html>
70
- ```
71
- <80% 就修到 PASS。
72
- 6. 发布 + 归档 + 同步(3 合 1):
73
- ```bash
74
- # a. 归档到 data/docs/prd/ (立刻可搜, 不用等 cron)
75
- python .qoder/scripts/collect_prds.py
76
- # b. 推送到团队 (push 后也会自动再 collect 一次)
77
- python .qoder/scripts/team_sync.py push
78
- ```
79
- > collect_prds 把你的 PRD 从 workspace/members/{你的名字}/drafts/ 拷到 data/docs/prd/,
80
- > 这样 search_index --prd 立刻能搜到新 PRD。
81
-
82
- 详细生成规则、样式 token、原型规则见:
83
- - 功能型 skill:`.qoder/skills/prd-generator/SKILL.md`
84
- - 原型规则:`.qoder/skills/prototype-generator/SKILL.md`
85
- - 命令完整定义:`.qoder/commands/wl-prd.md`
86
-
87
- ## REQ-ID 分配(并发安全)
88
-
89
- **必须**用原子分配器,禁止手动扫描最大值:
90
- ```bash
91
- python -c "import sys; sys.path.insert(0,'.qoder/scripts'); from common.reqid import allocate_req_id; n=allocate_req_id(); print('REQ-%d-%03d' % (__import__('datetime').date.today().year, n))"
92
- ```