@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.
- package/bin/cli.js +375 -78
- package/package.json +29 -29
- package/templates/.qoder/.runtime/ctx-cache-5660152f1d6dd819.md +23 -0
- package/templates/.qoder/.runtime/ctx-cache-afdce0dac06b25b0.md +23 -0
- package/templates/.qoder/.runtime/search-cache-eae7644e7b122f35.txt +1 -0
- package/templates/.qoder/learning/eval-history.jsonl +28 -0
- package/templates/data/index/wiki-index.json +8 -0
- package/templates/qoder/agents/insight-planning.md +1 -1
- package/templates/qoder/agents/insight-research.md +28 -15
- package/templates/qoder/commands/optional/wl-insight.md +159 -161
- package/templates/qoder/commands/optional/wl-report.md +4 -4
- package/templates/qoder/commands/optional/wl-status.md +2 -2
- package/templates/qoder/commands/wl-code.md +2 -2
- package/templates/qoder/commands/wl-design.md +2 -2
- package/templates/qoder/commands/wl-init.md +3 -3
- package/templates/qoder/commands/wl-prd.md +2 -2
- package/templates/qoder/commands/wl-req.md +43 -0
- package/templates/qoder/commands/wl-search.md +8 -8
- package/templates/qoder/commands/wl-task.md +17 -17
- package/templates/qoder/commands/wl-test.md +41 -15
- package/templates/qoder/config.yaml +17 -1
- package/templates/qoder/hooks/session-start.py +12 -22
- package/templates/qoder/nul +4 -0
- package/templates/qoder/rules/wl-pipeline.md +22 -48
- package/templates/qoder/scripts/README.md +139 -0
- package/templates/qoder/scripts/common/autotest_auth.py +109 -0
- package/templates/qoder/scripts/common/bootstrap.py +145 -0
- package/templates/qoder/scripts/common/check_publish.py +98 -0
- package/templates/qoder/scripts/common/cmd_registry.py +112 -0
- package/templates/qoder/scripts/common/config.py +187 -0
- package/templates/qoder/scripts/common/contract.py +317 -0
- package/templates/qoder/scripts/common/developer.py +2 -1
- package/templates/qoder/scripts/common/feishu.py +10 -9
- package/templates/qoder/scripts/common/guard.py +159 -0
- package/templates/qoder/scripts/common/identity.py +121 -2
- package/templates/qoder/scripts/common/kg_capabilities.py +182 -0
- package/templates/qoder/scripts/common/mcp_base.py +268 -0
- package/templates/qoder/scripts/common/paths.py +187 -1
- package/templates/qoder/scripts/common/result.py +223 -0
- package/templates/qoder/scripts/common/roles.py +60 -0
- package/templates/qoder/scripts/common/task_utils.py +21 -9
- package/templates/qoder/scripts/common/test_extract.py +115 -0
- package/templates/qoder/scripts/kg/__init__.py +11 -0
- package/templates/qoder/scripts/kg/build_entity_registry.py +196 -0
- package/templates/qoder/scripts/kg/build_relations.py +127 -0
- package/templates/qoder/scripts/{build_style_index.py → kg/build_style_index.py} +39 -10
- package/templates/qoder/scripts/kg/build_workflows.py +144 -0
- package/templates/qoder/scripts/{context_pack.py → kg/context_pack.py} +18 -11
- package/templates/qoder/scripts/{enrich_prompt.py → kg/enrich_prompt.py} +232 -226
- package/templates/qoder/scripts/{extract_api_params.py → kg/extract.py} +398 -246
- package/templates/qoder/scripts/{kg.py → kg/kg.py} +638 -708
- package/templates/qoder/scripts/{kg_build.py → kg/kg_build.py} +618 -612
- package/templates/qoder/scripts/{kg_build_db.py → kg/kg_build_db.py} +333 -327
- package/templates/qoder/scripts/{kg_duckdb.py → kg/kg_duckdb.py} +38 -37
- package/templates/qoder/scripts/{kg_incremental.py → kg/kg_incremental.py} +420 -393
- package/templates/qoder/scripts/{kg_link_db.py → kg/kg_link_db.py} +230 -224
- package/templates/qoder/scripts/{kg_semantic.py → kg/kg_semantic.py} +156 -150
- package/templates/qoder/scripts/kg/prefetch.py +359 -0
- package/templates/qoder/scripts/{search_index.py → kg/search_index.py} +70 -14
- package/templates/qoder/scripts/mcp/__init__.py +11 -0
- package/templates/qoder/scripts/{kg_mcp_server.py → mcp/kg_mcp_server.py} +77 -272
- package/templates/qoder/scripts/{lanhu_stdio_wrapper.py → mcp/lanhu_stdio_wrapper.py} +125 -119
- package/templates/qoder/scripts/{check_mcp.py → mcp/mcp_doctor.py} +515 -298
- package/templates/qoder/scripts/{mcp_launcher.py → mcp/mcp_launcher.py} +442 -414
- package/templates/qoder/scripts/{mysql_mcp_server.py → mcp/mysql_mcp_server.py} +347 -396
- package/templates/qoder/scripts/{zentao_mcp_server.py → mcp/zentao_mcp_server.py} +384 -424
- package/templates/qoder/scripts/report/__init__.py +11 -0
- package/templates/qoder/scripts/{add_session.py → report/add_session.py} +250 -244
- package/templates/qoder/scripts/{archive_prd.py → report/archive_prd.py} +383 -377
- package/templates/qoder/scripts/{eval_prd.py → report/eval_prd.py} +73 -11
- package/templates/qoder/scripts/{export.py → report/export.py} +63 -0
- package/templates/qoder/scripts/{fill_prototype.py → report/fill_prototype.py} +6 -0
- package/templates/qoder/scripts/{gen_design_doc.py → report/gen_design_doc.py} +400 -394
- package/templates/qoder/scripts/{learn.py → report/learn.py} +152 -146
- package/templates/qoder/scripts/{learn_aggregate.py → report/learn_aggregate.py} +207 -201
- package/templates/qoder/scripts/{report.py → report/report.py} +287 -281
- package/templates/qoder/scripts/report/req.py +222 -0
- package/templates/qoder/scripts/report/role.py +33 -0
- package/templates/qoder/scripts/{status.py → report/status.py} +634 -628
- package/templates/qoder/scripts/setup/__init__.py +11 -0
- package/templates/qoder/scripts/setup/carriers.py +662 -0
- package/templates/qoder/scripts/{init_doctor.py → setup/init_doctor.py} +63 -26
- package/templates/qoder/scripts/{install_qoderwork.py → setup/install_qoderwork.py} +36 -26
- package/templates/qoder/scripts/{platform_doctor.py → setup/platform_doctor.py} +265 -259
- package/templates/qoder/scripts/{repo_root.py → setup/repo_root.py} +112 -106
- package/templates/qoder/scripts/{setup.py → setup/setup.py} +147 -0
- package/templates/qoder/scripts/{setup_lanhu.py → setup/setup_lanhu.py} +973 -963
- package/templates/qoder/scripts/task/__init__.py +11 -0
- package/templates/qoder/scripts/{git_sync.py → task/git_sync.py} +52 -31
- package/templates/qoder/scripts/{syncgate.py → task/syncgate.py} +6 -0
- package/templates/qoder/scripts/task/task.py +221 -0
- package/templates/qoder/scripts/task/task_lifecycle.py +596 -0
- package/templates/qoder/scripts/task/task_query.py +161 -0
- package/templates/qoder/scripts/task/task_relations.py +424 -0
- package/templates/qoder/scripts/{team_sync.py → task/team_sync.py} +93 -20
- package/templates/qoder/scripts/test/__init__.py +11 -0
- package/templates/qoder/scripts/{autotest.py → test/autotest.py} +1174 -1751
- package/templates/qoder/scripts/{autotest_batch.py → test/autotest_batch.py} +242 -224
- package/templates/qoder/scripts/test/autotest_data.py +675 -0
- package/templates/qoder/scripts/{autotest_run.py → test/autotest_run.py} +309 -297
- package/templates/qoder/scripts/{benchmark.py → test/benchmark.py} +6 -0
- package/templates/qoder/scripts/{kg_auto_login.py → test/kg_auto_login.py} +202 -196
- package/templates/qoder/scripts/{kg_test_runner.py → test/kg_test_runner.py} +7 -1
- package/templates/qoder/scripts/{page_probe.py → test/page_probe.py} +465 -459
- package/templates/qoder/scripts/wlkj.py +116 -0
- package/templates/qoder/settings.json +1 -10
- package/templates/qoder/skills/design-import/SKILL.md +226 -226
- package/templates/qoder/skills/design-review/SKILL.md +82 -82
- package/templates/qoder/skills/prd-generator/SKILL.md +26 -16
- package/templates/qoder/skills/prd-review/SKILL.md +5 -5
- package/templates/qoder/skills/prototype-generator/SKILL.md +256 -256
- package/templates/qoder/skills/spec-coder/SKILL.md +4 -4
- package/templates/qoder/skills/spec-generator/SKILL.md +4 -4
- package/templates/qoder/skills/test-generator/SKILL.md +5 -5
- package/templates/qoder/skills/wl-code/SKILL.md +4 -4
- package/templates/qoder/skills/wl-commit/SKILL.md +4 -4
- package/templates/qoder/skills/wl-design/SKILL.md +3 -3
- package/templates/qoder/skills/wl-init/SKILL.md +8 -8
- package/templates/qoder/skills/wl-insight/SKILL.md +5 -5
- package/templates/qoder/skills/wl-prd-full/SKILL.md +6 -6
- package/templates/qoder/skills/wl-prd-quick/SKILL.md +6 -6
- package/templates/qoder/skills/wl-prd-review/SKILL.md +4 -4
- package/templates/qoder/skills/wl-report/SKILL.md +7 -7
- package/templates/qoder/skills/wl-search/SKILL.md +13 -13
- package/templates/qoder/skills/wl-spec/SKILL.md +5 -5
- package/templates/qoder/skills/wl-status/SKILL.md +5 -5
- package/templates/qoder/skills/wl-task/SKILL.md +6 -6
- package/templates/qoder/skills/wl-test/SKILL.md +102 -39
- package/templates/root/AGENTS.md +39 -40
- package/templates/qoder/hooks/inject-workflow-state.py +0 -169
- package/templates/qoder/scripts/__pycache__/check_mcp_launch.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/__pycache__/install_qoderwork.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/__pycache__/mcp_launcher.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/__pycache__/platform_doctor.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/check_carriers.py +0 -238
- package/templates/qoder/scripts/check_mcp_launch.py +0 -183
- package/templates/qoder/scripts/check_qoderwork_consistency.py +0 -166
- package/templates/qoder/scripts/collect_prds.py +0 -31
- package/templates/qoder/scripts/common/mentions.py +0 -134
- package/templates/qoder/scripts/common/utf8.py +0 -38
- package/templates/qoder/scripts/extract_routes.py +0 -54
- package/templates/qoder/scripts/extract_routes_tree.py +0 -78
- package/templates/qoder/scripts/handoff.py +0 -22
- package/templates/qoder/scripts/init_developer.py +0 -76
- package/templates/qoder/scripts/parse_prds.py +0 -33
- package/templates/qoder/scripts/role.py +0 -51
- package/templates/qoder/scripts/sync_carriers.py +0 -259
- package/templates/qoder/scripts/task.py +0 -1261
- package/templates/qoder/scripts/workspace_init.py +0 -102
- package/templates/qoder/skills/prompt-enrich/SKILL.md +0 -90
- package/templates/qoder/skills/prototype-generator/SKILL.md.zcode-79180-2af4721f-f9a6-412c-88db-c0af680d211b.tmp +0 -0
- /package/templates/qoder/scripts/{secure-ls.js → test/secure-ls.js} +0 -0
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: design-review
|
|
3
|
-
description: "评审设计交付物的完整性。Review design artifacts for completeness.
|
|
4
|
-
trigger: "user invokes /
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## 🔧 仓库根定位(QoderWork 桌面端 vs Qoder IDE/CLI)
|
|
9
|
-
|
|
10
|
-
**后续脚本里的 `$R` 代表仓库根**,先确定它(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
11
|
-
```bash
|
|
12
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
13
|
-
```
|
|
14
|
-
> `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/install_qoderwork.py`。
|
|
15
|
-
|
|
16
|
-
# Design Review Skill(设计师 + PM 都可用)
|
|
17
|
-
|
|
18
|
-
> 🚫 **边界铁律:蓝湖工具(`mcp__lanhu__*`)只能在本 skill(即 `/wl-design
|
|
19
|
-
> 用户直接说"用蓝湖对比一下"而没走评审命令时,引导到 `/wl-design
|
|
20
|
-
|
|
21
|
-
## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
|
|
22
|
-
|
|
23
|
-
- `.qoder/.developer` — 当前评审人
|
|
24
|
-
- 设计文件路径由用户指定,或扫 `workspace/members/{dev}/drafts/prototype-*.html`
|
|
25
|
-
- 若 `data/style/{需求名}-design-spec.json` 存在,作为评审基准(优先级最高)
|
|
26
|
-
|
|
27
|
-
## 两种评审模式
|
|
28
|
-
|
|
29
|
-
### 模式 A:评审 AI 原型(设计师审 AI 的活)
|
|
30
|
-
|
|
31
|
-
设计师在 QoderWork 说"评审原型",AI 拉出 `drafts/prototype-*.html`:
|
|
32
|
-
|
|
33
|
-
1. 逐项检查(见下方 Checklist)
|
|
34
|
-
2. **对照设计师 spec**:若 data/style/ 有 spec.json,检查原型是否匹配
|
|
35
|
-
3. 输出问题清单(按严重度排序),设计师确认后 PM 说"修订原型"
|
|
36
|
-
|
|
37
|
-
### 模式 B:评审设计师交付(PM 审设计师的活)
|
|
38
|
-
|
|
39
|
-
PM 说"评审设计稿",AI 检查设计师的 spec.json 或原型:
|
|
40
|
-
|
|
41
|
-
1. 是否跟系统现有风格一致(对照 vben-style-reference.json / Vant 变量)
|
|
42
|
-
2. 图标/颜色是否来自真源
|
|
43
|
-
3. 是否覆盖 PRD 的所有界面需求
|
|
44
|
-
|
|
45
|
-
## 检查项 (Checklist)
|
|
46
|
-
|
|
47
|
-
- [ ] 组件规格完整(components.json 或 spec.json)
|
|
48
|
-
- [ ] 交互流程覆盖所有状态(interaction-flow.md)
|
|
49
|
-
- [ ] 技术约束已标注
|
|
50
|
-
- [ ] 响应式/设计 Token 已定义
|
|
51
|
-
- [ ] 符合 PRD 需求
|
|
52
|
-
- [ ] **图标来自真源(data/index/ref-icon.json),无 emoji**(硬性)
|
|
53
|
-
- [ ] 颜色来自真源(Web: ref-vben-style.json;APP: Vant 变量)
|
|
54
|
-
- [ ] **若设计师 spec 存在:原型是否匹配 spec 的布局/配色/组件**(硬性)
|
|
55
|
-
- [ ] 侧边栏/导航/表格/表单等关键区域是否跟系统其他页面一致
|
|
56
|
-
- [ ] **🆕 按钮文案是否用了系统真实文案**(对照 DESIGN.md 的 "Real Button Texts" 段或 entity-registry,别用编的"新增/编辑")
|
|
57
|
-
- [ ] **🆕 布局是否跟同功能模块的标杆页面一致**(对照 DESIGN.md 的 "Feature Modules" 段)
|
|
58
|
-
- [ ] **🆕 侧边栏宽度是否 = layout_fingerprint 的值**(fywl-ui 是 160px,不是 200px)
|
|
59
|
-
- [ ] **🆕 若 spec 有 `lanhu_source`:原型配色是否忠于蓝湖原图**(调 `mcp__lanhu__get_ai_analyze_design_result` 拉蓝湖 CSS,逐项比原型 `:root` 的值是否一致;不一致=还原度问题)
|
|
60
|
-
- [ ] **🆕 若 spec 有 `icons`:原型图标是否用了蓝湖切图**(别退回 emoji 或通用图标)
|
|
61
|
-
|
|
62
|
-
**评审时可调 MCP 工具辅助:**
|
|
63
|
-
- `mcp__qoder-knowledge-graph__feature_overview(feature='XX')` → 看这个功能模块的完整画像,对比原型是否遗漏页面/按钮
|
|
64
|
-
- `mcp__qoder-knowledge-graph__get_design_system(platform='web')` → 拿到真实 token/按钮文案/模块标杆做对照
|
|
65
|
-
- **`mcp__qoder-knowledge-graph__get_workflow(module='XX')`** → 查业务操作链(查询→新增→审批→...),检查原型是否覆盖了完整交互流程(而不只是静态页面)
|
|
66
|
-
- **`mcp__coverage_matrix()`** → 查这个功能有没有测试覆盖,如果原型要改的页面有测试,提醒"改动后需回归测试"
|
|
67
|
-
- **`mcp__lanhu__get_ai_analyze_design_result`** → spec 有 lanhu_source 时,拉蓝湖原图 CSS 做还原度比对(蓝湖不可用则跳过此项,不阻塞)
|
|
68
|
-
|
|
69
|
-
## 输出
|
|
70
|
-
|
|
71
|
-
报告:PASS 或 列出需修复的问题清单(按 🔴严重/🟡建议 分级)。
|
|
72
|
-
|
|
73
|
-
## 埋点(评审完成后 AI 必须做)
|
|
74
|
-
|
|
75
|
-
评审输出报告后,**立即调用 learning 引擎记录本次评审**(让团队学习哪些设计问题最常见):
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
python "$R/.qoder/scripts/learn.py" record review_done "{\"target\":\"{被评审的原型或spec}\",\"result\":\"PASS或问题数\",\"issues\":[\"严重问题1\",\"建议1\"]}"
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
> 埋点失败不阻塞评审。数据进个人 journal,管理员聚合到 kg.duckdb 后,可统计"最常出现的设计问题",反哺 design-import 防再犯。
|
|
82
|
-
若不通过,附上修复建议和参考文件路径,PM 确认后 AI 修订原型。
|
|
1
|
+
---
|
|
2
|
+
name: design-review
|
|
3
|
+
description: "评审设计交付物的完整性。Review design artifacts for completeness. "
|
|
4
|
+
trigger: "user invokes /wl-* command explicitly"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 🔧 仓库根定位(QoderWork 桌面端 vs Qoder IDE/CLI)
|
|
9
|
+
|
|
10
|
+
**后续脚本里的 `$R` 代表仓库根**,先确定它(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
11
|
+
```bash
|
|
12
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
13
|
+
```
|
|
14
|
+
> `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。找不到时先跑 `python .qoder/scripts/setup/install_qoderwork.py`。
|
|
15
|
+
|
|
16
|
+
# Design Review Skill(设计师 + PM 都可用)
|
|
17
|
+
|
|
18
|
+
> 🚫 **边界铁律:蓝湖工具(`mcp__lanhu__*`)只能在本 skill(即 `/wl-design 评审`)内部调用。**
|
|
19
|
+
> 用户直接说"用蓝湖对比一下"而没走评审命令时,引导到 `/wl-design 评审`。非侵入式,不裸调。
|
|
20
|
+
|
|
21
|
+
## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
|
|
22
|
+
|
|
23
|
+
- `.qoder/.developer` — 当前评审人
|
|
24
|
+
- 设计文件路径由用户指定,或扫 `workspace/members/{dev}/drafts/prototype-*.html`
|
|
25
|
+
- 若 `data/style/{需求名}-design-spec.json` 存在,作为评审基准(优先级最高)
|
|
26
|
+
|
|
27
|
+
## 两种评审模式
|
|
28
|
+
|
|
29
|
+
### 模式 A:评审 AI 原型(设计师审 AI 的活)
|
|
30
|
+
|
|
31
|
+
设计师在 QoderWork 说"评审原型",AI 拉出 `drafts/prototype-*.html`:
|
|
32
|
+
|
|
33
|
+
1. 逐项检查(见下方 Checklist)
|
|
34
|
+
2. **对照设计师 spec**:若 data/style/ 有 spec.json,检查原型是否匹配
|
|
35
|
+
3. 输出问题清单(按严重度排序),设计师确认后 PM 说"修订原型"
|
|
36
|
+
|
|
37
|
+
### 模式 B:评审设计师交付(PM 审设计师的活)
|
|
38
|
+
|
|
39
|
+
PM 说"评审设计稿",AI 检查设计师的 spec.json 或原型:
|
|
40
|
+
|
|
41
|
+
1. 是否跟系统现有风格一致(对照 vben-style-reference.json / Vant 变量)
|
|
42
|
+
2. 图标/颜色是否来自真源
|
|
43
|
+
3. 是否覆盖 PRD 的所有界面需求
|
|
44
|
+
|
|
45
|
+
## 检查项 (Checklist)
|
|
46
|
+
|
|
47
|
+
- [ ] 组件规格完整(components.json 或 spec.json)
|
|
48
|
+
- [ ] 交互流程覆盖所有状态(interaction-flow.md)
|
|
49
|
+
- [ ] 技术约束已标注
|
|
50
|
+
- [ ] 响应式/设计 Token 已定义
|
|
51
|
+
- [ ] 符合 PRD 需求
|
|
52
|
+
- [ ] **图标来自真源(data/index/ref-icon.json),无 emoji**(硬性)
|
|
53
|
+
- [ ] 颜色来自真源(Web: ref-vben-style.json;APP: Vant 变量)
|
|
54
|
+
- [ ] **若设计师 spec 存在:原型是否匹配 spec 的布局/配色/组件**(硬性)
|
|
55
|
+
- [ ] 侧边栏/导航/表格/表单等关键区域是否跟系统其他页面一致
|
|
56
|
+
- [ ] **🆕 按钮文案是否用了系统真实文案**(对照 DESIGN.md 的 "Real Button Texts" 段或 entity-registry,别用编的"新增/编辑")
|
|
57
|
+
- [ ] **🆕 布局是否跟同功能模块的标杆页面一致**(对照 DESIGN.md 的 "Feature Modules" 段)
|
|
58
|
+
- [ ] **🆕 侧边栏宽度是否 = layout_fingerprint 的值**(fywl-ui 是 160px,不是 200px)
|
|
59
|
+
- [ ] **🆕 若 spec 有 `lanhu_source`:原型配色是否忠于蓝湖原图**(调 `mcp__lanhu__get_ai_analyze_design_result` 拉蓝湖 CSS,逐项比原型 `:root` 的值是否一致;不一致=还原度问题)
|
|
60
|
+
- [ ] **🆕 若 spec 有 `icons`:原型图标是否用了蓝湖切图**(别退回 emoji 或通用图标)
|
|
61
|
+
|
|
62
|
+
**评审时可调 MCP 工具辅助:**
|
|
63
|
+
- `mcp__qoder-knowledge-graph__feature_overview(feature='XX')` → 看这个功能模块的完整画像,对比原型是否遗漏页面/按钮
|
|
64
|
+
- `mcp__qoder-knowledge-graph__get_design_system(platform='web')` → 拿到真实 token/按钮文案/模块标杆做对照
|
|
65
|
+
- **`mcp__qoder-knowledge-graph__get_workflow(module='XX')`** → 查业务操作链(查询→新增→审批→...),检查原型是否覆盖了完整交互流程(而不只是静态页面)
|
|
66
|
+
- **`mcp__coverage_matrix()`** → 查这个功能有没有测试覆盖,如果原型要改的页面有测试,提醒"改动后需回归测试"
|
|
67
|
+
- **`mcp__lanhu__get_ai_analyze_design_result`** → spec 有 lanhu_source 时,拉蓝湖原图 CSS 做还原度比对(蓝湖不可用则跳过此项,不阻塞)
|
|
68
|
+
|
|
69
|
+
## 输出
|
|
70
|
+
|
|
71
|
+
报告:PASS 或 列出需修复的问题清单(按 🔴严重/🟡建议 分级)。
|
|
72
|
+
|
|
73
|
+
## 埋点(评审完成后 AI 必须做)
|
|
74
|
+
|
|
75
|
+
评审输出报告后,**立即调用 learning 引擎记录本次评审**(让团队学习哪些设计问题最常见):
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python "$R/.qoder/scripts/report/learn.py" record review_done "{\"target\":\"{被评审的原型或spec}\",\"result\":\"PASS或问题数\",\"issues\":[\"严重问题1\",\"建议1\"]}"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> 埋点失败不阻塞评审。数据进个人 journal,管理员聚合到 kg.duckdb 后,可统计"最常出现的设计问题",反哺 design-import 防再犯。
|
|
82
|
+
若不通过,附上修复建议和参考文件路径,PM 确认后 AI 修订原型。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd-generator
|
|
3
|
-
description: "生成 PRD + 平台匹配的原型。Generate PRD with platform-aware prototype.
|
|
4
|
-
trigger: "user
|
|
3
|
+
description: "生成 PRD + 平台匹配的原型。Generate PRD with platform-aware prototype. "
|
|
4
|
+
trigger: "user invokes /wl-* command explicitly"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ trigger: "user describes a requirement, asks for PRD, mockup, or invokes /wl-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
|
# PRD Generator Skill
|
|
17
17
|
|
|
@@ -43,15 +43,19 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
43
43
|
- `.qoder/.current-task` — 当前活动任务
|
|
44
44
|
- `data/index/.index-meta.json` — 知识图谱新鲜度
|
|
45
45
|
|
|
46
|
-
### 写 PRD 前:一次取全(
|
|
46
|
+
### 写 PRD 前:一次取全(prefetch 预测 + 批量预取)
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
**写 PRD 第一件事:调 1 次 `prefetch`**(它会预测业务词 + 批量取多词上下文,合并去重):
|
|
49
|
+
```bash
|
|
50
|
+
ROLE=$(python "$R/.qoder/scripts/report/role.py" 2>/dev/null || echo pm)
|
|
51
|
+
python "$R/.qoder/scripts/kg/kg.py" prefetch "<需求描述>" --platform <p>
|
|
52
|
+
```
|
|
53
|
+
或直接:`python .qoder/scripts/kg/prefetch.py "<需求描述>" --platform <p>`
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
prefetch 一次返回 8 段(含历史PRD/数据库表/真实字段/API/Wiki),等于把多个业务词的查询合并。**prefetch 之后严禁再串行 search/find/grep**(这是轮次爆炸的根因——查一个词不命中就换词再查 6+ 次)。
|
|
56
|
+
|
|
57
|
+
**仅当 prefetch 明确没覆盖到时才补调一次**(极少):
|
|
58
|
+
- 字段枚举值:`mcp__qoder-mysql__query_distinct(table='表名', column='状态列')` — prefetch 给了表结构但没给枚举取值,需要时才调
|
|
55
59
|
- 改表影响:`mcp__qoder-knowledge-graph__table_impact(table='表名')` — 评估改动范围时才调
|
|
56
60
|
|
|
57
61
|
## STEP 0: 必须先问平台
|
|
@@ -130,11 +134,17 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
130
134
|
|
|
131
135
|
**"准"的保障。eval_prd.py 的 A1/A2/A3 已实现大半,这里提升为流程强制门。**
|
|
132
136
|
|
|
133
|
-
|
|
137
|
+
生成后、发布前,**先跑角色+契约前置门,再跑质量分**:
|
|
134
138
|
```bash
|
|
135
|
-
|
|
139
|
+
# 门 1+2: 角色边界(当前角色能否产 prd?) + 契约校验(@contract 头是否合规?)
|
|
140
|
+
# 软提示不阻塞, 越权/无契约头会提示但仍可发布
|
|
141
|
+
python "$R/.qoder/scripts/common/check_publish.py" prd <draft-prd.md>
|
|
142
|
+
|
|
143
|
+
# 门 3: 质量分 (eval_prd 内部也会跑契约校验, 这里是质量评分)
|
|
144
|
+
python "$R/.qoder/scripts/report/eval_prd.py" <draft-prd.md> <prototype.html>
|
|
136
145
|
```
|
|
137
|
-
|
|
146
|
+
- check_publish 越权提示 → 软提示(如 dev 产 prd 会提示"建议产品经理"),不阻塞
|
|
147
|
+
- eval_prd < 80% 不准发布,按报告修到 PASS
|
|
138
148
|
|
|
139
149
|
AI 在跑 eval_prd 前,自己先做内容自检(快档只查锁②):
|
|
140
150
|
|
|
@@ -173,7 +183,7 @@ context_pack 字段段返回"无直接相关字段"时,**字段锁不报错,
|
|
|
173
183
|
## 取上下文 — 一次取全(不要逐个搜)
|
|
174
184
|
|
|
175
185
|
```bash
|
|
176
|
-
python "$R/.qoder/scripts/context_pack.py" <关键词> --platform <web|app>
|
|
186
|
+
python "$R/.qoder/scripts/kg/context_pack.py" <关键词> --platform <web|app>
|
|
177
187
|
```
|
|
178
188
|
返回 7 章节(代码+页面+字段+PRD+API+样式+Wiki)。**只读最相关 1-2 个 Vue 文件**。
|
|
179
189
|
|
|
@@ -196,7 +206,7 @@ python "$R/.qoder/scripts/context_pack.py" <关键词> --platform <web|app>
|
|
|
196
206
|
## 原型规则
|
|
197
207
|
|
|
198
208
|
- 从模板开始(`.qoder/templates/prototype-{web|app}.html`),模板已有正确颜色与 mixed-nav 多级菜单骨架
|
|
199
|
-
- 先跑 `python "$R/.qoder/scripts/fill_prototype.py" <关键词> --platform <web|app>` 拿 80% 草稿;
|
|
209
|
+
- 先跑 `python "$R/.qoder/scripts/report/fill_prototype.py" <关键词> --platform <web|app>` 拿 80% 草稿;
|
|
200
210
|
它会按目标项目的 `layout_fingerprint` 自动填示例菜单骨架和真实字段,你只微调 20%
|
|
201
211
|
- 颜色/布局指纹见 fill_prototype 输出的"设计 Token"段(布局模式/主色/侧边栏宽度)
|
|
202
212
|
- **菜单层级**: 若需求描述了侧边栏/菜单结构(如"一级→二级,右侧三四级"),
|
|
@@ -211,7 +221,7 @@ python "$R/.qoder/scripts/context_pack.py" <关键词> --platform <web|app>
|
|
|
211
221
|
PRD 写入 drafts 后,**顺手归档一份**到当前成员的按时间文件夹,方便人翻查"我那天做了啥":
|
|
212
222
|
|
|
213
223
|
```bash
|
|
214
|
-
python "$R/.qoder/scripts/archive_prd.py" <刚生成的PRD文件路径>
|
|
224
|
+
python "$R/.qoder/scripts/report/archive_prd.py" <刚生成的PRD文件路径>
|
|
215
225
|
```
|
|
216
226
|
|
|
217
227
|
> 归档产物:`workspace/members/{你的名字}/archive/{YYYY-MM-DD}/REQ-{编号}-{中文标题}.md`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd-review
|
|
3
|
-
description: "评审 PRD 完整性与质量。Review PRD for completeness and quality.
|
|
4
|
-
trigger: "user invokes /
|
|
3
|
+
description: "评审 PRD 完整性与质量。Review PRD for completeness and quality. "
|
|
4
|
+
trigger: "user invokes /wl-* command explicitly"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ trigger: "user invokes /review prd, asks to review/check PRD quality, or PM subm
|
|
|
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
|
# PRD Review Skill
|
|
17
17
|
|
|
@@ -40,7 +40,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
40
40
|
|
|
41
41
|
跑一次 EVA 门禁给出客观分数:
|
|
42
42
|
```bash
|
|
43
|
-
python "$R/.qoder/scripts/eval_prd.py" <PRD路径> [原型HTML路径]
|
|
43
|
+
python "$R/.qoder/scripts/report/eval_prd.py" <PRD路径> [原型HTML路径]
|
|
44
44
|
```
|
|
45
45
|
分数 ≥80% 才能发布。低于 80% 把 EVA 报告的问题合并进上面的清单。
|
|
46
46
|
|
|
@@ -48,6 +48,6 @@ python "$R/.qoder/scripts/eval_prd.py" <PRD路径> [原型HTML路径]
|
|
|
48
48
|
|
|
49
49
|
评审出结论(无论 PASS/打回)后埋点,供 /wl-status 统计评审活跃度:
|
|
50
50
|
```bash
|
|
51
|
-
python "$R/.qoder/scripts/learn.py" record review_done "{\"prd\": \"<PRD文件名>\", \"verdict\": \"<PASS|打回>\", \"score\": <EVA分数或空>}"
|
|
51
|
+
python "$R/.qoder/scripts/report/learn.py" record review_done "{\"prd\": \"<PRD文件名>\", \"verdict\": \"<PASS|打回>\", \"score\": <EVA分数或空>}"
|
|
52
52
|
```
|
|
53
53
|
> 失败静默忽略。
|